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.
Monthly Archives: April 2016
Comments per page in WordPress
Today I wanted to change the number of comments per page from 20 to 200 but I didn’t know how. Turns out you can adjust this by clicking ‘Screen Options’ (top right) and picking a new value.
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…
Linux/POSIX username conventions
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]' .
svn propset svn:executable on my-script
To mark a file in svn as executable:
svn propset svn:executable ON my-script
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.
How to escape @ characters in Subversion file names?
Found how to escape @ characters in Subversion managed file names?. The short answer is that you add an extra ‘@’ character at the end of the file name…