Compare commits

...

8 Commits

Author SHA1 Message Date
3be95142ed v2.1.25 2016-05-29 21:47:22 -04:00
bb324e94a4 Issue #278
Fixed a technical innacuracy in the `crontab` cheatsheet.
2016-05-29 21:03:58 -04:00
7084ce2f45 Merge pull request #277 from caorong/master
origin Convert Unix timestamp to Date only works on Linux, add cheat which works on Mac
2016-05-29 21:00:57 -04:00
905006f09c Merge pull request #280 from ybudimirov/ncdu
Ncdu cheatsheet
2016-05-29 20:59:16 -04:00
06a368fb1f Merge pull request #276 from oliworx/patch-1
add cheatsheet for subversion (svn)
2016-05-29 20:58:16 -04:00
6a9422502a Ncdu cheatsheet 2016-05-26 13:21:20 +03:00
41332f1d8a update timestamp convert cheat 2016-04-27 10:57:44 +08:00
a3c682729e add cheatsheet for subversion (svn) 2016-04-13 17:27:37 +02:00
6 changed files with 40 additions and 4 deletions

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.24')
options = docopt(__doc__, version='cheat 2.1.25')
# list directories
if options['--directories']:

View File

@ -14,7 +14,9 @@ SHELL=/bin/bash
# example entries
# every 15 min
*/15 * * * * /home/user/command.sh
# every midnight
0 * * * * /home/user/command.sh
* 0 * * * /home/user/command.sh
# every Saturday at 8:05 AM
5 8 * * 6 /home/user/command.sh

View File

@ -1,5 +1,8 @@
# Print date in format suitable for affixing to file names
date +"%Y%m%d_%H%M%S"
# Convert Unix timestamp to Date
# Convert Unix timestamp to Date(Linux)
date -d @1440359821
# Convert Unix timestamp to Date(Mac)
date -r 1440359821

11
cheat/cheatsheets/ncdu Normal file
View File

@ -0,0 +1,11 @@
# Save results to file
ncdu -o ncdu.file
# Read from file
ncdu -f ncdu.file
# Save results to compressed file
ncdu -o-| gzip > ncdu.file.gz
# Read from compressed file
zcat ncdu.file.gz | ncdu -f-

20
cheat/cheatsheets/svn Normal file
View File

@ -0,0 +1,20 @@
## update working copy from repository
svn update "/path"
## show changed files in working copy
svn status
## show what changed in local file
svn diff "/path/filename"
## add files or folders
svn add "path/item"
## revert local uncommited changes
svn revert "/path/file"
## commit changes to repo
svn commit -m "message" "/path"
## show help for 'svn diff'
svn help diff

View File

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