Skip to content

Instantly share code, notes, and snippets.

View sethkinast's full-sized avatar

Seth Kinast sethkinast

View GitHub Profile
@sethkinast
sethkinast / .jshintrc
Last active December 13, 2015 19:28 — forked from haschek/.jshintrc
{
// == Enforcing Options ===============================================
"bitwise" : true, // Prohibit bitwise operators (&, |, ^, etc.).
"curly" : true, // Require {} for every new block or scope.
"eqeqeq" : true, // Require triple equals i.e. `===`.
"forin" : true, // Require `for in` loops to use `hasOwnPrototype` checks.
"immed" : true, // Require immediate invocations to be wrapped in parens e.g. `( function(){}() );`
"latedef" : true, // Prohibit variable use before definition.
"newcap" : true, // Require capitalization of all constructor functions e.g. `new F()`.
@sethkinast
sethkinast / gist:5914577
Last active December 19, 2015 06:49
Tiny script to grab Tor exitnodes and ban them via CloudFlare's API
#!/bin/bash
SERVERS=(108.162.196.125 108.162.197.125)
for server in ${SERVERS[*]}
do
echo "Now processing $server"
wget --timeout=10 -t1 -O tor.txt https://check.torproject.org/cgi-bin/TorBulkExitList.py?ip=$server
for ip in `tail -n +4 tor.txt`
// Option 1: require inline
var app = express();
app.get('/', require('routes/index'));
app.get('/login', require('routes/login').index);
app.post('/login', require('routes/login').do_login);
// Easy to split up routes
// Centralized route paths
import Ember from 'ember';
export default Ember.Controller.extend({
appName:'Ember Twiddle',
foo: 'foo',
bar: Ember.computed(function() {
return this.getWithDefault('baz.bop', 'no therapy needed');
})
});