Skip to content

Instantly share code, notes, and snippets.

View kiddouk's full-sized avatar

sebastien requiem kiddouk

  • copenhagen
View GitHub Profile
@kiddouk
kiddouk / config.hs
Created November 19, 2019 07:15
Config for hammer spoon
local spaces = require "hs._asm.undocumented.spaces"
local grid = require "hs.grid"
hs.loadSpoon("SpoonInstall")
Install=spoon.SpoonInstall
Install:andUse("ReloadConfiguration",
{ fn=function(spoon)
spoon:start()
@kiddouk
kiddouk / nodejs-tcp-example.js
Last active November 2, 2017 13:12 — forked from tedmiston/nodejs-tcp-example.js
Node.js TCP client and server example
/*
In the node.js intro tutorial (http://nodejs.org/), they show a basic tcp
server, but for some reason omit a client connecting to it. I added an
example at the bottom.
Save the following server in example.js:
*/
var net = require('net');
@kiddouk
kiddouk / links for reviewers.md
Last active June 19, 2017 15:59
Link to The Practical Guide to successful IT freelance for reviewers
@kiddouk
kiddouk / MockResponseInterceptor.java
Created April 13, 2017 12:13 — forked from mbunyard/MockResponseInterceptor.java
OkHttp3 interceptor which provides a mock response from local resource file.
package com.rogerthat.network.util;
import android.content.Context;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.URLConnection;
import okhttp3.Interceptor;
@kiddouk
kiddouk / MockResponseInterceptor.java
Created April 13, 2017 12:13 — forked from mbunyard/MockResponseInterceptor.java
OkHttp3 interceptor which provides a mock response from local resource file.
package com.rogerthat.network.util;
import android.content.Context;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.URLConnection;
import okhttp3.Interceptor;
GIVE THIS A STAR IF YOU LIKE IT, SO WE CAN TRACK THE INTEREST AND MAKE IT GROW :)
+4572629752
+4530292091
+442038683555
+4561811531
+4588960046
+4561811530
+4531513085
@kiddouk
kiddouk / Categeory.java
Last active August 29, 2015 14:27
Crash on Realm on a clean install.
Public class Category extends RealmObject {
@PrimaryKey
private String title;
public String getTitle() { return title; }
public void setTitle(String t) { this.title = t; }
}
@kiddouk
kiddouk / gifenc.sh
Created August 7, 2015 08:56
Video 2 Gif encoding with palette optimisation
#!/bin/sh
# usage : sh gifenc.sh my_video.mp4 my_gif.gif
palette="/tmp/palette.png"
filters="fps=15,scale=240:-1:flags=lanczos"
ffmpeg -v warning -i $1 -vf "$filters,palettegen" -y $palette
ffmpeg -v warning -i $1 -i $palette -lavfi "$filters [x]; [x][1:v] paletteuse" -y $2
@kiddouk
kiddouk / gist:e46265d6280c02755122
Created January 22, 2015 10:32
Github endpoint failure in France
kiddouk@<machine_name>:/tmp$ git clone git://github.com/larrymyers/jasmine-reporters.git
Cloning into 'jasmine-reporters'...
fatal: read error: Connection reset by peer

Keybase proof

I hereby claim:

  • I am kiddouk on github.
  • I am kiddouk (https://keybase.io/kiddouk) on keybase.
  • I have a public key whose fingerprint is 3B23 02E5 7CC7 AA3D 8D46 00E8 9DAC 32BD 82A1 C9DC

To claim this, I am signing this object: