jarnaldich


Member since 02/21/2008

14 snippets

4358 profile views

0 Comment(s) Posted

View their favorites

Profile

Achievement

first submission:submitting first snipplet

jarnaldich's Recent Snippets



« Prev 1 Next »
Making a python process exit with error code 1 after 30 seconds. Exit is unclean (no garbage is collected, no flushed buffers, etc...).
0 1188 posted 12 years ago by jarnaldich
Sometimes (ex. django templates section at setting.py), a function expects an absolute path, but it's more practical when developing to refer it to the current file position in our code base. The rel function does exactly that.
0 1338 posted 13 years ago by jarnaldich
Turn a string LikeThis into like_this
1 730 posted 13 years ago by jarnaldich
replace foo -> bar in all .txt files down the tree Dunno why, the syntax highlighter adds \3's to the code. Try plain text.
0 1027 posted 14 years ago by jarnaldich
Searches down the current directory every file whose name matches (case insensitively) {{file_pattern}} for the regexp {{text}}.
0 746 posted 14 years ago by jarnaldich
To rename a bunch of files from "*.foo" to "*.bar" (like windows' REN *.foo *.bar) in unix. Looking at the solution, it is easy to adapt it to more powerful character substitutions on a 1 to 1 basis. If you want to test what will be executed b...
0 889 posted 14 years ago by jarnaldich
Centering a div with css is easy, but there are some compatibility quirks...
1 981 posted 15 years ago by jarnaldich
Imports data from CSV (excel-compatible format) into MySQL. Also check the mysqlimport utility and the complementary SELECT ... INTO OUTFILE.
4 1117 posted 16 years ago by jarnaldich
Given an an associative list ((k1 . v1) (k2 . v2) ... (kn . vn)), with possibly equal values for ki, it returns another alist where all cells have distinct keys and where values originally associated to the same key have been grouped as a list in the...
1 984 posted 16 years ago by jarnaldich
Reading the contents of a whole file as a string.
0 874 posted 16 years ago by jarnaldich
Useful for speeding up searches.
1 1041 posted 16 years ago by jarnaldich
MySQL backup and restore example through mysqldump / mysql command line utilities.
3 832 posted 16 years ago by jarnaldich
Example of serializing a lisp variable.
0 878 posted 16 years ago by jarnaldich
« Prev 1 Next »