Skip to content

Instantly share code, notes, and snippets.

View chrisdoc's full-sized avatar

Christoph Kieslich chrisdoc

View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Webpack Bundle Analyzer</title>
<!-- viewer.js -->
<script>
### Keybase proof
I hereby claim:
* I am chrisdoc on github.
* I am kieslich (https://keybase.io/kieslich) on keybase.
* I have a public key whose fingerprint is 7662 A093 ED45 2E67 C463 88B0 53F7 EA68 98A8 9FF8
To claim this, I am signing this object:
@chrisdoc
chrisdoc / perfect.erl
Created February 21, 2017 19:00
Perfect number in Erlang
-module(perfect).
-export([perfect/1]).
divisors(N) ->
divisors(N,N-1,[]).
divisors(N,P,D) when N rem P == 0, P > 0 ->
X = D ++ [P],
divisors(N,P-1,X);
divisors(N,P,D) when P > 0 ->
@chrisdoc
chrisdoc / fibonacci.erl
Created February 21, 2017 16:31
Fibonacci numbers in Erlang
% Fibonacci numbers
% The Fibonacci sequence is given by 0, 1, 1, 2, 3, 5, … where subsequent values are given by adding the two previous values in the sequence.
%
% Give a recursive definition of the function fib/1 computing the Fibonacci numbers, and give a step-by-step evaluation of fib(4).
%
% Usage:
% 1> fibonacci:fib(5).
% 1> 8
+ (instancetype)sharedInstance
{
static id instance = nil;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
instance = [[self alloc] initWithGATrackingID:kGAITrackingID
mixpanelToken:kMixpanelToken
adjustEnvironment:adjEnvironment];
});
return instance;

Keybase proof

I hereby claim:

  • I am chrisdoc on github.
  • I am kieslich (https://keybase.io/kieslich) on keybase.
  • I have a public key whose fingerprint is 4B03 1E63 AD2B 4EBF 4CBC BCD0 3C14 1C8D 5348 9B8E

To claim this, I am signing this object:

@chrisdoc
chrisdoc / gist:521a9ef97eb2c7b3c8d7
Created December 5, 2014 06:40
sickleave request
Dec 04 22:38:48 meedoc-eu-api-dev heroku/router: at=info method=POST path="/patient/load/sessions/sickleave?apiVersion=1&token=116be439-4b84-4b87-a8a0-3a678261bfa3" host=meedoc-eu-api-dev.herokuapp.com request_id=fc29d820-e7e8-4fc2-ac31-0f39d335ec19 fwd="188.67.66.236" dyno=web.1 connect=1ms service=62ms status=500 bytes=298
Dec 04 22:38:49 meedoc-eu-api-dev app/web.1: at org.scalatra.FlashMapSupport$$anonfun$handle$1.apply(flashMap.scala:136) [scalatra_2.10-2.3.0.jar:2.3.0]
Dec 04 22:38:49 meedoc-eu-api-dev app/web.1: at scala.util.DynamicVariable.withValue(DynamicVariable.scala:57) [scala-library.jar:na]
Dec 04 22:38:49 meedoc-eu-api-dev app/web.1: at org.scalatra.DynamicScope$class.withRequest(DynamicScope.scala:71) [scalatra_2.10-2.3.0.jar:2.3.0]
Dec 04 22:38:49 meedoc-eu-api-dev app/web.1: at org.scalatra.ScalatraServlet.withRequest(ScalatraServlet.scala:49) [scalatra_2.10-2.3.0.jar:2.3.0]
Dec 04 22:38:49 meedoc-eu-api-dev app/web.1: at org.scalatra.FlashMapSupport$class.handle(flashMap.