Blog
log4net.config filtered logging for only one class
Posted by Damien on Mon Nov 3 19:20:13 UTC 2008 Filed under:I found this technique useful because I have so much output sometimes that it is difficult to find the specific area that I am working in. So by putting a DenyAllFilter at the end of your filter chain, you can narrow what you have to hunt through when looking for debug output.
How to: find and replace in files, inline and on command line
Posted by Damien on Mon Oct 6 22:57:39 UTC 2008 Filed under:Here is a quick and dirty way to change a bunch of files, be careful :)
$ find . -name trac.ini | xargs -d'\n' sed -i "s/smtp_enabled = false/smtp_enabled - true/g"
UPDATE:
Here is a much cleaner way to do the search / replace part:
$ replace foo bar -- *
How to: set your default remote Display
Posted by Damien on Thu Sep 18 21:07:58 UTC 2008 Filed under:on your computer, do "xhost +"(less secure) or "xhost +<remote host>" (more secure)
then on other host do: echo "export DISPLAY=<your host>:0.0" >> ~/.bashrc
How to: call ms sql server stored procedure from jdbc
Posted by Damien on Wed Sep 17 22:55:40 UTC 2008 Filed under:Recently, I needed to call a stored procedure with parameters for some debugging purposes. I use DbVisualizer, an awesome product, and with the SQL Commander utility I can write sql to any db that supports JDBC which is awesome because most do. Here is how you can call a stored proc from straight SQL over JDBC:
{call pr_MyProcedureName @VarEndYear = 2007, @VarStartyear = 2005}
How to: restore recursive driectory execute permissions
Posted by Damien on Wed Sep 10 17:59:32 UTC 2008 Filed under:Recently, a colleague did a "chmod -R 644" on a web directory and all the sub directories lost the execute bit, rather than simply doing a recursive chmod +x on everything, a little googling and a little spice e voila, le executionaire directoriamont fixurature:
find . -type d -exec chmod +x {} \;
Drupal svn source control notes
Posted by Damien on Wed Sep 3 23:38:22 UTC 2008 Filed under:Here are some commands we used to get a drupal site version controlled:
svnadmin create /var/svn/repos/blowfish
sudo chown -R www-data:www-data /var/svn/repos/blowfish
svn co https://skullsquad.com/svn/blowfish
cd blowfish
mkdir trunk
mkdir branches
mkdir tags
svn add trunk branches tags
svn commit -m "initial svn repo layout"
cd trunk
mkdir files
mkdir modules
mkdir themes
svn add files modules themes
svn commit -m "initial drupal layout"
How to: tell what vesion of version of mono-addins
Posted by Ben on Thu Aug 28 18:25:55 UTC 2008 Filed under:pkg-config --modversion mono-addins
Update to javascript preserve new lines (e.g. in Trac)
Posted by Damien on Wed Aug 27 22:39:51 UTC 2008 Filed under:We've use and love Trac here at Skull Squadron, however we sorely miss our carefully entered newlines and have always wanted to preserve our precious whitespace.
Because I'm not an awesome python programmer, it was easier for me to just put a post render, client-side javascript fix to simply convert the newlines which were preserved in sourcecode into <br/> tags.
Submit Ticket ConsoleBufferAppender log settings
Posted by Ben on Wed Aug 27 20:42:29 UTC 2008 Filed under:If you want to configure your logging such that it will add the last N entries into tickets submitted into Trac, add this appender to your log4.net.config file:
How to: get your bluetooth mouse working in Ubuntu 8.04
Posted by Ben on Wed Aug 27 18:27:32 UTC 2008 Filed under:This thread on the Ubuntu forums worked for me: http://ubuntuforums.org/showpost.php?p=4618441&postcount=3
