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
tell application "iTunes" to activate | |
try | |
menu_click({"iTunes", "View", "Show Up Next"}) | |
on error | |
menu_click({"iTunes", "View", "Hide Up Next"}) | |
end try | |
-- `menu_click`, by Jacob Rus, September 2006 | |
-- | |
-- Accepts a list of form: `{"Finder", "View", "Arrange By", "Date"}` | |
-- Execute the specified menu item. In this case, assuming the Finder |
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 urllib2 | |
import urllib | |
import json | |
import webbrowser | |
import sys | |
origin = "78704" | |
destination = urllib.quote(sys.argv[1],'') |
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
/* | |
* Globals | |
*/ | |
/* Links */ | |
a, | |
a:focus, | |
a:hover { | |
color: #fff; | |
} |
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
# 80legs Bulk Robots Checker | |
# 80legs.com 2014 | |
# Usage: ruby robots.rb <path_to_url_list> | |
# Example: $> ruby robots.rb /Users/nick/Documents/url_list_1.txt | |
# | |
# Installation/Requirements: | |
# gem install rest-client | |
# | |
class RobotsParser | |
require 'json' |
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
# 80legs Bulk Robots Checker | |
# 80legs.com 2014 | |
# Usage: ruby crawlable.rb <path_to_url_list> | |
# Example: $> ruby crawlable.rb /Users/nick/Documents/url_list_1.txt > output.csv | |
# #=> creates a CSV file containing each url, and whether or not it's crawlable | |
# | |
# Installation/Requirements: | |
# gem install robotstxt | |
# | |
class String |
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
class AuthenticatedScraper | |
def initialize(args) | |
if args[:session] | |
@cookie_jar = args[:session] | |
@agent = Mechanize.new | |
@agent.cookie_jar = load_session(@cookie_jar) | |
else | |
@agent = Mechanize.new | |
@agent.login(args[:username], args[ password]) | |
end |
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
gem 'timers' | |
gem 'terminal-notifier' | |
gem 'daemons' |
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
class Account | |
def self.name(id) | |
account = $redis.hget("accounts", id) | |
if account.nil? | |
account = User.find_by(id: id).settings(:personal).account | |
$redis.hset("accounts", id, account) | |
end | |
return account | |
end | |
end |
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
upstream faye_server { | |
server 127.0.0.1:9292; | |
} | |
server { | |
# listen 80; | |
listen 443 ssl; | |
server_name your-faye-server.com; |
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
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'twitter' | |
require 'json' | |
require 'faraday' | |
# things you must configure | |
PATH_TO_DROPBOX = "/Users/your_name/Dropbox/backup/tweets/" # you need to create this folder | |
TWITTER_USER = "your_twitter_username" |
OlderNewer