Skip to content

Instantly share code, notes, and snippets.

Brian Smith Lytol

Block or report user

Report or block Lytol

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:20490
diff --git a/vendor/plugins/masochism/lib/active_reload/connection_proxy.rb b/vendor/plugins/masochism/lib/active_reload/connection_proxy.rb
index 938051c..ed3246f 100644
--- a/vendor/plugins/masochism/lib/active_reload/connection_proxy.rb
+++ b/vendor/plugins/masochism/lib/active_reload/connection_proxy.rb
@@ -9,7 +9,11 @@ module ActiveReload
class ConnectionProxy
def initialize(master, slave)
@slave = slave.connection
+ @slave.instance_eval { @connection.reconnect = true }
+
View gist:24613
require 'digest/sha1'
module SecureToken
def self.secure_digest(*args)
Digest::SHA1.hexdigest(args.flatten.join('--'))
end
def self.generate_token
View gist:29694
fa292fd9 (Jay Swain 2008-11-18 17:20:59 -0800 46) @payment = Payment.new(:offer_id => find_offer_id, :type => 'visa')
View gist:34872
diff --git a/app/models/kid.rb b/app/models/kid.rb
index 0ad1f19..0b36aeb 100644
--- a/app/models/kid.rb
+++ b/app/models/kid.rb
@@ -1182,6 +1182,7 @@ class Kid < ActiveRecord::Base
def initialize_paid_status
# send paid event to client
favor(WebpageCategory.find_by_name("Homework Helper"))
+ logger.info("DEBUG: #{connection.inspect}")
connection.with_master do
View gist:34874
diff --git a/app/models/kid.rb b/app/models/kid.rb
index 0ad1f19..0b36aeb 100644
--- a/app/models/kid.rb
+++ b/app/models/kid.rb
@@ -1182,6 +1182,7 @@ class Kid < ActiveRecord::Base
def initialize_paid_status
# send paid event to client
favor(WebpageCategory.find_by_name("Homework Helper"))
+ logger.info("DEBUG: #{connection.inspect}")
connection.with_master do
View gist.scpt
-- Create a gist from the specified text or the contents of the selected file
--
-- Author: Brian Smith <bsmith@swig505.com>
using terms from application "Quicksilver"
on process text str
my growlRegister()
do shell script "echo '" & str & "' | /usr/local/bin/gist"
growlNotify("Gist Created!", "URL has been copied to clipboard")
View gist:45845
# Rails template for a basic project assuming the following:
#
# - MySQL for the DB
# - Git for version control
#
# Example: rails myapp -d mysql -m RailsTemplate.rb
#
# Author: Brian Smith (bsmith@swig505.com)
#
# Actions:
View gist:91654
namespace :flex do
FLEX_SRC = File.join(Rails.root,"src")
FLEX_LIB = File.join(Rails.root,"vendor/lib")
FLEX_BIN = File.join(Rails.root,"public/assets")
desc "Compile the Flex app and run the test suite"
task :build => [:compile, :test]
View gist:91655
FLEX_SRC = File.join(File.dirname(__FILE__), "src")
FLEX_LIB = File.join(File.dirname(__FILE__), "lib")
FLEX_BIN = File.join(File.dirname(__FILE__), "bin-debug")
task :default => [:compile, :run]
desc "Compile the Flex app"
task :compile do
Dir.chdir(FLEX_SRC) do
Dir["*.mxml"].each do |source_file|
View gist:98228
puts "This is a sample script/runner gist"
You can’t perform that action at this time.