This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# remove everything after -- /****** | |
sed -i "/-- \/\*\*\*\*\*\*\*/q" $1 | |
# append the content of files named in lines beggining with "-- append " | |
sed -n "/^-- append / s%^-- append \(.*\)$%cat \$(cygpath '\1') >> $1; echo >> $1% p" < $1 | sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// TortoiseSVN Diff script for Word Doc files | |
// | |
// Copyright (C) 2004-2008 the TortoiseSVN team | |
// This file is distributed under the same license as TortoiseSVN | |
// | |
// Last commit by: | |
// $Author$ | |
// $Date$ | |
// $Rev$ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
find ./ \( -name *.cpp -o -name *.h -a ! -name version.h \) -exec ./markupfile.bash "{}" \; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
localdir=$(dirname $0) | |
gen=$(realpath $localdir/../Generation_Int) | |
files=$localdir/tocopy | |
copy_debug() | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
KBD FHI01 "Français - Custom" | |
COPYRIGHT "(c) 2012 FRANCE TELECOM" | |
COMPANY "FRANCE TELECOM" | |
LOCALENAME "fr-FR" | |
LOCALEID "0000040c" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from PIL import Image | |
import PIL.ImageOps | |
import glob | |
for f in glob.glob('./*.bmp'): | |
image = Image.open(f).convert("RGB") | |
inverted_image = PIL.ImageOps.invert(image) | |
inverted_image.save(f) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#lang s-exp framework/keybinding-lang | |
(keybinding "?:c:m:l" (λ (editor evt) (send editor insert "λ"))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import urllib | |
import os | |
import lxml.html | |
import re | |
doc = lxml.html.parse("http://www.assemblee-nationale.fr/qui/xml/liste_alpha.asp?legislature=11").getroot() | |
doc.make_links_absolute() | |
birth = re.compile('[0-9][0-9]?e?r? \\S+ [0-9]{4}') | |
name = re.compile('<[Hh]1[^>]*?>(.*?)</[Hh]1>') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
find -name *.txt | grep "[0-9]\{8\}-[0-9]\{6\}\.[0-9]\{3\}" | sed -n "s/\(^.*\)[0-9]\{8\}-[0-9]\{6\}\.[0-9]\{3\}-\(.*$\)/mv '&' '\1\2'/p" | sh | |
i=2 | |
while (( $i<10 )) | |
do | |
find -name "*\[0$i\].txt" | sed -n "s/\(^.*\)\[0$i\]\(\.txt$\)/cat '&' >> '\1\2' \&\& rm '&'/p" | sh | |
let "i++" | |
done | |
find -name *.txt -print0| xargs -0 sed -i~ -f ./cmp.sed |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// -*- javascript -*- | |
// utility functions | |
if (!Array.prototype.reduce) | |
{ | |
Array.prototype.reduce = function(fun /*, initial*/) | |
{ | |
var len = this.length; | |
if (typeof fun != "function") | |
throw new TypeError(); |
OlderNewer