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 'yaml' | |
| require 'erb' | |
| class Struct | |
| def get_binding | |
| binding | |
| end | |
| end | |
| class ConfigTemplate |
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 python | |
| import urllib, urllib2, json, sys | |
| username = "username" | |
| password = "password" | |
| def formatAtom(atom): | |
| atom = atom.strip() | |
| if atom.startswith('http://') or atom.startswith('https://'): | |
| data = urllib.urlopen("http://ur.ly/new.json?href=%s" % urllib.quote(atom)).read() |
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 'formula' | |
| class R <Formula | |
| url 'http://cran.r-project.org/src/base/R-2/R-2.12.1.tar.gz' | |
| homepage 'http://www.R-project.org/' | |
| md5 '078e8d1179fc9a762e326e6da2725468' | |
| depends_on 'readline' | |
| def install |
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
| """ | |
| DOMLight is a little library for making DOM's more accessable in python. | |
| Copyright (C) 2011 Brian Muller <bamuller@gmail.com> | |
| This program is free software; you can redistribute it and/or | |
| modify it under the terms of the GNU General Public License | |
| as published by the Free Software Foundation; either version 2 | |
| of the License, or (at your option) any later version. | |
| This program is distributed in the hope that it will be useful, |
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 Symbol | |
| def |(*args) | |
| @args = args | |
| self | |
| end | |
| def to_proc | |
| Proc.new { |obj| | |
| obj.send *[self] + (@args || []) | |
| } |
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
| // ==UserScript== | |
| // @name Pivtol Tracker Fixes | |
| // @namespace userscripts.org | |
| // @description Show all stories that have been started on the projects page | |
| // @include https://tracker.*.com/projects | |
| // @copyright Brian Muller | |
| // @version 0.0.1 | |
| // @require http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.js | |
| // ==/UserScript== |
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
| [user] | |
| email = bamuller@gmial.com | |
| name = Brian Muller | |
| [color] | |
| branch = auto | |
| diff = auto | |
| interactive = auto | |
| status = auto | |
| [core] | |
| editor = emacs |
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
| def detect_executive(resume) | |
| words = resume.downcase.scan(/[a-z0-9#]+/i) | |
| corporatespeak = { :budget => 'budget', :revenue => 'revenue', :strategy => 'strateg', :seo => 'seo', :sem => 'sem', :enable => 'enable', :service => 'service', :analytics => 'analy', :consulting => 'consult', :directing => 'direct', :enterprise => 'enterpris', :media => 'media', :empower => 'empower', :lead => 'lead', :plan => 'plan', :executive => 'executive' } | |
| counts = {} | |
| corporatespeak.each { |title, match| | |
| counts[title] = words.select { |w| w.include? match }.count | |
| } | |
| puts "Word Counts:" | |
| score = 0 | |
| counts.select { |k,v| v > 1 }.each { |k,v| puts "#{k}: #{v}"; score += v } |
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 twisted.internet.defer import succeed | |
| from twisted.web import server | |
| from twisted.web.test.test_web import DummyRequest | |
| class SmartDummyRequest(DummyRequest): | |
| def __init__(self, method, url, args=None, headers=None): | |
| DummyRequest.__init__(self, url.split('/')) | |
| self.method = method | |
| self.headers.update(headers or {}) |
OlderNewer