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
# | |
# Apache directives for serving a javascript application. | |
# Requests that don't match a file or directory are served | |
# the index.html file so that your javascript router may load | |
# and handle the requested route. | |
# by Jordan Saints, www.jordansaints.com | |
# | |
# Optional, easier than sudo copying your app to your DocumentRoot. | |
Alias /app /path/to/your/app |
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
dnscrypt-proxy --local-address=127.0.0.1:53 --resolver-address=23.226.227.93:443 --provider-name=2.dnscrypt-cert.okturtles.com --provider-key=1D85:3953:E34F:AFD0:05F9:4C6F:D1CC:E635:D411:9904:0D48:D19A:5D35:0B6A:7C81:73CB |
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
-- OS X version-aware flushing of the DNS cache | |
-- Intended for use in an Alfred Flush-DNS workflow | |
set os_version to do shell script "sw_vers -productVersion" | |
if os_version ≥ "10.3" and os_version < "10.5" then | |
do shell script "lookupd -flushcache" | |
else if os_version < "10.7" then | |
do shell script "dscacheutil -flushcache" | |
else if os_version < "10.9" then | |
do shell script "killall -HUP mDNSResponder" with administrator privileges |
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
var links = []; | |
var quotes = []; | |
var tempUrl = []; | |
var infos = []; | |
var maxLinks = 10; | |
var firstUrl = 'http://www.imdb.com/search/title?at=0&num_votes=5000,&sort=user_rating,desc&start=1&title_type=tv_infoss'; | |
var newUrl; | |
var x = require('casper').selectXPath; |
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
-- Open Chrome's current tab in Safari | |
-- by Jordan Saints, www.jordansaints.com | |
tell application "Google Chrome" | |
activate | |
end tell | |
delay 0.2 | |
tell application "System Events" to key code 37 using {command down} -- cmd+L FOCUS on URL in Chrome | |
delay 0.1 | |
tell application "System Events" to key code 8 using {command down} -- cmd+C COPY |
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
-- Duplicate Chrome's currently open tab in the background | |
-- by Jordan Saints, www.jordansaints.com | |
tell application "Google Chrome" | |
activate | |
end tell | |
tell application "System Events" to key code 37 using {command down} -- cmd+L focuses on omnibar | |
tell application "System Events" to key code 36 using {command down} -- cmd+Return duplicates tab in background |
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
-- Duplicate Firefox's currently open tab | |
-- by Jordan Saints, www.jordansaints.com | |
tell application "Firefox" | |
activate | |
end tell | |
delay 0.2 | |
tell application "System Events" to key code 37 using {command down} -- cmd+L focuses on address bar | |
tell application "System Events" to key code 36 using {option down} -- alt+Return duplicates tab in foreground |
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
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName:'Ember Twiddle', | |
aria: false, | |
actions: { | |
toggleAria() { | |
this.set('aria', !this.get('aria')); |
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
var objectA = { a: '1a', b: '1b', c: '1c' }; | |
var objectB = { a: '2a', b: '2b', d: '2d' }; | |
function objectDifference(minuend, subtrahend) { | |
var firstIntersection = _.omit(minuend, _.keys(subtrahend)), | |
secondIntersection = _.omit(subtrahend, _.keys(minuend)); | |
return _.extend(firstIntersection, secondIntersection); | |
} |
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
############################################ | |
# Modified from emilis bash prompt script | |
# from https://github.com/emilis/emilis-config/blob/master/.bash_ps1 | |
# | |
# Modified for Mac OS X by | |
# @corndogcomputer | |
########################################### | |
# Fill with minuses | |
# (this is recalculated every time the prompt is shown in function prompt_command): | |
fill="—- " |
OlderNewer