jarnaldich


Member since 02/21/2008

14 snippets

551 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 130 posted 8 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 222 posted 9 years ago by jarnaldich
Turn a string LikeThis into like_this
1 61 posted 9 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 119 posted 9 years ago by jarnaldich
Searches down the current directory every file whose name matches (case insensitively) {{file_pattern}} for the regexp {{text}}.
0 75 posted 9 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 81 posted 9 years ago by jarnaldich
Centering a div with css is easy, but there are some compatibility quirks...
1 98 posted 11 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 146 posted 12 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 120 posted 12 years ago by jarnaldich
Reading the contents of a whole file as a string.
0 89 posted 12 years ago by jarnaldich
Useful for speeding up searches.
1 101 posted 12 years ago by jarnaldich
MySQL backup and restore example through mysqldump / mysql command line utilities.
3 91 posted 12 years ago by jarnaldich
Example of serializing a lisp variable.
0 88 posted 12 years ago by jarnaldich
« Prev 1 Next »