-
Contact Me
hopperab@gmail.com
(617) 575-9467
facebook.com/andrewhopper twitter.com/andrewhopper
linkedin.com/in/andrewhopper
-
Twitter Updates
Archives
Tags
beautiful soup beautifulsoup dns dns troubleshooting google docs linkedin linux screen command line macbook pro hard drive upgrade harddisk upgrade nslookup python scraping screen scraping Security vi vim-
Recent Posts
-
Stackoverflow
-
Serverfault
Author Archives: Andrew Hopper
Postgres Update from function
I always forgot the syntax of the Postgresql update from functionality
UPDATE employees SET sales_count = sales_count + 1 FROM accounts
WHERE accounts.name = 'Acme Corporation'
AND employees.id = accounts.sales_person;
Posted in Postgresql Leave a comment
Screen keyboard shortcuts
Screen is an amazing little utility that allows you to have multiple sessions going within one terminal session.
Here’s a link to the man page - http://man.cx/screen
Here’s a quick cheatsheet borrowed from http://www.pixelbeat.org/lkdb/screen.html
Key
Action
Notes
Ctrl+a c
new window
Ctrl+a n
next window
I bind F12 to this
Ctrl+a p
previous window
I bind F11 to this
Ctrl+a “
select window from list
I have window list in the status line
Ctrl+a [...]
Learn VIM in 5 Minutes
I found a great Stack Overflow question on learning VIM here @
http://stackoverflow.com/questions/2573/vim-tutorials
VIM 5 Min Tutorial
"Here is your 5 minute tutorial. The easiest way to learn vi is to know what the letters stand for:"
y(ank) - copy
d(elete) - delete
c(hange) - change
p(aste) - put from buffer after cursor
o(pen) - start a new line
i(nsert) - insert before current [...]
Macbook Pro Hard Drive Replacement