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
| 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\]" |
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
| 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... |
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
| 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 |
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 | |
| 1.upto(256) do |n| | |
| puts "#{n}: \e[38;5;#{n}mcool\e[0m" | |
| 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
| 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 |
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 'twitter_oauth' | |
| ck = 'consumer_key' | |
| cs = 'consumer_secret' | |
| client = TwitterOAuth::Client.new( | |
| :consumer_key => ck, | |
| :consumer_secret => cs | |
| ) |
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
| if (typeof Relife !== "object") { | |
| Relife = {}; | |
| } | |
| Relife.max_chat_lines = 100; | |
| Relife.chat_interval = null; | |
| Relife.current_channel = null; | |
| Relife.ajaxQueue = { | |
| _queue: [], | |
| processing: false, |
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 'omniauth/oauth' | |
| require 'multi_json' | |
| module OmniAuth | |
| module Strategies | |
| # | |
| # Authenticate to Google via OAuth and retrieve basic | |
| # user information. | |
| # | |
| # Usage: |
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 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?) |
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
| ; | |
| ; 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 |