Random Notes – Noah.org

Random Notes – Noah.org.

Oracle JDBC Debugging

You will need the _g version of the jdbc driver, the standard jdbc drivers don’t support enabling logging.

In order to get some low level debugging from the Oracle JDBC drivers you need some java util logging magic.  I am not sure if this is just because our app uses SLF4J and LOG4J, but I had to add the following environment variables to the jsw wrapper.con file.  I could not get the logging working without all 3 of those lines

wrapper.java.additional.6=-Doracle.jdbc.Trace=true
wrapper.java.additional.7=-Djava.util.logging.configureByLoggingPropertiesFile=true
wrapper.java.additional.8=-Djava.util.logging.config.file=/tmp/OracleLog.properties

And then the contents of the OracleLog.properties file are:

handlers = java.util.logging.FileHandler
java.util.logging.FileHandler.pattern = /tmp/jdbc.log
java.util.logging.FileHandler.formatter = java.util.logging.SimpleFormatter
oracle.jdbc.driver.level = FINE

But the problem is that all I actually wanted was the OracleDriver connect entries to find out how long a connection was taking to construct.  Time for some grep magic I think.

Unfortunately I am restricted to java 6 for this particular installation and so the log file outputs entries on more than one line so its harder to parse.

 

 

How to Start Your Reply on Top in Mozilla Thunderbird – About Email

This was really bugging me – too easy.

How to Start Your Reply on Top in Mozilla Thunderbird – About Email.

Install Google Chrome in Ubuntu 14.04 / 13.10 / 12.04 PPA

Install Google Chrome in Ubuntu 14.04 / 13.10 / 12.04 PPA.

wireless – Ubuntu 13.10 – Wifi not re-connecting after suspend – Ask Ubuntu

wireless – Ubuntu 13.10 – Wifi not re-connecting after suspend – Ask Ubuntu.

Install Evolution 3.10.x Mint 16

Even with the ubuntu updates repo from the gnome 3 team, there are still some dependency mismatches.  I know this is risky, so repeat at your own risk, but so far its worked for me.
sudo -E add-apt-repository ppa:gnome3-team/gnome3
sudo apt-get update
Force the update of the libwebkitgtk packages that Evolution 3.10 requires.  You must install all 3 dependencies at once!

sudo apt-get install libwebkitgtk-3.0-common=2.3.2-1ubuntu6~saucy1  libjavascriptcoregtk-3.0-0=2.3.2-1ubuntu6~saucy1 libwebkitgtk-3.0-0=2.3.2-1ubuntu6~saucy1

sudo apt-get install evolution evolution-dbg evolution-ews

WARNING: You should disable the gnome3 ppa after this as doing a dist-upgrade with this repo breaks wifi!

How to Install RabbitVCS for Nemo in Linux Mint Cinnamon | UbuntuHandbook

How to Install RabbitVCS for Nemo in Linux Mint Cinnamon | UbuntuHandbook.

Sorry Shrew, back to VPNC I go!

Shrew VPN does not seem to handle Cisco 2 factor authentication, specifically the “Next Token Code”.   See my previous post …. Goodbye VPNC, hello Shrew VPN Client

Whereas VPNC handles it quite nicely (from the command line)

I even integrated a bit of expect and zenity to prompt me for my next token from my phone.

#!/usr/bin/expect
set password "MyPassword"
set token [exec zenity --entry --title "VPN" --text "Soft Token" --hide-text]

set timeout -1
match_max 100000

spawn sudo vpnc --local-port 0 /etc/vpnc/corp.vpnc

expect "Enter password for"
send "$token\r";

expect "Password for VPN"
send "$password\r";

expect "Connect Banner:"
wait;

interact

Building a Bunk Bed for Tom

Based on plans from http://woodgears.ca/bed/bunk_bed/plans.html

I produced metric plans that I am going to use to build Tom a new bed.  Tom wants to paint it orange, purple and green.

main

Bunk Bed Plans

How to Install Google Sketchup 2013 on Linux Mint 16

The same instructions work for Linux Mint 15 / 16.  However it seems that the 2014 version of Sketchup does not work on Mint 16, luckily I still had the 2013 version of the SketchUpWEN.exe file.

How to Install Google Sketchup 2013 Ubuntu 13.04 | UbuntuHandbook.

 

I have uploaded the 2013 version to my google drive.  You can download it