diff --git a/cheat b/cheat index 0af41db..6a054e3 100755 --- a/cheat +++ b/cheat @@ -41,9 +41,7 @@ def cheat_files(cheat_directories): for cheat_dir in reversed(cheat_directories): cheats.update(dict([(cheat, cheat_dir) for cheat in os.listdir(cheat_dir) - if not cheat.endswith('md') - and not cheat.startswith('.') - and not cheat.startswith('LICENSE') + if not cheat.startswith('.') and not cheat.startswith('__')])) return cheats @@ -84,7 +82,6 @@ def main(): # if it does not, say so else: print 'No cheatsheet found for %s.' % keyphrase - def pretty_print(filename): diff --git a/cheatsheets/history b/cheatsheets/history index 90cf809..32320e0 100644 --- a/cheatsheets/history +++ b/cheatsheets/history @@ -1,2 +1,3 @@ # 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 \ No newline at end of file +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 + diff --git a/cheatsheets/lsof b/cheatsheets/lsof index a7f45fa..2f4ddcc 100644 --- a/cheatsheets/lsof +++ b/cheatsheets/lsof @@ -1,3 +1,2 @@ # To find listening ports lsof -Pnl +M -i4 - diff --git a/cheatsheets/mysql b/cheatsheets/mysql.sql similarity index 86% rename from cheatsheets/mysql rename to cheatsheets/mysql.sql index 2fe112f..6da747d 100644 --- a/cheatsheets/mysql +++ b/cheatsheets/mysql.sql @@ -2,4 +2,4 @@ CREATE DATABASE owa CHARACTER SET utf8 COLLATE utf8_general_ci; # To add a user and give rights on the given database -GRANT ALL PRIVILEGES ON database.* TO 'user'@'localhost'IDENTIFIED BY 'password' WITH GRANT OPTION; \ No newline at end of file +GRANT ALL PRIVILEGES ON database.* TO 'user'@'localhost'IDENTIFIED BY 'password' WITH GRANT OPTION;