Skip to content

Instantly share code, notes, and snippets.

View xxx's full-sized avatar

Michael Dungan xxx

View GitHub Profile
export EDITOR=vim
function proml {
local BLUE="\[\e[0;34m\]"
local LIGHT_BLUE="\[\e[1;34m\]"
local GREEN="\[\e[0;32m\]"
local CYAN="\[\e[0;36m\]"
local MAGENTA="\[\e[0;35m\]"
local BROWN="\[\e[0;33m\]"
local YELLOW="\[\e[1;33m\]"
Build 'Stipple :: specs' #229
Started 'Tue Nov 30 11:34:37 PST 2010' on 'localhost' by 'you'
Finished 'Tue Nov 30 11:35:16 PST 2010' with status 'ERROR Failure'
TeamCity URL http://10.1.10.240:8111/viewLog.html?buildId=232&buildTypeId=bt2
[11:34:33]: bt2
[11:34:33]: Checking for changes
[11:34:37]: Clearing temporary directory: /Users/rails/TeamCity/buildAgent/temp/buildTmp
[11:34:37]: Checkout directory: /Users/rails/TeamCity/buildAgent/work/8623e932642026bb
[11:34:37]: Updating sources: server side checkout...
if Rails.env.production?
module OmniAuth
module Strategy
def full_host
uri = URI.parse(request.url)
uri.path = ''
uri.query = nil
uri.port = (uri.scheme == 'https' ? 443 : 80)
uri.to_s
end
#!/usr/bin/env ruby
1.upto(256) do |n|
puts "#{n}: \e[38;5;#{n}mcool\e[0m"
end
@xxx
xxx / gthang.rb
Created September 18, 2010 02:35
class GThang
def onedkernel(sigma, radius = 3)
(0 - radius).upto(0 + radius).map do |x|
onedgaussian(sigma, x)
end
end
def onedgaussian(sigma, x)
twosigsquared = 2.0 * sigma * sigma
(1.0 / (Math.sqrt(2 * Math::PI) * sigma)) * (Math::E ** (-1 * ((x * x) / two
require 'YAML'
require 'twitter_oauth'
ck = 'consumer_key'
cs = 'consumer_secret'
client = TwitterOAuth::Client.new(
:consumer_key => ck,
:consumer_secret => cs
)
if (typeof Relife !== "object") {
Relife = {};
}
Relife.max_chat_lines = 100;
Relife.chat_interval = null;
Relife.current_channel = null;
Relife.ajaxQueue = {
_queue: [],
processing: false,
require 'omniauth/oauth'
require 'multi_json'
module OmniAuth
module Strategies
#
# Authenticate to Google via OAuth and retrieve basic
# user information.
#
# Usage:
class String
define_method :starts_with? do |other|
head = self[0, other.length]
head == other
end unless defined?(:starts_with?)
define_method :ends_with? do |other|
tail = self[-1 * other.length, other.length]
tail == other
end unless defined?(:ends_with?)
;
; url grabber
; vega@Sanity's Edge
; Notes: The -c switch to /url requires your system's sed utility to
; support the -i (update file in-place) option. It would be
; fairly trivial to re-write it to use redirects, but i
; don't feel like doing it.
;
; config