Latest 100 public snipts »
lucastheis's
snipts
showing 1-5 of 5 snipts
-
∞ SSH via TOR using SOCAT
# start TOR tor # create tunnel socat TCP-LISTEN:<port> SOCKS4A:localhost:<host>:22,socksport=9050 # login through local tunnel ssh <user>@localhost -p <port>
-
∞ GPG Basics
# generate key gpg --gen-key # export public key in ASCII format gpg --export -a <username> > <filename> # import public key gpg --import <filename> # remove public key gpg --delete-key <username> # list all public keys gpg --list-keys # encrypt file gpg --encrypt --recipient <username> <filename> gpg -e -r <username> <filename> # decrypt file gpg --decrypt <filename> gpg -d <filename> # add email address gpg --edit-key <username> adduid # sign public key gpg --sign-key <username> # list signatures gpg --list-sigs [<username>] # receive keys from server using key ids gpg [--keyserver <server>] --recv-keys <keyid> # send signed key gpg [--keyserver <server>] --send-key <keyid> # update already received keys gpg [--keyserver <server>] --refresh-keys
-
∞ Line Spacing
% include package \usepackage{setspace} % use one of the following \singlespacing \onehalfspacing \doublespacing \setstretch{3}
-
∞ Amazon EC2 Basics
# list available amazon machine images (AMIs) ec2-describe-images -o amazon ec2-describe-images -a # boot instance ec2-run-instances <ami-id> -k <keypair-file> # list running instances ec2-describe-instances # open/close ports on virtual server (open port 22 for ssh) ec2-authorize default -p <port> ec2-revoke default -p <port> # log into instance ssh -i <keypair-file> root@ec2-<address>.compute-1.amazonaws.com # shut down instance ec2-terminate-instances i-<instance-id>
-
∞ Git Basics
# init a git repository git init # add file to repository git add <filename> # remove file from repository but not from working dir git rm --cached <filename> # commit all changes git commit -a -m <message> # change to previous revision git checkout <revision> # give current revision a name git tag <name> # create new branch git branch <branch> # switch to branch git checkout <branch> # checkout remote repository git clone <url> # checkout changes from remote repository git pull # list all files under version control git ls-files


