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 | |
# Script to backup git repo to S3 | |
# Set bucket, dir, password and account to use for the backup. I keep mine in local env vars | |
# These are set by localrc which lives on an encrypted home directory and is executed by my bashrc | |
bucket=$S3_BACKUP_BUCKET | |
dest=$S3_DIR | |
dir=$GITHUB_BACKUP_DIR | |
account=$GITHUB_ACCOUNT |
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() { | |
var me = document.scripts[document.scripts.length - 1]; | |
var token = me.src.match(/token=(\w+)/)[1]; | |
var q = 'dev/esa/api name:v1' | |
var u = 'https://api.esa.io/v1/teams/docs/posts?access_token=' + token + '&q=' + q; | |
fetch(u).then(function (r){ | |
r.json().then(function(r){ | |
r.posts.forEach(function (post) { |
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
Object.keys(Case).map(function (k) { | |
if (Case[k] instanceof Function) {return k} | |
}).filter(function (x) {return x} ).reduce(function (h, k) { | |
h[k] = Case[k]("attrClass"); return h | |
}, {}) | |
{ | |
"of": "camel", | |
"flip": "ATTRcLASS", | |
"random": "aTTrClaSs", |
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
require 'angular' | |
require 'angular-route' | |
window.app = app = angular.module('kz.app', [ | |
'ngRoute' | |
]) | |
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
#!/usr/bin/env ruby | |
#run in RAILS_ROOT directory | |
require 'json' | |
require 'yaml' | |
# http://stackoverflow.com/questions/9381553/ruby-merge-nested-hash | |
class ::Hash | |
def deep_merge(second) | |
merger = proc { |key, v1, v2| Hash === v1 && Hash === v2 ? v1.merge(v2, &merger) : v2 } |
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
source 'https://rubygems.org' | |
gem 'selenium-webdriver' |
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
require 'sqwiggle-ruby' | |
require 'net/http' | |
require 'nokogiri' | |
require 'uri' | |
token = 'cli_be6cd40b6ebd25101b3450e34882412b' | |
flickr_rss = 'https://www.flickr.com/services/feeds/photos_public.gne?id=59591873@N00&lang=en-us' | |
uri = URI.parse(flickr_rss) |
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
#!/usr/bin/env coffee | |
# | |
JiraApi = require('jira').JiraApi | |
#process = require 'process' | |
exec = require('child_process').exec | |
if process.argv.length < 1 + 2 | |
console.log "usage: ticketmachine sumamry [description]" | |
return 1 | |
[summary, description] = process.argv.slice 2 |
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
if ($this->posts[0]->tumblr_url) { | |
header( "Location: " . $this->posts[0]->tumblr_url, true, 301); | |
exit; | |
} | |
} | |
// Put sticky posts at the top of the posts array | |
"wp-includes/query.php" 4399 lines --76%-- |
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
us_top_100_sites = %w( | |
http://google.com/ http://facebook.com/ http://youtube.com/ http://yahoo.com/ http://amazon.com/ | |
http://wikipedia.org/ http://linkedin.com/ http://ebay.com/ http://twitter.com/ http://craigslist.org/ | |
http://bing.com/ http://pinterest.com/ http://blogspot.com/ http://live.com/ http://go.com/ | |
http://instagram.com/ http://cnn.com/ http://paypal.com/ http://tumblr.com/ http://reddit.com/ | |
http://imgur.com/ http://espn.go.com/ http://huffingtonpost.com/ http://wordpress.com/ http://netflix.com/ | |
http://yelp.com/ http://msn.com/ http://apple.com/ http://imdb.com/ http://weather.com/ | |
http://aol.com/ http://microsoft.com/ http://chase.com/ http://nytimes.com/ http://bankofamerica.com/ | |
http://godaddy.com/ http://zillow.com/ http://buzzfeed.com/ http://about.com/ http://walmart.com/ | |
http://foxnews.com/ http://secureserver.net/ http://ask.com/ http://wellsfargo.com/ |