Skip to content

Instantly share code, notes, and snippets.

@markasoftware
markasoftware / enterprise_token.rb
Last active December 5, 2025 11:56
OpenProject Enterprise mode for free
############ 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 ################
@Xophmeister
Xophmeister / sierpinski.hs
Last active April 25, 2018 13:29
Sierpinski Triangle in Haskell
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
#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)
@fkuehnel
fkuehnel / FastSudokuSolver5.hs
Created December 11, 2012 03:29
Fast Sudoku Solver
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