Skip to content

Instantly share code, notes, and snippets.

View thbkrkr's full-sized avatar
🐳

Thibault Richard thbkrkr

🐳
View GitHub Profile
@thbkrkr
thbkrkr / gist:2902786
Created June 9, 2012 22:15
get arte video url for flvstream
#!/bin/bash
url=http://videos.arte.tv/fr/videos/survivre_au_progres-6703188.html
g() {
local grepMotif="$1"
local sedRegExp="$2"
echo " grep $grepMotif | sed $sedRegExp in curl $url ..."
curl -s $url -o .temp_curlarte
url=$(cat .temp_curlarte | grep "$grepMotif" | sed "s/$sedRegExp/\1/")
@thbkrkr
thbkrkr / Default (Linux).sublime-keymap
Last active March 1, 2025 20:07
Custom & Eclipse shortcuts key bindings (keyboard mapping) for Sublime Text 2 and 3
[
{ "keys": ["f12"], "command": "htmlprettify"},
{ "keys": ["f1"], "command": "fold" },
{ "keys": ["f2"], "command": "unfold" },
{ "keys": ["ctrl+à"], "command": "show_overlay", "args": {"overlay": "goto", "text": "@"} },
{ "keys": ["ctrl+!"], "command": "show_overlay", "args": {"overlay": "goto", "text": ":"} },
{ "keys": ["ctrl+space"], "command": "auto_complete" },
{ "keys": ["ctrl+space"], "command": "replace_completion_with_auto_complete", "context":
[
{ "key": "last_command", "operator": "equal", "operand": "insert_best_completion" },
@thbkrkr
thbkrkr / gist:3218191
Created July 31, 2012 16:15
feu vert down
Fin de l'analyse de fichier inattendue Name. Ligne 35580, position 84. à System.Xml.XmlTextReaderImpl.Throw(Exception e) à System.Xml.XmlTextReaderImpl.Throw(String res, String arg) à System.Xml.XmlTextReaderImpl.Throw(Int32 pos, String res, String arg) à System.Xml.XmlTextReaderImpl.ParseQName(Boolean isQName, Int32 startOffset, Int32& colonPos) à System.Xml.XmlTextReaderImpl.ParseAttributes() à System.Xml.XmlTextReaderImpl.ParseElement() à System.Xml.XmlTextReaderImpl.ParseElementContent() à System.Xml.XmlTextReaderImpl.Read() à System.Xml.XmlLoader.LoadNode(Boolean skipOverWhitespace) à System.Xml.XmlLoader.LoadDocSequence(XmlDocument parentDoc) à System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace) à System.Xml.XmlDocument.Load(XmlReader reader) à System.Xml.XmlDocument.Load(Stream inStream) à Multe_Pass.cVariable.mMajApplicationVariable(eTypVariable Variable, Object Para1) dans E:\Inetpub\Feu Vert\ASPObjects\Classe\WSClasse\cVariable.asmx.vb:ligne 682 à Multe_Pass.cVar
@thbkrkr
thbkrkr / main.scala.html
Created January 11, 2013 09:36
Play2 Scala Template with PJAX
@(title: String, styles: Html = Html(""), scripts: Html = Html(""))(content: Html)(implicit request: play.api.mvc.Request[play.api.mvc.AnyContent])
@* Check for the pjax header *@
@if(request.headers.get("X-PJAX").isDefined) {
<title>@title</title>
@content
<script>console.log("pjax template loaded");</script>
} else {
@* Normal request, not pjax *@
#!/bin/bash
company="xxxxx"
url="http://v-ideoproject.${company}.fr/mantis/extension/search/?s=e&id_project=164"
mv .current_mantis .last_mantis
raw=$(curl -s "$url" | grep 'mantis/' | iconv -f iso8859-1 -t utf-8)
@thbkrkr
thbkrkr / gist:5458311
Created April 25, 2013 08:24
Linux drivers for DELL Latitude E6430 Touchpad
Download this (currently newest package is 1.3): http://www.dahetral.com/public-download
(Really say thank you to these people who wrote this driver, God bless them!)
Untar and copy (as root) the psmouse-alps-X.x folder to your /usr/src directory (now X.x = 1.3).
Once copied just run these commands :
$ sudo dkms add psmouse/alps-X.x
$ sudo dkms autoinstall
@thbkrkr
thbkrkr / RemoteESIndexation.java
Created May 31, 2013 13:01
AsyncHttpClient to push Json in ElasticSearch with authentication
static AsyncHttpClient asyncHttpClient;
static Realm realm;
final static String ES_URL = "http://localhost:9200/";
final static String ES_INDEX = "indexName";
final static String AUTH_LOGIN = "someLogin";
final static String AUTH_PWD = "s0m3P-@ssw0rd!";
final static int REQ_TIMEOUT_MS = 2000;
final static int MAX_CON_PER_HOST = 10;
@thbkrkr
thbkrkr / heroku.logs
Created June 21, 2013 11:53
New Relic Agent overhead
Deployed on Heroku with 1 dyno.
Without New Relic Agent : memory_total val=233.94
With New Relic Agent : memory_total val=519.44
---
With New Relic Agent :
2013-06-08T22:40:06.873212+00:00 heroku[web.1]: State changed from crashed to starting
@thbkrkr
thbkrkr / clean
Created July 3, 2013 11:38
clean formXpgih
./cmd.sh 'for u in $(grep pgih /etc/passwd | cut -d ":" -f1); do sudo /usr/sbin/userdel -rf $u; done'
./cmd.sh 'rm -rf /pgih/*'
./cmd.sh '/sbin/shutdown -r 0'
@thbkrkr
thbkrkr / syslog
Created August 1, 2013 18:28
Why my server restarts itself?
alpha /var/log» uname -a
Linux ks3295757.kimsufi.com 3.8.13-xxxx-grs-ipv6-64 #3 SMP Fri May 31 13:26:19 CEST 2013 x86_64 x86_64 x86_64 GNU/Linux
Aug 1 17:05:01 ks3295757 CRON[978]: (root) CMD (/usr/local/rtm/bin/rtm 44 > /dev/null 2> /dev/null)
Aug 1 17:06:01 ks3295757 CRON[1077]: (root) CMD (/usr/local/rtm/bin/rtm 44 > /dev/null 2> /dev/null)
Aug 1 17:07:01 ks3295757 CRON[1122]: (root) CMD (/usr/local/rtm/bin/rtm 44 > /dev/null 2> /dev/null)
Aug 1 17:07:43 ks3295757 kernel: usb 4-1: new low-speed USB device number 2 using uhci_hcd
Aug 1 17:07:43 ks3295757 kernel: input: Cypress Thinnet TM as /devices/pci0000:00/0000:00:1d.2/usb4/4-1/4-1:1.0/input/input0
Aug 1 17:07:43 ks3295757 kernel: hid-generic 0003:04B4:8081.0001: input: USB HID v1.00 Keyboard [Cypress Thinnet TM] on usb-0000:00:1d.2-1/input0
Aug 1 17:07:43 ks3295757 kernel: input: Cypress Thinnet TM as /devices/pci0000:00/0000:00:1d.2/usb4/4-1/4-1:1.1/input/input1