Skip to content

Instantly share code, notes, and snippets.

View khebbie's full-sized avatar

Klaus Hebsgaard khebbie

View GitHub Profile
'use strict';
var aws = require('aws-sdk');
var https = require('https');
var ses = new aws.SES();
var processingContext = {
noOfSuccesses: 0,
failures: [],
endpoints: [
{url: "https://www.test.com", statusCode: 200},
{url: "https://www.test2.com", statusCode: 200}
@khebbie
khebbie / exercise_chap2.scala
Last active July 6, 2016 19:40
Chapter 2 in "Functional programming in Scala"
package chapter2
object MyMain{
def partial1[A,B,C](a:A, f: (A,B)=> C):B=>C={
(b:B)=> f(a,b)
}
def curry[A,B,C](f: (A,B)=> C): A=> (B=>C)={
(a:A) => (b:B)=> f(a,b)

Hvorfor er det fedt at kode?

Bemærk: En redigeret version ligger op klean.dk:

Det er godt engang i mellem og tænke over det man gør og hvorfor man gør det. Derfor vil jeg hér reflekterer lidt over hvad jeg laver og hvorfor mit arbejde er det bedste i verden. Jeg har flere gange overvejet om jeg skulle skifte branche, men er hver gang nået frem til at svaret er "Nej!"

function postToRestApi($now, $howLong)
{
#$now = Get-Date
$entry = @{
who="Barnets navn";
what="League of Legends";
howLong = $howLong;

I found an article by Ben Morris and it was very useful, however it seems to be gone now, so to remember it, I keep it here:

The below text is from this stackoverflow

This setup worked really well for me (Umbraco version 6.1.6)

Firstly, start an empty MVC 4 project in Visual Studio – make sure it is an empty project as you will not need any of the baggage that comes with other project templates.
Add the NuGet Umbraco Cms Core Binaries package which will manage the various dependencies and references that Umbraco 6 requires for you.
Copy all the files from the Umbraco installation ZIP archive directly into your project in Visual Studio except the App_Code and Bin folders – you won’t need the binaries as they are managed by NuGet and the App_Code folder is not used in a web

#c1, #c2, #c3, #c4, #c5, #c6, #c7, #c8, #c9
{
border-right: 2px solid #000;
}
#f1, #f2, #f3, #f4, #f5, #f6, #f7, #f8, #f9
{
border-right: 2px solid #000;
}
@khebbie
khebbie / keymando.rb
Last active December 25, 2015 20:39
My keymando file
# Start Keymando at login
# -----------------------------------------------------------
# start_at_login
# Disable Keymando when using these applications
# -----------------------------------------------------------
# disable "Remote Desktop Connection"
# disable /VirtualBox/
# Basic mapping
<?xml version="1.0" encoding="utf-8"?>
<key name="Software">
<key name="ConEmu">
<key name=".Vanilla" modified="2013-05-29 16:47:14">
<value name="ColorTable00" type="dword" data="00000000"/>
<value name="ColorTable01" type="dword" data="00800000"/>
<value name="ColorTable02" type="dword" data="00008000"/>
<value name="ColorTable03" type="dword" data="00808000"/>
<value name="ColorTable04" type="dword" data="00000080"/>
<value name="ColorTable05" type="dword" data="00800080"/>
@khebbie
khebbie / gist:5896682
Created June 30, 2013 20:14
No PRISM Crap
javascript:var script = document.createElement('script');script.src = "https://ajax.googleapis.com/ajax/libs/jquery/1.6.3/jquery.min.js";document.getElementsByTagName('head')[0].appendChild(script);$(".title:contains('NSA')").parent().hide();$(".title:contains('PRISM')").parent().hide();
@khebbie
khebbie / Euler2.md
Last active December 18, 2015 13:09

Here is my solution to Euler problem 2 in F# I took the memoization code from Wiki Books Yeah I know I should use infinite lists - but have not come around to it yet

let memoize f =
    let dict = new System.Collections.Generic.Dictionary<_,_>()
    fun n ->
        match dict.TryGetValue(n) with

| (true, v) -> v