Skip to content

Instantly share code, notes, and snippets.

@brunobord
brunobord / README.md
Last active August 29, 2015 14:26
LXC remote control -- OBSOLETE
diff --git a/lettuce/languages.py b/lettuce/languages.py
index 02401d7..4e52709 100644
--- a/lettuce/languages.py
+++ b/lettuce/languages.py
@@ -23,7 +23,7 @@ LANGUAGES = {
'native': u'English',
'scenario': u'Scenario',
'scenario_outline': u'Scenario Outline',
@brunobord
brunobord / TheCobblestoneBeat.fr.md
Last active September 6, 2015 20:07
Des pas sur le pavé (EN COURS, PAS FINI)

BC01(VF) Des pas sur le pavé

Credits:

Écrit par Brian Casey
Couverture par Brian Casey
Vétérini et le Badge par Paul Kidby
Mis en page par Kat Boulware Traduction par Bruno Bord, d'après celle de Patrick Couton.

def _cmp(a, b):
# print a, b
if a == b:
return 0
if a.startswith(b) == 0:
return 1
else:
return -1
# my CMP... Comparing the first letter is not enough, IMHO.
@brunobord
brunobord / gist:1333685
Created November 2, 2011 13:56
Chained string transformations
### My question is: is this solution elegant enough?
### I mean: if I'm adding several other functions to "clean" my "cell", will it still be "Pythonic"?
### e.g.: for f in (func1, func2, func3, func..): stuff = f(stuff)
def strip(cell):
return cell.strip()
def removedblspaces(cell):
return u' '.join(cell.split())
@brunobord
brunobord / le Cod
Created November 10, 2011 13:52
blagounette à deux zeuros
Oh troll, oh désespoir, oh java ennemi
N'ai-je donc tant codé que pour cette infâmie ?
Et me suis-je commit dans des hacks réguliers
Que pour voir en un bug flétrir tant de guillemets ?
@brunobord
brunobord / .sublime-keymap
Created May 24, 2012 08:52
SublimeText2 macro and key binding for quickly wrapping text at 80 columns
/**
* wrap_line command will use the "rulers" settings to calculate le line width.
*/
[
{ "keys": ["alt+q"], "command": "wrap_line"}
]
@brunobord
brunobord / *.sublime-keymap
Created May 24, 2012 08:40 — forked from n1k0/*.sublime-keymap
SublimeText2 macro and key binding for quickly wrapping text at 80 columns
/**
* Sample key binding (emacs users will hate it, but they're probably not using SublimeText2)
*
*/
[
{ "keys": ["ctrl+w"], "command": "run_macro_file", "args": {"file": "Packages/User/Quick Wrap.sublime-macro"}}
]
@brunobord
brunobord / server.go
Created October 5, 2015 10:33
A humble replacement to the famous Python SimpleHTTPServer in Go
// A humble replacement to the famous Python SimpleHTTPServer
package main
import (
"flag"
"fmt"
"log"
"net/http"
)
@brunobord
brunobord / ola.py
Created June 22, 2012 09:26
Olà in Python / ASCII art
#!/usr/bin/env python
#-*- coding: utf-8 -*-
import os
import time
def cls():
os.system(['clear', 'cls'][os.name == 'nt'])
figure_repos = '.o.'