This file contains 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 | |
# The script that give you focus! | |
# Create a text file that contains sites want to give yourself | |
# access to only during certain times of day. | |
# | |
# The file will look like this: | |
# 12 news.ycombinator.com | |
# 11-13,19-21 twitter.com | |
# |
This file contains 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 | |
# sanity.rb, the ruby script that keeps your twitter timeline manageable. | |
# | |
# This script is meant to be run every few hours, and will show you | |
# tweets from the people you tell it to. That guy that retweets every 10 minutes? You can | |
# leave him off your list. | |
# | |
# Create a file in yaml format that looks like this: | |
# auth: |
This file contains 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
javascript:document.querySelector("meta[name='viewport']").setAttribute("content", "width=device-width; initial-scale=1.0; maximum-scale=5.0; user-scalable=1;"); |
This file contains 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 'rubygems' | |
require 'active_record' | |
require 'logger' | |
ActiveRecord::Base.establish_connection({:adapter => "sqlite3", :database => ":memory:"}) | |
ActiveRecord::Base.logger = Logger.new(STDOUT) | |
ActiveRecord::Schema.define do | |
create_table :people do |t| |
This file contains 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 | |
# | |
require 'rubygems' | |
require 'garb' | |
require 'active_support/core_ext' | |
Garb::Session.login(ENV["GA_USERNAME"], ENV["GA_PASSWORD"]) | |
profile = Garb::Management::Profile.all.find {|p| p.web_property_id == ENV["GA_UA_STRING"] } |
This file contains 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 | |
class AdditionProblemGenerator | |
attr_accessor :max, :number_of_problems | |
def initialize(max = 20, number_of_problems = 20) | |
self.max = max | |
self.number_of_problems = number_of_problems | |
end |
This file contains 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
[root@rhel6vm-community1 deployments]# /usr/java/jdk1.7.0_01/bin/jstack 7370 | |
2012-01-03 17:30:59 | |
Full thread dump Java HotSpot(TM) 64-Bit Server VM (21.1-b02 mixed mode): | |
"Attach Listener" daemon prio=10 tid=0x00007fd7dc001000 nid=0x221a waiting on condition [0x0000000000000000] | |
java.lang.Thread.State: RUNNABLE | |
"RubyThread-1: /usr/local/rvm/gems/jruby-1.6.5.1@torquebox_12_11/gems/torquebox-rake-support-2.0.0.beta1/lib/torquebox/deploy_utils.rb:293" daemon prio=10 tid=0x00007fd818686000 nid=0x1ce2 runnable [0x00007fd7e119f000] | |
java.lang.Thread.State: RUNNABLE | |
at java.io.FileInputStream.readBytes(Native Method) |
This file contains 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
TorqueBox.configure do | |
web do | |
context "/" | |
end | |
ruby do | |
version "1.9" | |
end | |
end |
This file contains 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
12:54:07,541 INFO [org.torquebox.core.runtime] (Thread-2 (HornetQ-client-global-threads-774148213)) Creating ruby runtime (ruby_version: RUBY1_9, compile_mode: JIT, app: frontend_02_13_2012_jruby, context: messaging) |
This file contains 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
12:54:20,115 INFO [org.torquebox.core.runtime] (Thread-2 (HornetQ-client-global-threads-774148213)) Created ruby runtime (ruby_version: RUBY1_9, compile_mode: JIT, app: frontend_02_13_2012_jruby, context: messaging) in 12.57s | |
12:54:20,550 ERROR [stderr] (Thread-2 (HornetQ-client-global-threads-774148213)) FutureResponder#respond: An error occured: | |
12:54:20,550 ERROR [stderr] (Thread-2 (HornetQ-client-global-threads-774148213)) uninitialized constant ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::PGconn | |
12:54:20,550 ERROR [stderr] (Thread-2 (HornetQ-client-global-threads-774148213)) /usr/local/jruby/lib/ruby/gems/1.8/gems/activesupport-2.3.11/lib/active_support/dependencies.rb:131:in `const_missing' | |
12:54:20,551 ERROR [stderr] (Thread-2 (HornetQ-client-global-threads-774148213)) /usr/local/jruby/lib/ruby/gems/1.8/gems/activerecord-2.3.11/lib/active_record/connection_adapters/postgresql_adapter.rb:941:in `connect' | |
12:54:20,551 ERROR [stderr] (Thread-2 (HornetQ-client-global-threads-774148213)) /usr/loca |
OlderNewer