Skip to content

Instantly share code, notes, and snippets.

View damiann's full-sized avatar
🏴
Ę̮̱͔͓ͯ͗ͫ̌̏ͫ͌́x̘̤͚̰̫̫̗̤̱̒̓ͨͯ͑̓ͥͫ̕å̰͚̓͒ͫm̛̤͕̫̳̺̩̄̓ͨͥ͜ͅp̰͉͗ͤl̵̖̗̫͍͓͋̍̐͌̐̒e̡̧̿͒͋̈́͡

Damian damiann

🏴
Ę̮̱͔͓ͯ͗ͫ̌̏ͫ͌́x̘̤͚̰̫̫̗̤̱̒̓ͨͯ͑̓ͥͫ̕å̰͚̓͒ͫm̛̤͕̫̳̺̩̄̓ͨͥ͜ͅp̰͉͗ͤl̵̖̗̫͍͓͋̍̐͌̐̒e̡̧̿͒͋̈́͡
View GitHub Profile
@damiann
damiann / gist:3978143
Last active October 12, 2015 05:28
Hide a link
<!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 />
@damiann
damiann / gist:4122069
Created November 20, 2012 23:47 — forked from lucasfais/gist:1207002
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
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
@damiann
damiann / gist:4383838
Created December 26, 2012 23:11
Sublime Text 2 using RVM
{
"cmd": ["/Users/damiannelson/.rvm/bin/rvm-auto-ruby", "$file"],
"file_regex": "^(...*?):([0-9]*):?([0-9]*)",
"selector": "source.ruby"
}
# 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
@damiann
damiann / psy.html
Created February 12, 2013 19:49
PSY - YouTube
<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">
@damiann
damiann / gist:5229033
Last active December 15, 2015 08:09
EC2 SSH
ssh -i keypair.pem ec2-user@0.0.0.0
MC -
screen -S minecraft java -Xincgc -Xmx1G -jar minecraft_server.jar
@damiann
damiann / gist:5808016
Created June 18, 2013 18:33
tasks for setting up new server
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
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\]"
@damiann
damiann / gist:6234664
Created August 14, 2013 19:30
First 5 minutes on server
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