Skip to content

Instantly share code, notes, and snippets.

@adeleinr
adeleinr / Web product guidelines
Created November 5, 2009 23:00 — forked from leah/Web product guidelines
A Web Product's Must Do
- simple
- public over private
- personal vanity
- internet is global
- permalinks
- one important item per page
- don't break the browser
- don't wanker in technology
- a medium is not a grande
- break convention for your users
@adeleinr
adeleinr / Eclipse Cheatsheet
Created April 16, 2010 05:35
Eclipse Cheatsheet
Find a file quickly -> Ctrl Shift R
Move to previous/next used files -> alt+arrow keys
Open Declaration -> F3
Open Call Hierarchy -> Ctrl+Alt+H
Organize Imports -> Ctrl+Shift+O
Reformat source -> Ctrl+Shift+F
@adeleinr
adeleinr / PHP Cheatsheet
Created April 16, 2010 05:37
PHP Cheatsheet
Installing apc in LAMP and WAMP
-WAMP sucks, no APC binary/dll for windows found anywhere for the newest versions of PHP ie php 5.3. And yes, the APC binary must match exactly the php version duh!
-LAMP was easy, just get APC from yum install
Setting up vhosts in LAMP
-Add vhost usual syntax to httpd.conf
@adeleinr
adeleinr / Github Cheatsheet
Created April 16, 2010 05:39
Github Cheatsheet
http://learn.github.com/
git merge orgin/master
git pull origin master
git push
git fetch origin (Fetch changes from origin Git server to master branch of local repository)
git merge origin/master (Merge changes from origin/master branch to master branch of local repository)
@adeleinr
adeleinr / Django Cheatsheet
Created April 16, 2010 05:43
Django Setup Cheatsheet on Ubuntu
Django Setup Cheatsheet on Ubuntu
$ sudo apt-get install python-django
$ sudo apt-get install mysql-server
$ sudo apt-get install python-mysqldb
$ mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
@adeleinr
adeleinr / Vim Cheatsheet
Created April 16, 2010 05:45
Vim Cheatsheet
general
/ Finds a word forwards
? Finds a word backwards
Shift + g Goes to end of file
Shift + m Goes to Middle of screen
Shift + h Goes to the Top of the screen
Shift + l Goes to Bottom of the screen
. Repeat last command
:f Displays line and file name
@adeleinr
adeleinr / SSH Tunneling
Created April 16, 2010 05:46
SSH Tunneling Cheatsheet
SSH Check Public/Private Key
============================
ssh-add -L => What keys are being accessed
ssh-add ssh-add ~/.ssh/adeleinr/id_rsa => Tell it to add key in different directoy
SSH Tunneling
=============
local$ ssh-keygen -t dsa
local$ scp ~/.ssh/id_dsa.pub remote
@adeleinr
adeleinr / Screen Cheatsheet
Created April 16, 2010 05:47
Screen Configuration & Cheatsheet
screen Configuration & Cheatsheet
Sample .screenrc file:
Here is an example .screenrc:
hardstatus alwayslastline
hardstatus string ‘%{= kG}[ %{G}%H %{g}][%= %{=kw}%?%-\
Lw%?%{r}(%{W}%n*%f%t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}]\
[%{B}%Y-%m-%d %{W}%c %{g}]‘
screen -t Development1 0
@adeleinr
adeleinr / Linux Commands Cheatsheet
Created April 16, 2010 05:49
Linux Commands Cheatsheet
#Big grep
find Members/ -type f -print0 | xargs -0 grep "examplestring"
#grep line plus its context (1 line before 3 lines after)
grep -A 3 -B 1 “patter” filename
#10 biggest files in a directory
du -a /var | sort -n -r | head -n 10
#Get a column from a file
@adeleinr
adeleinr / Chrome Cheatcheet
Created April 16, 2010 05:52
Chrome Cheatsheet
Shift+Esc Brings Up Tab manager
Ctrl + Shift + T Undo closed tab
Ctrl + 1,2,3,..etc Brings up the first tab, 2nd, 3rd tab..etc
Ctrl + l Goes to the address bar
Ctrl + w Closes the current tab