From f38da237410892e6f024c8706133c1d0274a6519 Mon Sep 17 00:00:00 2001 From: ImmortalPC Date: Tue, 5 Apr 2016 17:09:49 +0200 Subject: [PATCH 1/2] [CHANGE] Add cheats for DD and SSH --- cheat/cheatsheets/dd | 3 +++ cheat/cheatsheets/ssh | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/cheat/cheatsheets/dd b/cheat/cheatsheets/dd index 2c69a30..a557e13 100644 --- a/cheat/cheatsheets/dd +++ b/cheat/cheatsheets/dd @@ -17,3 +17,6 @@ dd if=/dev/zero of=/dev/null bs=128M status=progress # DD with "graphical" return dcfldd if=/dev/zero of=/dev/null bs=500K + +# This will output the sound from your microphone port to the ssh target computer's speaker port. The sound quality is very bad, so you will hear a lot of hissing. +dd if=/dev/dsp | ssh -c arcfour -C username@host dd of=/dev/dsp diff --git a/cheat/cheatsheets/ssh b/cheat/cheatsheets/ssh index e83bcce..3191ec5 100644 --- a/cheat/cheatsheets/ssh +++ b/cheat/cheatsheets/ssh @@ -32,3 +32,8 @@ ssh user@example.com -C -c blowfish -X # Copy files and folders through ssh from remote host to pwd with tar.gz compression # when there is no rsync command available ssh user@example.com "cd /var/www/Shared/; tar zcf - asset1 asset2" | tar zxf - + +# Mount folder/filesystem through SSH +# Install SSHFS from http://fuse.sourceforge.net/sshfs.html +# Will allow you to mount a folder security over a network. +sshfs name@server:/path/to/folder /path/to/mount/point From b6d54b135c54e4b8f37ccad47bfe7ee8e69b9ed7 Mon Sep 17 00:00:00 2001 From: ImmortalPC Date: Tue, 19 Apr 2016 13:45:47 +0200 Subject: [PATCH 2/2] [CHANGE & ADD] Removing typo from SSH. Adding tip for emacs and ssh. Adding cheat for xxd --- cheat/cheatsheets/ssh | 8 ++++++-- cheat/cheatsheets/xxd | 8 ++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 cheat/cheatsheets/xxd diff --git a/cheat/cheatsheets/ssh b/cheat/cheatsheets/ssh index 3191ec5..aad8cb8 100644 --- a/cheat/cheatsheets/ssh +++ b/cheat/cheatsheets/ssh @@ -34,6 +34,10 @@ ssh user@example.com -C -c blowfish -X ssh user@example.com "cd /var/www/Shared/; tar zcf - asset1 asset2" | tar zxf - # Mount folder/filesystem through SSH -# Install SSHFS from http://fuse.sourceforge.net/sshfs.html -# Will allow you to mount a folder security over a network. +# Install SSHFS from https://github.com/libfuse/sshfs +# Will allow you to mount a folder securely over a network. sshfs name@server:/path/to/folder /path/to/mount/point + +# Emacs can read file through SSH +# Doc: http://www.gnu.org/software/emacs/manual/html_node/emacs/Remote-Files.html +emacs /ssh:name@server:/path/to/file diff --git a/cheat/cheatsheets/xxd b/cheat/cheatsheets/xxd new file mode 100644 index 0000000..89efb28 --- /dev/null +++ b/cheat/cheatsheets/xxd @@ -0,0 +1,8 @@ +# Convert bin/string to hex. +# Result: 34322069732074686520736f6c7574696f6e0a +echo '42 is the solution' | xxd -p + +# Convert hex to bin/string. +# Result: 42 is the solution +echo '34322069732074686520736f6c7574696f6e0a' | xxd -r -p +