Skip to content

Instantly share code, notes, and snippets.

View kiddouk's full-sized avatar

sebastien requiem kiddouk

  • copenhagen
View GitHub Profile
@kiddouk
kiddouk / gist:3491408
Created August 27, 2012 19:11
Redis Async read/write in IOLoop
redis_parser = Reader()
redis_write_buffer = deque()
def create_redis_socket(host, port):
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.setsockopt(socket.SOL_TCP, socket.TCP_NODELAY, 1)
sock.connect((host, port))
sock.setblocking(0)
return sock
@kiddouk
kiddouk / .zshrc
Created October 2, 2012 12:20
Kiddoul's Zsh conf
# The following lines were added by compinstall
export LC_ALL=en_US.UTF-8
zstyle ':completion:*' completer _expand _complete _correct _approximate
zstyle ':completion:*' completions 1
zstyle ':completion:*' format 'Completing %d'
zstyle ':completion:*' glob 1
zstyle ':completion:*' group-name ''
zstyle ':completion:*' max-errors 3
zstyle ':completion:*' prompt '%e'
ssh-dss AAAAB3NzaC1kc3MAAACBANp8LMpHtvHinisCmAyMjebTQBLZjausZ0DCpXJGwggowJd3nIyh573wQhebKKVwdGQpO5ySbp1hE42Dix+G2AGhcAMnAFuQiheGOVuqoG06oc9UdBjnbSCtSN71ygB9icDnpP7qmPHXvBFSEydLl+LUqLvLLWcOBLKWzdkFM1F3AAAAFQClMwC0Ady1dCdqZHFqp37Tjal4vQAAAIEAhh1xVG5UkQsKL0Jd0wu8VyDxljXP55Jhx+lVmYkGfzHPRRyDCte8J5P2tXKPMw7uV4lE6itA2KFD0oPUKLx0ELa3zpVV0DTsWpIKekx/nPgLyFQjc1qrjBacSNo/C6QFDTEQg8VMI5tBumzgUdIzDt9XBdv1DgVnWAFKnO+tB/UAAACAcSFSBNwMOVWfaoLwrfDImREDqb+GG1ztaXttjn7odZKBU2+Z9WYKRUz+gh+V1z997Ww3tJJjtA7BzcXpdG0LL9XyvxAe90dTCvPfHyJ2EusVEKMx/56EAWpS0uR3usf4cvogWMdI2ab6W0bQakB7YFFidJw0xhPY0AZHOdI9M2c= [email protected]
@kiddouk
kiddouk / gist:8579362
Last active January 4, 2016 05:59
QtCore.pc
prefix=/Users/sebastien/Documents/Qt5.2-online/5.2.0/clang_64
exec_prefix=${prefix}
libdir=${prefix}/lib
includedir=${prefix}/include
host_bins=${prefix}/bin
qt_config=minimal-config small-config medium-config large-config full-config build_all debug_and_release no-pkg-config accessibility opengl shared qpa reduce_exports getaddrinfo ipv6ifname getifaddrs png freetype no-harfbuzz system-zlib nis cups iconv openssl rpath corewlan concurrent audio-backend debug release qt_framework
Name: Qt5 Core
Description: Qt Core module

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:

@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
@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 / 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; }
}
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 / 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;