Compare commits

...

18 Commits
2.1.1 ... 2.1.3

Author SHA1 Message Date
be2cb6e632 Version 2.1.3
- Added new cheatsheets
- Appended to `.gitignore`
2015-01-05 20:44:25 -05:00
426b0aaa0d Merge pull request #197 from thylong/gzip
Add cheat for gzip
2015-01-05 20:39:35 -05:00
9041c57d21 Merge pull request #200 from poliveira89/new_cheatsheets
New cheatsheets
2015-01-05 20:38:19 -05:00
1dd9d85509 Merge branch 'gzip' of github.com:thylong/cheat into gzip
Conflicts:
	cheat/cheatsheets/gzip
2015-01-04 13:24:52 +01:00
9506167af8 Add cheat for gzip 2015-01-04 13:23:47 +01:00
03bb651bf0 Version bump 2014-12-29 21:45:46 -05:00
c4a5ca3900 Merge pull request #198 from thylong/ssh_forward
Update cheat ssh
2014-12-29 21:37:39 -05:00
03b587f538 Merge pull request #196 from Mic92/patch-7
ss
2014-12-29 21:36:59 -05:00
e4d7722476 Merge pull request #195 from Mic92/master
ping6
2014-12-29 21:36:18 -05:00
3807aa5433 Merge pull request #194 from Mic92/patch-6
smbclient
2014-12-29 21:35:40 -05:00
956ce7fadd Update cheat ssh 2014-12-26 15:57:01 -05:00
57876ed0e7 Add cheat for gzip 2014-12-26 15:46:48 -05:00
58abb16ca1 ss 2014-12-24 21:42:16 +01:00
54e30022f0 ping6: fix typo 2014-12-24 18:08:56 +01:00
c412cd0534 ping6 2014-12-24 12:15:03 +01:00
2d67038188 smbclient 2014-12-24 12:13:29 +01:00
61458933eb SSH cheatsheet updated: support for SSH tunnels between local host and remote host 2014-11-22 17:15:51 +00:00
6f579f9234 New cheatsheet added: support for Bower (frontend package manager) 2014-11-22 17:09:58 +00:00
9 changed files with 79 additions and 2 deletions

2
.gitignore vendored
View File

@ -1,2 +1,4 @@
*.pyc
MANIFEST
build
dist

View File

@ -38,7 +38,7 @@ from docopt import docopt
if __name__ == '__main__':
# parse the command-line options
options = docopt(__doc__, version='cheat 2.1.1')
options = docopt(__doc__, version='cheat 2.1.3')
# list directories
if options['--directories']:

26
cheat/cheatsheets/bower Normal file
View File

@ -0,0 +1,26 @@
# Install a package locally
bower install <package-name>
# Install a package locally directly from github
bower install <user>/<repo>
# Install a specific package locally
bower install <package-name>#<version>
# Install a package locally and save installed package into bower.json
bower install <package-name> --save
# Retrieve info of a particular package
bower info <package-name>
# List local packages
bower list
# Search for a package by name
bower search <package-name>
# Update a package to their newest version
bower update <package-name>
# Remove a local package
bower uninstall <package-name>

17
cheat/cheatsheets/gzip Normal file
View File

@ -0,0 +1,17 @@
# To create a *.gz compressed file
gzip test.txt
# To create a *.gz compressed file to a specific location using -c option (standard out)
gzip -c test.txt > test_custom.txt.gz
# To uncompress a *.gz file
gzip -d test.txt.gz
# Display compression ratio of the compressed file using gzip -l
gzip -l *.gz
# Recursively compress all the files under a specified directory
gzip -r documents_directory
# To create a *.gz compressed file and keep the original
gzip < test.txt > test.txt.gz

2
cheat/cheatsheets/ping6 Normal file
View File

@ -0,0 +1,2 @@
# get all ipv6 neighbors via broadcast ping
ping6 -I eth0 ff02::1

View File

@ -0,0 +1,5 @@
# To display public shares on the server:
smbclient -L <hostname> -U%
# To connect to a share:
smbclient //<hostname>/<share> -U<username>%<password>

18
cheat/cheatsheets/ss Normal file
View File

@ -0,0 +1,18 @@
ss
Utility to investigate sockets
Args
-4/-6 list ipv4/ipv6 sockets
-n numeric addresses instead of hostnames
-l list listing sockets
-u/-t/-x list udp/tcp/unix sockets
-p Show process(es) that using socket
# show all listing tcp sockets including the corresponding process
ss -tlp
# show all sockets connecting to 192.168.2.1 on port 80
ss -t dst 192.168.2.1:80
# show all ssh related connection
ss -t state established '( dport = :ssh or sport = :ssh )'

View File

@ -4,12 +4,19 @@ ssh -i /path/to/file.pem user@example.com
# To connect on an non-standard port:
ssh -p 2222 user@example.com
# To connect and forward the authentication agent
ssh -A user@example.com
# To execute a command on a remote server:
ssh -t user@example.com 'the-remote-command'
# To tunnel an x session over SSH:
ssh -X user@example.com
# Redirect traffic with a tunnel between local host (port 8080) and a remote
# host (remote.example.com:5000) through a proxy (personal.server.com):
ssh -f -L 8080:remote.example.com:5000 user@personal.server.com -N
# To launch a specific x application over SSH:
ssh -X -t user@example.com 'chromium-browser'

View File

@ -3,7 +3,7 @@ import os
setup(
name = 'cheat',
version = '2.1.1',
version = '2.1.3',
author = 'Chris Lane',
author_email = 'chris@chris-allen-lane.com',
license = 'GPL3',