Android Studio (Windows/Linux) Keyboard Shortcuts
by Kekc42 via cheatography.com/39399/cs/12245/
General Writing Code (cont)
Save all Ctrl + S Complete statement Ctrl + Shift + Enter
Synchronize Ctrl + Alt + Y Quick documentation lookup Ctrl + Q
Maximize/minimize editor Ctrl + Shift + F12 Show parameters for selected method Ctrl + P
Add to favorites Alt + Shift + F Go to declaration (directly) Ctrl + B or Ctrl +
Click
Inspect current file with current profile Alt + Shift + I
Go to implementations Ctrl + Alt + B
Quick switch scheme Ctrl + ` (backquote)
Go to super-method/super-class Ctrl + U
Open settings dialogue Ctrl + Alt + S
Open quick definition lookup Ctrl + Shift + I
Open project structure dialog Ctrl + Alt + Shift + S
Toggle project tool window visibility Alt + 1
Switch between tabs and tool window Ctrl + Tab
Toggle bookmark F11
Refactoring Toggle bookmark with mnemonic Ctrl + F11
Copy F5 Comment/uncomment with line Ctrl + /
Move F6 Comment/uncomment with block Ctrl + Shift + /
Safe delete Alt + Delete Select successively increasing code blocks Ctrl + W
Rename Shift + F6 Decrease current selection to previous state Ctrl + Shift + W
Change signature Ctrl + F6 Move to code block start Ctrl + [
Inline Ctrl + Alt + N Move to code block end Ctrl + ]
Extract method Ctrl + Alt + M Select to the code block start Ctrl + Shift + [
Extract variable Ctrl + Alt + V Select to the code block end Ctrl + Shift + ]
Extract field Ctrl + Alt + F Delete to end of word Ctrl + Delete
Extract constant Ctrl + Alt + C Delete to start of word Ctrl + Backspace
Extract parameter Ctrl + Alt + P Optimize imports Ctrl + Alt + O
Project quick fix (show intention actions and quick Alt + Enter
Writing Code fixes)
Generate code (getters, setters, etc) Alt + Insert Reformat code Ctrl + Alt + L
Override methods Ctrl + O Auto-indent lines Ctrl + Alt + I
Implement methods Ctrl + I Indent/unindent lines Tab/Shift + Tab
Surround with (if...else / try...catch / etc.) Ctrl + Alt + T Smart line join Ctrl + Shift + J
Delete line at caret Ctrl + Y Smart line split Ctrl + Enter
Collapse/expand current code block Ctrl + Start new line Shift + Enter
minus/plus Next/previous highlighted error F2 / Shift + F2
Collapse/expand all code blocks Ctrl + Shift +
minus/plus Build and Run
Duplicate current line or selection Ctrl + D Build Ctrl + F9
Basic code completion Ctrl + Space Build and run Shift + F10
Smart code completion (filters the list of methods and Ctrl + Shift + Apply changes (with Instant Run) Ctrl + F10
variables by expected type) Space
By Kekc42 Published 8th July, 2017. Sponsored by CrosswordCheats.com
cheatography.com/kekc42/ Last updated 8th July, 2017. Learn to solve cryptic crosswords!
github.com/kekc42 Page 1 of 2. http://crosswordcheats.com
Android Studio (Windows/Linux) Keyboard Shortcuts
by Kekc42 via cheatography.com/39399/cs/12245/
Debugging Version Control / Local History
Debug Shift + F9 Commit project to VCS Ctrl + K
Step over F8 Update project from VCS Ctrl + T
Step into F7 View recent changes Alt + Shift + C
Smart step into Shift + F7 Open VCS popup Alt + ` (backquote)
Step out Shift + F8
Run to cursor Alt + F9
Evaluate expression Alt + F8
Resume program F9
Toggle breakpoint Ctrl + F8
View breakpoints Ctrl + Shift + F8
Navigating and Searching Within Studio
Search everything (including code and menus) Press Shift twice
Find Ctrl + F
Find next F3
Find previous Shift + F3
Replace Ctrl + R
Find action Ctrl + Shift + A
Search by symbol name Ctrl + Alt + Shift + N
Find class Ctrl + N
Find file (instead of class) Ctrl + Shift + N
Find in path Ctrl + Shift + F
Open file structure pop-up Ctrl + F12
Navigate between open editor tabs Alt + Right/Left Arrow
Jump to source F4 / Ctrl + Enter
Open current editor tab in new window Shift + F4
Recently opened files pop-up Ctrl + E
Recently edited files pop-up Ctrl + Shift + E
Go to last edit location Ctrl + Shift + Backspace
Close active editor tab Ctrl + F4
Return to editor window from a tool window Esc
Hide active or last active tool window Shift + Esc
Go to line Ctrl + G
Open type hierarchy Ctrl + H
Open method hierarchy Ctrl + Shift + H
Open call hierarchy Ctrl + Alt + H
By Kekc42 Published 8th July, 2017. Sponsored by CrosswordCheats.com
cheatography.com/kekc42/ Last updated 8th July, 2017. Learn to solve cryptic crosswords!
github.com/kekc42 Page 2 of 2. http://crosswordcheats.com
Identifying Open Ports with Nmap
TCP SYN SCAN (-sS) TCP connect() SCAN (-sT) TCP FIN SCAN (-sF)
TCP XMAS TREE SCAN (-sX) TCP NULL SCAN (-sN) TCP PING SCAN (-sP)
VERSION DETECTION SCAN (-sV) UDP SCAN (-sU) IP PROTOCOL SCAN (-sO)
Version scan identifies open pots with a TCP SYN scan…
…and then queries the port with a customized signature. TCP ACK SCAN (-sA) TCP WINDOW SCAN (-sW)
www.stationx.net/nmap-cheat-sheet/
5
IDLESCAN (-sI <zombie host: [probeport]>)
Step 3: Nmap repeats the original SYN/ACK probe of the
Step 1: Nmap sends a SYN/ACK to the zombie workstation Step 2: Nmap sends a SYN frame to the destination
zombie station. If the IPID has incremented, then the port
to induce a RST in return. This RST frame contains the address, but nmap spoofs the IP address to make it seem
that was spoofed in the original SYN frame is open on the
initial IPID that nmap will remember for later. as if the SYN frame was sent from the zombie workstation.
destination device.
FTP BOUNCE ATTACK (-b <ftp_relay_host>)
A closed port will result with the FTP server informing the source station that the FTP server can’t build the connection.
An open port completes the transfer over the specified connection.
NOTE: Be aware that the FTP bounce scan is not workable since most FTP Servers will not perform what is needed for the scan.
This is more for information purposes.
www.stationx.net/nmap-cheat-sheet/
6
Top 30 linux shell tricks Cheat Sheet
by TME520 (TME520) via cheatography.com/20978/cs/17483/
Top 30
Run the last command as root sudo !!
Serve current directory tree at http://$HOSTNAME:8000/ python -m SimpleHTTPServer
Runs previous command but replacing echo "Hello Morld"
^Morld^World
echo "Hello World"
Rapidly invoke an editor to write a long command [ctrl+x e]
Place the argument of the most recent command on the shell 'ALT+.' or '<ESC> .'
Salvage a borked terminal reset
List currently mounted filesystems in nice layout mount | column -t
Get your external IP address curl ifconfig.me
Execute a command at a given time echo "ls -l" | at midnight
Output your microphone to a remote computer's speaker dd if=/dev/dsp | ssh -c arcfour -C username@host dd
of=/dev/dsp
Type partial command, check something, resume typing vi /etc/ssh/ [ctrl+u]
ls -lisa /etc/ssh/
[ctrl+y] vi /etc/ssh/ssh_config
Mount folder/filesystem through SSH sshfs name@server:/path/to/folder /path/to/mount/point
Mount a temporary ram partition mount -t tmpfs tmpfs /mnt -o size=1024m
Download an entire website wget --random-wait -r -p -e robots=off -U mozilla
http://www.example.com
Clear the terminal screen [ctrl+l]
Compare a remote file with a local file ssh user@host cat /path/to/remotefile | diff /path/to/‐
localfile -
Update twitter via curl curl -u user:pass -d status="Tweeting from the shell"
http://twitter.com/statuses/update.xml`
SSH connection through host in the middle ssh -t reachable_host ssh unreachable_host
Close shell keeping all subprocess running disown -a && exit
Make 'less' behave like 'tail -f' less +F somelogfile
Put a console clock in top right corner while sleep 1;do tput sc;tput cup 0 $(($(tput cols)-‐
29));date;tput rc;done &
Shutdown a Windows machine from Linux net rpc shutdown -I ipAddressOfWindowsPC -U username%‐
password
List of commands you use most often history | awk '{a[$2]++}END{for(i in a){print a[i] " "
i}}' | sort -rn | head
32 bits or 64 bits? getconf LONG_BIT
Set audible alarm when an IP address comes online ping -i 60 -a IP_address
Reboot machine when everything is hanging <alt> + <print screen/sys rq> + <R> - <S> - <E> - <I> -
<U> - <B>
By TME520 (TME520) Published 17th October, 2018. Sponsored by ApolloPad.com
cheatography.com/tme520/ Last updated 1st December, 2018. Everyone has a novel in them. Finish
tme520.com Page 1 of 2. Yours!
https://apollopad.com
Top 30 linux shell tricks Cheat Sheet
by TME520 (TME520) via cheatography.com/20978/cs/17483/
Top 30 (cont)
Simulate typing echo "You can simulate on-screen typing just like in
the movies" | pv -qL 10
Quickly rename a file mv filename.{old,new}
Escape any command aliases \[command]
Delete all files in a folder that don't match a certain file extension rm !(.foo|.bar|*.baz)
Bonus: Tricks of the ancient UNIX masters
Reuse all parameter of the previous command line !*
Sharing file through http 80 port nc -v -l 80 < file.ext
Display a block of text with AWK awk '/start_pattern/,/stop_pattern/' file.txt
Kills a process that is locking a file fuser -k filename
Display all current terminal settings stty -a
Type a string, hit [ctrl+d] and see the ASCII codes od -cx
By TME520 (TME520) Published 17th October, 2018. Sponsored by ApolloPad.com
cheatography.com/tme520/ Last updated 1st December, 2018. Everyone has a novel in them. Finish
tme520.com Page 2 of 2. Yours!
https://apollopad.com