Skip to content

Instantly share code, notes, and snippets.

Mark Arts MarkArts

View GitHub Profile
@MarkArts
MarkArts / plink-plonk.js
Last active May 15, 2020 — forked from tomhicks/plink-plonk.js
Listen to your web pages
View plink-plonk.js
View generics.cs
public class ApiCall<POSTDATATYPE, POSTRESPONSETYPE, GETRESPONSETYPE>
where POSTDATATYPE:class
where POSTRESPONSETYPE:class
where GETRESPONSETYPE:class
{
public string endpoint;
public EntrailsApi api;
public ApiCall(string endpoint, EntrailsApi api)
{
View config,nix
{
allowUnfree = true;
packageOverrides = pkgs_: with pkgs_; {
pyth = with pkgs; buildEnv {
name = "pyth";
paths = [
# python35
# python35Packages.psycopg2
@MarkArts
MarkArts / 99.hs
Last active May 24, 2016
99 haskell problems progress
View 99.hs
main = do
let myList = [1, 2, 3, 4, 5, 6, 7, 8, 9, 3, 3, 3, 4, 7]
putStrLn $ show myList
putStrLn $ show $ myLast myList
putStrLn $ show $ myButLast myList
putStrLn $ show $ elementAt myList 3
putStrLn $ show $ myLength myList
putStrLn $ show $ myReverse myList
putStrLn $ show $ isPalindrome myList
putStrLn $ show $ flatten (List [Elem 1, List [Elem 2, List [Elem 3, Elem 4], Elem 5]])
@MarkArts
MarkArts / LispFibAndHanoiFun.lisp
Last active Apr 19, 2016
Lisp Fib and Hanoi fun for Structure and Interpretation of computer languages course
View LispFibAndHanoiFun.lisp
(defun fib (n)
(loop repeat n
with p = 0 with q = 1
do(psetq p q
q (+ p q))
collect q
)
)
(print (last (fib 1000)))
@MarkArts
MarkArts / HaskellFibAndHanoiFun.hs
Created Apr 19, 2016
Some Haskell fun with Fibonacci and the tower of Hanoi
View HaskellFibAndHanoiFun.hs
main = do
putStrLn . show . last . fib' $ 30000
putStrLn . show $ move 4 1 2 3
fib :: (Eq a, Num a) => a -> a
fib 0 = 0
fib 1 = 1
fib n = fib (n-1) + fib (n-2)
fib' :: (Eq a, Num a) => a -> [a]
@MarkArts
MarkArts / scary.cpp
Last active May 24, 2016
Scary c++ functions and their returns
View scary.cpp
main = do
let myList = [1, 2, 3, 4, 5, 6, 7, 8, 9, 3, 3, 3, 4, 7]
putStrLn $ show myList
putStrLn $ show $ myLast myList
putStrLn $ show $ myButLast myList
putStrLn $ show $ elementAt myList 3
putStrLn $ show $ myLength myList
putStrLn $ show $ myReverse myList
putStrLn $ show $ isPalindrome myList
putStrLn $ show $ flatten (List [Elem 1, List [Elem 2, List [Elem 3, Elem 4], Elem 5]])
View kraftwagegulpfile.js
var gulp = require('gulp');
var browserSync = require('browser-sync');
var shell = require('gulp-shell');
gulp.task('serve', function(){
browserSync({
proxy: 'dev.rijndam.nl',
open: true,
notify: false
@MarkArts
MarkArts / drupalkraftwagenvbrowsersync.js
Created Jul 15, 2015
A Gulpfile that servers a krafwagen drupal setup with gulp-connect-php
View drupalkraftwagenvbrowsersync.js
var gulp = require('gulp');
var browserSync = require('browser-sync');
var shell = require('gulp-shell');
var php = require('gulp-connect-php');
gulp.task('serve', function(){
php.server({ base: 'build', port: 4242, keepalive: true});
browserSync({
@MarkArts
MarkArts / multyArray.js
Created Jun 6, 2015
Wrapper around a array with multiy filter and sort
View multyArray.js
var Sort = function()
{
this.data = []; // end point of the data
this._initOrder = []; // Objects in order of initialization for cache optimazation
this._filters = {};
this._sorts = {};
}
You can’t perform that action at this time.