Saturday, April 30, 2011

View table details in MySQL

show table status like 'yourtablename';

Will display info on row_count, auto_increment value, etc. Handy.

Friday, April 29, 2011

View utf-8 values in mysql

mysql --default-character-set=utf8 -uroot -pbondaxe dataviews_production

Without the --default-character-set "Ã…landsbanken" will look like "�landsbanken"

Monday, April 18, 2011

Chrome asks permission every time i open a link. WTF?

Finally found a fix for this really annoying issue:
  1. open %USERPROFILE%\AppData\Local\Google\Chrome\Application
  2. right click chrome.exe and choose Properties
  3. Compatibility tab
  4. Change Settings for All Users
  5. un-check Run as Administrator
  6. restart chrome

    Bear Mountain Hike

    What I didn't bring and learned I needed.  We had a very wet & cold overnight hike at bear Mountain this weekend. Being my first event of this type I was a little under prepared. Thankfully Antonio and Brownie had enough foresight to bring the following.
    1. A folding bow saw. This was truly indispensable for cutting green wood. Even the dead stuff was soaked pretty good. 
    2. Sleeping pad. The bottom of the tent was freezing & damp, I think a water resistant sleeping pad would have made a huge difference. A synthetic rather than down sleeping bag would have been a much wiser choice when you know the rain is coming. Synthetic keeps you warm when wet, down although lighter is useless when soaked.
    3. Fire starter. Cotton balls covered in Vasoline is a great homemade solution - thanks Antonio.
    4. A tarp. Having a communal shelter over the fire made a huge difference. 4 people hanging out in a 2.5 person tent for 5 hours would have been brutal if not impossible.
    5. A little more water. I ran out on the hike back, my 3 liters should have been 4.
    6. Gloves. Cold & rain is tough on the digits.
    7. Waterproof matches for obvious reasons.
    A few pictures from my phone. I need to bring a proper camera next hike, maybe flip video too.

    Configure Git Commit Email

    1. Verify sendmail is installed
    2. Execute the following git commands on the repo sending the email notification. Note: some of these config settings may be superfluous.
    $ git config --global sendemail.smtpserver
    $ git config --global sendemail.smtpserverport 25
    $ git config --global
    $ git config --global "BFI GIT"
    $ git config --global
    $ git config --global sendemail.smtpuser
    $ git config --global sendemail.smtppass
    $ git config --global hooks.mailinglist
    $ git config --global hooks.envelopesender
    $ git config --global hooks.emailprefix [GIT]

    3. In the /hooks directory of your bare repository (.git/hooks in a non-bare repo) copy/rename post-receive.sample to post-receive.

    4. Edit post-receive and add the following line (your path to post-receive-email may be different)
    . /usr/share/doc/git/contrib/hooks/post-receive-email

    5. Edit the description file in your repo (.git/description in a non-bare repo) and replace the text with the name of your project. The text in the description file will show up in the subject line of the commit email.

    Friday, April 15, 2011

    Oracle: Select column names for a specific table

    select distinct column_name from all_tab_columns
    where table_name = upper('country')
    order by column_name asc

    Wednesday, April 6, 2011

    Auto indent in vim

    1. + g to see how many lines in the file (if you don't have line numbers turned on)
    2. n== (where n is the number of lines from step 1)
    3. you're beautified!

    Sunday, April 3, 2011

    Push a pre-existing repo to an already created heroku app

    Say your buddy created an app on heroku but you've been working on the same code directly from github, when it comes time to push from your local repo to github you'll need to:
    git remote add heroku
    then you can
    git push heroku