Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html>
<html>
<head>
<title>Polymer Rails Example</title>
<link rel="import" href="../polymer/polymer.html">
<link rel="import" href="../paper-button/paper-button.html">
</head>
<body>
<paper-button raised>Fancy</paper-button>
@MarkArts
MarkArts / multyArray.js
Created June 6, 2015 19:07
Wrapper around a array with multiy filter and sort
var Sort = function()
{
this.data = []; // end point of the data
this._initOrder = []; // Objects in order of initialization for cache optimazation
this._filters = {};
this._sorts = {};
}
@MarkArts
MarkArts / drupalkraftwagenvbrowsersync.js
Created July 15, 2015 12:32
A Gulpfile that servers a krafwagen drupal setup with gulp-connect-php
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 / kraftwagegulpfile.js
Created July 15, 2015 12:35
Kraftwagegulpfile
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 / scary.cpp
Last active May 24, 2016 15:08
Scary c++ functions and their returns
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 / HaskellFibAndHanoiFun.hs
Created April 19, 2016 13:08
Some Haskell fun with Fibonacci and the tower of Hanoi
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 / LispFibAndHanoiFun.lisp
Last active April 19, 2016 13:10
Lisp Fib and Hanoi fun for Structure and Interpretation of computer languages course
(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 / 99.hs
Last active May 24, 2016 10:34
99 haskell problems progress
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 / config,nix
Created October 11, 2017 12:18
Nix config
{
allowUnfree = true;
packageOverrides = pkgs_: with pkgs_; {
pyth = with pkgs; buildEnv {
name = "pyth";
paths = [
# python35
# python35Packages.psycopg2
@MarkArts
MarkArts / generics.cs
Created March 7, 2018 08:19
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)
{