mirror of
https://github.com/cheat/cheat.git
synced 2024-11-25 23:41:36 +01:00
Trivial changes.
This commit is contained in:
parent
37b9e84497
commit
bf290ea5b7
5
cheat
5
cheat
@ -41,9 +41,7 @@ def cheat_files(cheat_directories):
|
|||||||
for cheat_dir in reversed(cheat_directories):
|
for cheat_dir in reversed(cheat_directories):
|
||||||
cheats.update(dict([(cheat, cheat_dir)
|
cheats.update(dict([(cheat, cheat_dir)
|
||||||
for cheat in os.listdir(cheat_dir)
|
for cheat in os.listdir(cheat_dir)
|
||||||
if not cheat.endswith('md')
|
if not cheat.startswith('.')
|
||||||
and not cheat.startswith('.')
|
|
||||||
and not cheat.startswith('LICENSE')
|
|
||||||
and not cheat.startswith('__')]))
|
and not cheat.startswith('__')]))
|
||||||
return cheats
|
return cheats
|
||||||
|
|
||||||
@ -86,7 +84,6 @@ def main():
|
|||||||
print 'No cheatsheet found for %s.' % keyphrase
|
print 'No cheatsheet found for %s.' % keyphrase
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def pretty_print(filename):
|
def pretty_print(filename):
|
||||||
try:
|
try:
|
||||||
if os.path.splitext(filename)[1]:
|
if os.path.splitext(filename)[1]:
|
||||||
|
@ -1,2 +1,3 @@
|
|||||||
# To see most used top 10 commands:
|
# To see most used top 10 commands:
|
||||||
history | awk '{CMD[$2]++;count++;}END { for (a in CMD)print CMD[a] " " CMD[a]/count*100 "% " a;}' | grep -v "./" | column -c3 -s " " -t | sort -nr | nl | head -n10
|
history | awk '{CMD[$2]++;count++;}END { for (a in CMD)print CMD[a] " " CMD[a]/count*100 "% " a;}' | grep -v "./" | column -c3 -s " " -t | sort -nr | nl | head -n10
|
||||||
|
|
||||||
|
@ -1,3 +1,2 @@
|
|||||||
# To find listening ports
|
# To find listening ports
|
||||||
lsof -Pnl +M -i4
|
lsof -Pnl +M -i4
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user