Skip to content

Instantly share code, notes, and snippets.

View shimaore's full-sized avatar
🏕️

Stéphane Alnet shimaore

🏕️
View GitHub Profile
Index: spatialite_osm_filter.c
==================================================================
--- spatialite_osm_filter.c
+++ spatialite_osm_filter.c
@@ -252,36 +252,39 @@
sqlite3_column_text (query, 9));
if (first)
{
/* first NODE row */
@shimaore
shimaore / test.js
Last active November 16, 2015 12:04
Test Express behavior wrt next() / next('route') / ..
var express = require('express')
var app = express()
var handler = function (req,res,next,where,what) {
console.log(' ' + where + ' === ' + what)
switch(what) {
case 'stop':
console.log(' ' + where + ':stop -> (do nothing)')
break
@shimaore
shimaore / yt-dl-#4283.txt
Created November 23, 2014 17:43
Log with --verbose
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['--verbose', 'https://www.youtube.fr/watch?v=5UHBIjPOwLw']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2014.08.05
[debug] Python version 2.7.8 - Linux-3.16.0-4-amd64-x86_64-with-debian-jessie-sid
[debug] Proxy map: {}
[generic] watch?v=5UHBIjPOwLw: Requesting header
[redirect] Following redirect to https://www.youtube.com/watch?gl=FR&hl=fr&v=5UHBIjPOwLw
[youtube] Setting language
@shimaore
shimaore / node-stringprep-build-error.txt
Created September 2, 2014 12:21
Debian build of node-stringprep fails
stephane@voyageur:~/Public/src/node-stringprep…master$ npm install
> node-stringprep@0.5.2 install /srv/home/stephane/Public/src/node-stringprep
> node-gyp rebuild
make: Entering directory '/srv/home/stephane/Public/src/node-stringprep/build'
CXX(target) Release/obj.target/node_stringprep/node-stringprep.o
SOLINK_MODULE(target) Release/obj.target/node_stringprep.node
/usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/Scrt1.o: In function `_start':
(.text+0x20): undefined reference to `main'
@shimaore
shimaore / named.vim
Created August 26, 2014 12:49
Vim: update bind9 serial numbers automatically when loading file
" Inspired by http://www.debian-administration.org/article/381/Updating_bind_serial_numbers_automatically
function UPDSERIAL(date, num)
if (strftime("%Y%m%d") == a:date)
return a:date . a:num+1
endif
return strftime("%Y%m%d") . '01'
endfunction
command Soa :%s/\(2[0-9]\{7}\)\([0-9]\{2}\)\(\s*;\s*serial\s*\)/\=UPDSERIAL(submatch(1),submatch(2)) . submatch(3)/g
@shimaore
shimaore / coffeescript-ctags
Created November 28, 2013 13:57
Yet another ctags definition for coffee-script
--langdef=coffee
--langmap=coffee:.coffee
--langmap=coffee:.coffee.md
--regex-coffee=/(^|[ \t])*class ([A-Za-z_][A-Za-z0-9_]*\.)*([A-Za-z_][A-Za-z0-9_]*)/\3/c,class/
--regex-coffee=/(\.|@)([A-Za-z_][A-Za-z0-9_]*):[ \t]*[-=]>/\2/m,method/
--regex-coffee=/([A-Za-z_][A-Za-z0-9_]*)[ \t]*=.*[-=]>/\1/f,function/
--regex-coffee=/([A-Za-z][A-Za-z0-9_]*)[ \t]*[?+*-]?=/\1/v,variable/
--regex-coffee=/@([A-Za-z_][A-Za-z0-9_]*)[ \t]*[?+*-]?=/\1/f,field/
--regex-coffee=/@([A-Za-z_][A-Za-z0-9_]*):/\1/f,static field/
--regex-coffee=/([A-Za-z_][A-Za-z0-9_]*):/\1/f,field/
@shimaore
shimaore / media-relay.diff
Created November 5, 2013 23:14
Adapt media-relay kernel detection to recent Debian format.
--- mediaproxy-2.5.2/media-relay 2013-11-06 00:03:30.069952020 +0100
+++ /usr/bin/media-relay 2013-11-06 00:12:24.970318048 +0100
@@ -20,7 +20,8 @@
IP_FORWARD_FILE = "/proc/sys/net/ipv4/ip_forward"
CONNTRACK_ACCT_FILE = "/proc/sys/net/netfilter/nf_conntrack_acct"
- KERNEL_VERSION_FILE = "/proc/sys/kernel/osrelease"
+ OS_RELEASE_FILE = "/proc/sys/kernel/osrelease"
+ KERNEL_VERSION_FILE = "/proc/sys/kernel/version"
@shimaore
shimaore / umtrx notes.md
Last active May 12, 2018 14:44
Notes on how to build software and start UmTRXv2 (beta)

Note: I run Debian/testing on amd64 architecture. I use sudo to gain root access.

Prerequisites

sudo apt-get install \
  autoconf libtool libosip2-dev libortp-dev g++ sqlite3 libsqlite3-dev libreadline6-dev libboost-all-dev \
  libusb-1.0.0-dev python-cheetah doxygen docutils \
  libusb-dev libftdi-dev
@shimaore
shimaore / wes.coffee
Created June 24, 2012 01:59
Pass CoffeeCup params down to embedded CoffeeScript
require('zappajs') ->
@use 'zappa'
@enable 'default layout'
@get '/': ->
foo = 'bar'
@render 'index', foo: foo, hardcode: { coffee: export_params }
@view index: ->
@scripts = ['/zappa/jquery']
@shimaore
shimaore / post-commit
Created June 12, 2012 19:59
Allow etckeeper(8) to automatically send notifications on changes.
#!/bin/bash
# Install this file as /etc/.git/hooks/post-commit
# Dependencies: etckeeper git-email
git send-email --from etckeeper --to root --confirm=never --quiet @{1}