ssh-keygen -t rsa -C ""
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_rsa
ps aux #list all processes
kill << pid>> #kills pid without sudo
kill <<pid>> -9 #kills pid if previous doesnt' work
top #shows the processes taking the max amount of resources
grep -R "<<search-term>>" <<path here>> #Searches the entire folder recursively for the search term
sudo scutil --set HostName <<hname>>#updates hostname in terminal
alias l=ls #Set l as ls
export PS1='\u@\h: ' #hides path
export PS1='> ' #super minimalistic only shows ">"
2w move two words forward
3b move two words backword
$ move to eol
0 move to behining of line
:set paste while copying indentation
:set nopaste after copying indentation
2< two unindent
3> 3 indents
o to create new line
#ctrl+- or cmd+- works to zoom on windows/mac
" down
% up
n , p , x , c traverse
Built in objects
type(objectname) #Built in
inspect.getmembers(object) #will return all class members of object
** bold **
* italics *
~~ strikethrough~~
1.one
2.two
1.three but one
4.oho
-unordered here
+and here too
ok = 33
ok=ok+30
Quotes here , length = infinity
git config --global user.name "anderson"
git config --global user.email ""
git config --global color.ui auto
git config --global alias.ci commit
ssh -T [email protected]
git add *
git rm
git commit -m ""
git push
git branch branchname
git checkout branchname
git pull origin branchname
After .gitignore file
git rm -r --cached .
git add .
git ci -m "Removed all unecessary files"
git remote add origin [email protected]:andersonpaac/cheats-hax.git
git push -u origin master
heroku login
heroku keys:add
heroku git:remote -a <APPNAME>
git push heroku master
heroku run rake db:migrate
sudo nano /etc/modprobe.d/8192cu.conf
options 8192cu rtw_power_mgnt=0 rtw_enusbss=0
arp -a -i bridge100 | grep -v "incomplete" #Discovery on interface bridge100
wpa_cli reconfigure wpa_cli status #status
nmap -sS -O 192.168.0.1-255 #OS detection + port scan
nmap -sn 192.168.1.100-140
#List programs and ports being used
lsof -i -P | grep -i "listen"
sudo su - postgres #logs in postgres pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start
CREATE DATABASE dbname;
CREATE USER uname WITH PASSWORD 'thispass';
CREATE TABLE MASTER(
ID PRIMARY KEY NOT NULL,
SYM TEXT NOT NULL,
VAL REAL);
INSERT INTO TABNAME VALUES(0,'HELLO',234);
\d # Gives description
\q # Quits
\d tablename #Gives tablename definition
Adding a column will require a default value , constraints can be given as well with the alter command
ALTER TABLE master ADD COLUMN exchange text NOT NULL DEFAULT 'NYSE';
UPDATE master SET exchange='NASDAQ' where id='AAPL';