mirror of
https://github.com/cheat/cheat.git
synced 2025-09-04 19:18:29 +02:00
Compare commits
13 Commits
Author | SHA1 | Date | |
---|---|---|---|
5487314676 | |||
ec360ccddd | |||
bb7dfd1028 | |||
b348724082 | |||
5053f07fd8 | |||
4dd55105d2 | |||
6148d64599 | |||
cde8bcaa1d | |||
fcb82778e4 | |||
da92421948 | |||
d6c7863573 | |||
5812bca6b7 | |||
d048ea5a10 |
@ -47,7 +47,7 @@ import os
|
|||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|
||||||
# parse the command-line options
|
# parse the command-line options
|
||||||
options = docopt(__doc__, version='cheat 2.5.0')
|
options = docopt(__doc__, version='cheat 2.5.1')
|
||||||
|
|
||||||
# initialize and validate configs
|
# initialize and validate configs
|
||||||
config = Configuration()
|
config = Configuration()
|
||||||
|
8
bin/cheat.bat
Normal file
8
bin/cheat.bat
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
@echo OFF
|
||||||
|
|
||||||
|
if not defined CHEAT_EDITOR if not defined EDITOR if not defined VISUAL (
|
||||||
|
set CHEAT_EDITOR=write
|
||||||
|
)
|
||||||
|
|
||||||
|
REM %~dp0 is black magic for getting directory of script
|
||||||
|
python %~dp0cheat %*
|
@ -10,7 +10,7 @@ gcc -g
|
|||||||
# Debug with all symbols.
|
# Debug with all symbols.
|
||||||
gcc -ggdb3
|
gcc -ggdb3
|
||||||
|
|
||||||
# Build for 64 bytes
|
# Build for 64 bits
|
||||||
gcc -m64
|
gcc -m64
|
||||||
|
|
||||||
# Include the directory {/usr/include/myPersonnal/lib/} to the list of path for #include <....>
|
# Include the directory {/usr/include/myPersonnal/lib/} to the list of path for #include <....>
|
||||||
|
@ -1,2 +1,5 @@
|
|||||||
# Lowercase all files and folders in current directory
|
# Lowercase all files and folders in current directory
|
||||||
rename 'y/A-Z/a-z/' *
|
rename 'y/A-Z/a-z/' *
|
||||||
|
|
||||||
|
# Replace 'sometext' with 'replacedby' in all files in current directory
|
||||||
|
rename 's/sometext/replacedby/' *
|
||||||
|
@ -21,7 +21,7 @@ ssh -f -L 8080:remote.example.com:5000 user@personal.server.com -N
|
|||||||
ssh -X -t user@example.com 'chromium-browser'
|
ssh -X -t user@example.com 'chromium-browser'
|
||||||
|
|
||||||
# To create a SOCKS proxy on localhost and port 9999
|
# To create a SOCKS proxy on localhost and port 9999
|
||||||
ssh -D 9999 user@example.com
|
ssh -qND 9999 user@example.com
|
||||||
|
|
||||||
# To tunnel an ssh session over the SOCKS proxy on localhost and port 9999
|
# To tunnel an ssh session over the SOCKS proxy on localhost and port 9999
|
||||||
ssh -o "ProxyCommand nc -x 127.0.0.1:9999 -X 4 %h %p" username@example2.com
|
ssh -o "ProxyCommand nc -x 127.0.0.1:9999 -X 4 %h %p" username@example2.com
|
||||||
|
@ -49,15 +49,14 @@ class Configuration:
|
|||||||
]).strip().lower()
|
]).strip().lower()
|
||||||
|
|
||||||
# self.cheat_user_dir
|
# self.cheat_user_dir
|
||||||
self.cheat_user_dir = self._select([
|
self.cheat_user_dir = self._select(
|
||||||
os.environ.get('CHEAT_USER_DIR'),
|
map(os.path.expanduser,
|
||||||
|
filter(None,
|
||||||
|
[os.environ.get('CHEAT_USER_DIR'),
|
||||||
os.environ.get('CHEAT_DEFAULT_DIR'),
|
os.environ.get('CHEAT_DEFAULT_DIR'),
|
||||||
os.environ.get('DEFAULT_CHEAT_DIR'),
|
os.environ.get('DEFAULT_CHEAT_DIR'),
|
||||||
# TODO: XDG home?
|
# TODO: XDG home?
|
||||||
os.path.expanduser(
|
os.path.join('~', '.cheat')])))
|
||||||
os.path.expandvars(os.path.join('~', '.cheat'))
|
|
||||||
),
|
|
||||||
])
|
|
||||||
|
|
||||||
# self.cheat_editor
|
# self.cheat_editor
|
||||||
self.cheat_editor = self._select([
|
self.cheat_editor = self._select([
|
||||||
|
2
setup.py
2
setup.py
@ -14,7 +14,7 @@ for f in os.listdir('cheat/cheatsheets/'):
|
|||||||
# specify build params
|
# specify build params
|
||||||
setup(
|
setup(
|
||||||
name='cheat',
|
name='cheat',
|
||||||
version='2.5.0',
|
version='2.5.1',
|
||||||
author='Chris Lane',
|
author='Chris Lane',
|
||||||
author_email='chris@chris-allen-lane.com',
|
author_email='chris@chris-allen-lane.com',
|
||||||
license='GPL3',
|
license='GPL3',
|
||||||
|
Reference in New Issue
Block a user