Skip to content

Instantly share code, notes, and snippets.

@gapato
gapato / equipe12.sh
Created Jan 19, 2014
lequipe.fr live stream via rtmpdump and vlc
View equipe12.sh
#!/bin/bash
app='equipetv_live21/'
flashVer='LNX 11,2,202,332'
swfUrl='http://www.lequipe21.fr/jwplayer/jwplayer.flash.swf'
tcUrl='rtmp://vipwowza.yacast.net/equipetv_live21/'
pageUrl='http://www.lequipe21.fr'
host='vipwowza.yacast.net'
playpath='live21'
bufferSize=2000 # milliseconds
@gapato
gapato / rotate.sh
Created Jun 6, 2013
Simple script to toggle rotation of the screen of a Dell Latitude XT2 AND fixing the touchscreen input direction using xrandr. This is probably not generic enough, you might need to tweak the values (LVDS1 and sed regexp) to match your system.
View rotate.sh
#!/bin/bash
#
# Very small script to fix touchscreen axis on a Latitude XT2 when in portrait mode
# (linux, xrandr)
#
rotation=$(xrandr | head -n1 | sed 's/.*current \([^,]\+\),.*/\1/')
if [ "$rotation" == '1280 x 800' ]
@gapato
gapato / jcdecaux.py
Created May 18, 2013
some trivial stuff to plot jcdecaux data
View jcdecaux.py
import math, json, glob, time
from numpy import *
from matplotlib.pyplot import *
from matplotlib import animation
# http://wiki.openstreetmap.org/wiki/Slippy_map_tilenames#Python
def deg2num(lat_deg, lon_deg):
lat_rad = math.radians(lat_deg)
x = (lon_deg + 180.0) / 360.0