This file contains 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
#!/bin/bash | |
sudo perl -pi -e 's/^#?Port 22$/Port 443/' /etc/ssh/sshd_config | |
sudo service ssh restart |
This file contains 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
#!/bin/bash | |
### BEGIN INIT INFO | |
# Provides: ec2-run-user-data | |
# Required-Start: $network $local_fs $remote_fs $syslog $all | |
# Required-Stop: | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: | |
# Short-Description: Run EC2 user-data scripts | |
# Description: On first boot of EC2 instance, runs user-data if it starts with #! |
This file contains 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
# basic pfctl control | |
# == | |
# Related: http://www.OpenBSD.org | |
# Last update: Tue Dec 28, 2004 | |
# == | |
# Note: | |
# this document is only provided as a basic overview | |
# for some common pfctl commands and is by no means | |
# a replacement for the pfctl and pf manual pages. |
This file contains 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
var Q = require('q'); | |
var tumblr = require('tumblr.js'); | |
var fs = require('fs'); | |
var _ = require('underscore'); | |
// Customize these. Ill give instructions soon. Or ping me for help. | |
var tumblrClient = tumblr.createClient({ | |
consumer_key: '', | |
consumer_secret: '', | |
token: '', |
This file contains 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
// the page url must be instagram.com/p/ | |
var node = document.getElementsByClassName("_379kp")[0] | |
var date = new Date(node.attributes["datetime"].value) | |
node.innerText = date.toLocaleString() |
This file contains 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
MIDDLEFINGER="π π π π π π π π π π π π π π π π π π π π π π π π π π π π π π π π π π π π π π π π π " | |
PS1="\n \n$MIDDLEFINGER \n \n \nπ° \W\\ π° " | |
export PS1 |
This file contains 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
var express = require('express'); | |
var app = express(); | |
app.get('/yes', function (req, res) { | |
res.send('thanks!'); | |
console.log('student got it, stop vib'); | |
}); | |
app.get('/no', function (req, res) { | |
res.send('thanks!'); |
This file contains 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 getWordOccurences() { | |
var textNodes; | |
function getTextNodes() { | |
var walker = document.createTreeWalker( | |
document.body, | |
NodeFilter.SHOW_TEXT, | |
null, | |
false | |
); |
NewerOlder