Read Differences between Arithmetic, Geometric, and Harmonic Means…
Category Archives: Programming
Preserving file modification time in Subversion (svn)
Today I found this thread from which I learned:
svn co --config-option config:miscellany:use-commit-times=yes https://example.com/svn/repo/proj
You can also set the option in your svn config, but you probably don’t want to do that.
Multiline strings in JavaScript
Read an interesting article about multiline strings in JavaScript over on Stack Overflow, which referenced the Google JavaScript Style Guide which I thought was interesting.
Multilingual capitalisation regular expression (regex)
Found a cool regex over here that would find capital letters across languages. Couldn’t get it to work in JavaScript though…
^([\p{Lu}\p{Lt}]\p{Ll}+)+$
pr_comment.c
Found a cool old program: pr_comment.c…
Get just the filename with grep (note: sed not required!)
To just print the filename that matches a grep expression, without the matched text, use the -l (lowercase L) command-line arg. So e.g.:
grep -Rl 'jsphp.co[^m]' .
Installing latest version of Scala on Debian
So this is basically a combination of this and this:
sudo apt-get purge scala sudo apt-get autoremove cd ~/desktop/scala wget http://downloads.lightbend.com/scala/2.11.8/scala-2.11.8.tgz tar xzf scala-2.11.8.tgz sudo mv scala-2.11.8 /usr/share/scala sudo ln -s /usr/share/scala/bin/scala /usr/bin/scala sudo ln -s /usr/share/scala/bin/scalac /usr/bin/scalac sudo ln -s /usr/share/scala/bin/fsc /usr/bin/fsc sudo ln -s /usr/share/scala/bin/sbaz /usr/bin/sbaz sudo ln -s /usr/share/scala/bin/sbaz-setup /usr/bin/sbaz-setup sudo ln -s /usr/share/scala/bin/scaladoc /usr/bin/scaladoc sudo ln -s /usr/share/scala/bin/scalap /usr/bin/scalap
Everything is easy when you know how!
Getting Started with Scala
Today I read Getting Started with Scala.
SQL Injection Cheat Sheet
Some notes on SQL injection…
