Skip to content

Instantly share code, notes, and snippets.

import * as aws from "@pulumi/aws";
import * as k8s from "@pulumi/kubernetes";
import * as pulumi from "@pulumi/pulumi";
export type SetupRoute53ZoneArgs = {
zone: aws.route53.Zone;
zoneUserKey: aws.iam.AccessKey;
namespace: string;
domain: string;
};
@MarkArts
MarkArts / plink-plonk.js
Last active January 3, 2024 15:20 — forked from tomhicks/plink-plonk.js
Listen to your web pages
@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)
{
@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 / 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 / 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 / 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 / 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 / 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 / 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({