This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ############ If you are using DOCKER all-in-one image, create Dockerfile like: ################ | |
| ############ FROM openproject/openproject:16 ################ | |
| ############ COPY ./enterprise_token.rb app/models/enterprise_token.rb ################ | |
| ############ If you are runing a manual installation: ################ | |
| ############ REPLACE app/models/enterprise_token.rb in the source code with this file! ################ | |
| ############ also be sure to RESTART OpenProject after replacing the file. ################ | |
| ############ If using some other set up (eg docker-compose), read the comments on ################ | |
| ############ https://gist.github.com/markasoftware/f5b2e55a2c2e3abb1f9eefcdf0bfff45 ################ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sumPairs :: [Integer] -> [Integer] | |
| sumPairs (x:y:s) = (x + y) : sumPairs (y:s) | |
| sumPairs _ = [] | |
| pascal :: Integer -> [Integer] | |
| pascal 0 = [1] | |
| pascal n = sumPairs $ [0] ++ (pascal $ n - 1) ++ [0] | |
| sierpinski :: Integer -> String | |
| sierpinski n = concat $ map (ascii . odd) $ pascal n |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdlib.h> | |
| #include <stdio.h> | |
| #include <string.h> | |
| #include <assert.h> | |
| #include <errno.h> | |
| #include <ctype.h> | |
| #include "bencode.h" | |
| #define MAX_ALLOC (((size_t) -1) / sizeof(struct bencode *) / 2) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module Main where | |
| import qualified Data.Vector.Unboxed as V | |
| import qualified Data.Vector as BV (generate,(!)) | |
| import Data.List (foldl',sort,group) | |
| import Data.Char (chr, ord) | |
| import Data.Word | |
| import Data.Bits | |
| import Control.Monad | |
| import Data.Maybe |