Skip to content

Instantly share code, notes, and snippets.

View kapouer's full-sized avatar
💭
finalizing pageboard, next gen website editor

Jérémy Lal kapouer

💭
finalizing pageboard, next gen website editor
View GitHub Profile
From bffadf6a55e99291270b7c95c4787ff19ef63348 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Lal?= <kapouer@melix.org>
Date: Wed, 22 Dec 2010 14:31:03 +0100
Subject: [PATCH] mysql adapter should create table with default charset.
This fixes :
https://rails.lighthouseapp.com/projects/8994/tickets/5830-mysql-adapter-should-create-table-with-default-charset
---
.../connection_adapters/mysql2_adapter.rb | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
@kapouer
kapouer / man syntax node.1 v0.4.0
Created February 14, 2011 19:09
correct a small syntax error in manpage of node v0.4.0
--- a/doc/node.1
+++ b/doc/node.1
@@ -44,7 +44,7 @@
.SH ENVIRONMENT VARIABLES
.IP NODE_PATH
-':'-separated list of directories prefixed to the module search path,
+\':\'\-separated list of directories prefixed to the module search path,
require.paths.
@kapouer
kapouer / no_ssl_v2.patch
Created April 10, 2011 15:30
Add --no-ssl2 option to disable ssl2 methods
--- a/src/node_crypto.cc
+++ b/src/node_crypto.cc
@@ -98,11 +98,23 @@
String::Utf8Value sslmethod(args[0]->ToString());
if (strcmp(*sslmethod, "SSLv2_method") == 0) {
+#ifndef OPENSSL_NO_SSL2
method = SSLv2_method();
+#else
+ return ThrowException(Exception::Error(String::New("SSLv2 methods disabled")));
@kapouer
kapouer / gist:1306112
Created October 22, 2011 15:28
GPIO imac 12,2
--- sound/pci/hda/patch_cirrus.c.orig 2011-09-02 10:07:32.013460479 +0200
+++ sound/pci/hda/patch_cirrus.c 2011-09-02 10:07:45.604995395 +0200
@@ -922,7 +922,7 @@
if (spec->board_config == CS420X_MBP53 ||
spec->board_config == CS420X_MBP55 ||
spec->board_config == CS420X_IMAC27) {
- unsigned int gpio = hp_present ? 0x02 : 0x08;
+ unsigned int gpio = hp_present ? 0x04 : 0x08;
snd_hda_codec_write(codec, 0x01, 0,
AC_VERB_SET_GPIO_DATA, gpio);
@kapouer
kapouer / models1.js
Created March 22, 2012 18:33
strict bug
var mongoose = require('mongoose')
, Schema = mongoose.Schema
var user = new Schema({
domain: String,
token: String
}, { strict: true });
user.statics.populate = function(obj, cb) {
var self = this;
@kapouer
kapouer / clients.js
Created April 11, 2012 23:43
Gently launch clients one after another, against a simple server.
var Socket = require('engine.io-client').Socket;
var count = 0;
var opened = 0;
var MAX = 10;
initClient();
function initClient() {
var conn = new Socket({
host: 'localhost'
@kapouer
kapouer / libv8_3.10.8.3-1_mipsel.build
Created May 8, 2012 18:13
libv8 gyp build, target debug instead of release
This file has been truncated, but you can view the full file.
dpkg-buildpackage -rfakeroot -D -us -uc
dpkg-buildpackage: paquet source libv8
dpkg-buildpackage: version source 3.10.8.3-1
dpkg-buildpackage: source changé par Jérémy Lal <kapouer@melix.org>
dpkg-source --before-build libv8-3.10.8.3
dpkg-buildpackage: architecture hôte mipsel
fakeroot debian/rules clean
sed -e 's/__LIBPKGNAME__/libv8-3.10.8.3/g' <debian/control.in.in >debian/control.in
test -x debian/rules
dh_testroot
@kapouer
kapouer / gist:2920372
Created June 12, 2012 21:56
test removeListener and bind
var EE = require('events').EventEmitter;
var emitter = new EE();
var obj = {
fun: function() {
console.log('fun should be called once');
}
};
@kapouer
kapouer / app.js
Created June 19, 2012 22:11
express tilelive example
// Tile server using the node web framework Express (http://expressjs.com).
var app = require('express').createServer();
var tilelive = require('tilelive');
require('tilelive-mapnik').registerProtocols(tilelive);
var filename = __dirname + '/' + 'stylesheet.xml';
tilelive.load('mapnik://' + filename, function(err, source) {
if (err) throw err;
app.get('/:z/:x/:y.*', function(req, res) {
source.getTile(req.param('z'), req.param('x'), req.param('y'), function(err, tile, headers) {
// `err` is an error object when generation failed, otherwise null.
@kapouer
kapouer / waf.patch
Created June 24, 2012 07:24
LINKFLAGS for waf
--- a/tools/wafadmin/Tools/gxx.py
+++ b/tools/wafadmin/Tools/gxx.py
@@ -131,4 +131,5 @@
conf.gxx_modifier_platform()
conf.cxx_load_tools()
conf.cxx_add_flags()
+ conf.link_add_flags()