a
enter into insert mode after the character your cursor is on
A
enter into insert mode at the end of the current line
# This is a programming chellenge from David Bock's series | |
# "What Computer Scientists Know". This is a problem that can | |
# be used to discuss a bunch of computer science topics, but | |
# as I'm providing most of the skeleton of the solution, the | |
# point of this exercise is to demonstrate 'recursive backtracking'. | |
# http://en.wikipedia.org/wiki/Backtracking | |
# this problem is based on the classic 'triange peg game', a common | |
# sight in roadside diners in America, in particular, Cracker |
require 'io/console' | |
# Reads keypresses from the user including 2 and 3 escape character sequences. | |
def read_char | |
STDIN.echo = false | |
STDIN.raw! | |
input = STDIN.getc.chr | |
if input == "\e" then | |
input << STDIN.read_nonblock(3) rescue nil |
This is a collection of the most common commands I run while administering Postgres databases. The variables shown between the open and closed tags, "<" and ">", should be replaced with a name you choose. Postgres has multiple shortcut functions, starting with a forward slash, "". Any SQL command that is not a shortcut, must end with a semicolon, ";". You can use the keyboard UP and DOWN keys to scroll the history of previous commands you've run.
http://www.postgresql.org/download/linux/ubuntu/ https://help.ubuntu.com/community/PostgreSQL