⌘T | go to file |
⌘⌃P | go to project |
⌘R | go to methods |
⌃G | go to line |
⌘KB | toggle side bar |
⌘⇧P | command prompt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<head> | |
<script> | |
function clicked() { | |
document.getElementById("link").href="http://www.nik-it.com/wp-content/uploads/2012/01/Youve_Been_Hacked-300x170.jpg"; | |
} | |
</script> | |
</head> | |
<body> | |
<strong>Click the link</strong><br /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Google Chrome Logging - Mac OSX | |
- Quit Chrome | |
- $ /Applications/Browsers/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --enable-logging --v=1 | |
- Open Chrome Log file with mac log viewer |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"cmd": ["/Users/damiannelson/.rvm/bin/rvm-auto-ruby", "$file"], | |
"file_regex": "^(...*?):([0-9]*):?([0-9]*)", | |
"selector": "source.ruby" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Show Mac download log file contents | |
sqlite3 ~/Library/Preferences/com.apple.LaunchServices.QuarantineEvents* 'select LSQuarantineDataURLString from LSQuarantineEvent' | |
# Clear Mac download log file contents | |
sqlite3 ~/Library/Preferences/com.apple.LaunchServices.QuarantineEvents* 'delete from LSQuarantineEvent' | |
# Remove default | |
defaults write com.apple.LaunchServices LSQuarantine -bool NO |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style> | |
.watch-dancing-psy { | |
background: url(http://s.ytimg.com/yts/img/logo_dancing_psy-vflsJl9hC.gif) no-repeat -73px 1px; | |
width: 20px; | |
height: 30px; | |
margin-top: 0px; | |
} | |
</style> | |
<img class="watch-dancing-psy" src="//s.ytimg.com/yts/img/pixel-vfl3z5WfW.gif"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ssh -i keypair.pem [email protected] | |
MC - | |
screen -S minecraft java -Xincgc -Xmx1G -jar minecraft_server.jar |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Prevent framing: | |
Debian/Ubuntu servers /etc/apache2/apache2.conf | |
Header always append X-Frame-Options SAMEORIGIN | |
or | |
nginx: | |
add_header X-Frame-Options SAMEORIGIN; | |
HTTP TRACE: | |
TraceEnable Off |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function parse_git_branch { | |
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/' | |
} | |
export PS1="\[\e[32;0m\]\h:\u@\W \$(parse_git_branch)$ \[\e[0m\]" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Let’s Get Started | |
Our box is freshly hatched, virgin pixels at the prompt. I favor Ubuntu; if you use another version of linux, your commands may vary. Five minutes to go: | |
passwd | |
Change the root password to something long and complex. You won’t need to remember it, just store it somewhere secure - this password will only be needed if you lose the ability to log in over ssh or lose your sudo password. | |
apt-get update | |
apt-get upgrade |
OlderNewer