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
# A BoxStarter script for use with http://boxstarter.org/WebLauncher | |
# Updates a Windows machine and installs a range of developer tools | |
# Show more info for files in Explorer | |
Set-WindowsExplorerOptions -EnableShowProtectedOSFiles -EnableShowFileExtensions -EnableShowFullPathInTitleBar | |
# Enable remote desktop | |
Enable-RemoteDesktop | |
# Small taskbar |
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 java.io.BufferedReader; | |
import java.io.InputStreamReader; | |
import java.net.URL; | |
import java.util.ArrayList; | |
import java.util.HashMap; | |
import java.util.List; | |
import java.util.concurrent.Callable; | |
import java.util.concurrent.CompletionService; | |
import java.util.concurrent.ExecutorCompletionService; | |
import java.util.concurrent.ExecutorService; |
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
from selenium import selenium | |
from scrapy.spider import BaseSpider | |
from scrapy.http import Request | |
import time | |
import lxml.html | |
class SeleniumSprider(BaseSpider): | |
name = "selenium" | |
allowed_domains = ['selenium.com'] | |
start_urls = ["http://localhost"] |
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
%w(sinatra dm-core dm-migrations haml alphadecimal uri).each { |lib| require lib} | |
get '/' do haml :index end | |
get '/:url' do redirect Url.first(:id => params['url'].alphadecimal).origin end | |
post '/' do | |
uri = URI::parse(params['origin']) | |
raise "Invalid URL" unless uri.kind_of? URI::HTTP or uri.kind_of? URI::HTTPS | |
@url = Url.first_or_create(:origin => uri.to_s) |
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
require 'sinatra' | |
require 'dm-core' | |
require 'dm-migrations' | |
require 'haml' | |
class Todo | |
include DataMapper::Resource | |
property :id, Serial | |
property :text, String | |
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
require 'xmlrpc/client.rb' | |
require 'net/http' | |
require 'uri' | |
require 'logger' | |
class Wp2Tumblr | |
TUMBLR_API_WRITE = 'http://www.tumblr.com/api/write' | |
def initialize(credentials) | |
@wpurl, @wpuser, @wppass, @tumbemail, @tumbpass = credentials |