This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#create a gist | |
#setting up sshd on Ubuntu 10.10 | |
sudo apt-get install openssh-client openssh-server | |
# create the keys | |
sudo ssh-keygen -b 1024 -t rsa1 -f /etc/ssh/ssh_host_rsa_key -N "" | |
sudo ssh-keygen -b 1024 -t dsa -f /etc/ssh/ssh_host_dsa_key -N "" | |
sudo ssh-keygen -b 521 -t ecdsa -f /etc/ssh/ssh_host_ecdsa_key -N "" | |
#give permissions to the key files |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo netstat -lnp --inet |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# some help | |
# http://www.linuxized.com/2010/05/switching-from-gnu-screen-to-tmux/ | |
# http://blog.hawkhost.com/2010/07/02/tmux-–-the-terminal-multiplexer-part-2/#modifying-tab-color | |
# Set the prefix key to Cntrl+a | |
unbind C-b | |
set-option -g prefix "C-a" | |
bind-key "C-a" send-prefix | |
# Set status bar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo dpkg --get-selections | |
# dpkg --list | |
# dpkg --info packageName | |
# apt-get remove packageName |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"Set up searching | |
set incsearch | |
set ignorecase | |
set smartcase | |
"Always have some padding on scrolling | |
set scrolloff=2 | |
"turn on sytnax highlighing by default | |
syntax on |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ln -sf /usr/lib/python2.7/dist-packages/OpenSSL lib/python2.7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get install python-software-properties | |
sudo add-apt-repository "deb http://build.discursive.com/apt/ lucid main" | |
sudo apt-get update | |
sudo apt-get install maven |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns 14x L1 cache | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
Compress 1K bytes with Zippy 3,000 ns | |
Send 1K bytes over 1 Gbps network 10,000 ns 0.01 ms | |
Read 4K randomly from SSD 150,000 ns 0.15 ms | |
Read 1 MB sequentially from memory 250,000 ns 0.25 ms | |
Round trip within same datacenter 500,000 ns 0.5 ms |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
framework "Quartz" | |
# Available Categories: | |
=begin | |
KCICategoryDistortionEffect - Distortion effects, such as bump, twirl, hole | |
KCICategoryGeometryAdjustment - Geometry adjustment, such as affine transform, crop, perspective transform | |
KCICategoryCompositeOperation - Compositing, such as source over, minimum, source atop, color dodge blend mode | |
KCICategoryHalftoneEffect - Halftone effects, such as screen, line screen, hatched | |
KCICategoryColorAdjustment - Color adjustment, such as gamma adjust, white point adjust, exposure | |
KCICategoryColorEffect - Color effect, such as hue adjust, posterize |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
framework "Quartz" | |
puts "Image I/O Input Formats:" | |
can_read_from = CGImageSourceCopyTypeIdentifiers() | |
CFShow(can_read_from) | |
puts " " | |
puts "Image I/O Output Formats:" | |
can_write_to = CGImageDestinationCopyTypeIdentifiers() | |
CFShow(can_write_to) |
OlderNewer