Skip to content

Instantly share code, notes, and snippets.

View doge
# ami-9f6150f6 and g2.2xlarge =~ 145 doge/hour
# request spot instances at a max price
vim cudaminer.json
vim cpuminer.json
sudo restart cudaminer
sudo restart cpuminer
sudo tail -f /var/log/upstart/cudaminer.log /var/log/upstart/cpuminer.log

Keybase proof

I hereby claim:

  • I am joeyschoblaska on github.
  • I am joeyschoblaska ( on keybase.
  • I have a public key whose fingerprint is A2BA 9022 9DA2 1357 CFBD 915F 2053 C1F0 2BA0 C961

To claim this, I am signing this object:

View gist:636eef7c9f85f1c68425
4 Hands slngle speed
4 H£Dl1.S'E!SWlD_l] Ca, 5L Llmls, M0
541; MW
Allagash whlte
Allagasa Ersmng company, ponlanlz ME
5241: MW
View gist:98feb746dc49c01dcc04

start with an opening explorer. have a way to comment on each position, maybe even to up/downvote comments so that a user can give a good explanation of what is going on in the position and have it surface to the top. solicit comments for each move and position, prioritizing the most common-occuring ones. good, approachable explanations like this:

let players upload their games. analyze them, show blunders, rating changes. nice commenting system to make analysis easier. take tactics from games and put them into a tactics trainer pool. use this to figure out how difficult each tactic is and to get users to classify them. use this info to help players understand what tactics they're missing in their games. automatically build their opening book based on what they play, and help them find holes

when using opening explorer, allow user to choose different game sets. ex: I want to know what people rated 1200-1400 play against this defense

take the chess position trai

joeyschoblaska / queries.rb
Last active Aug 29, 2015
tracking down which lines of code are executing mysql queries
View queries.rb
$queries = 0
$locations = { |h, k| h[k] = 0 }
class ActiveRecord::ConnectionAdapters::AbstractMysqlAdapter
def execute_with_tracking(sql, name = nil)
$queries += 1{ |c| c =~ /app/ }.each{ |c| $locations[c] += 1 }
execute_without_tracking(sql, name)
View gist:46570
# This is a blog post I wrote almost two years ago. It was some of the first Ruby I ever uttered, and not
# entirely useful or elegant, but I'm reposting it now because I recently received a requst for it.
# Ruby on Rails: Working With a Legacy Database With a Non-Integer Primary Key
# For a project I'm currently working on, I needed to get my Rails application to work with a legacy
# database that used a non-integer primary key (in this case, a field called "loginID", which is basically
# a username). First, I tried to use "set_primary_key" to define my PK, but Rails was having none of that.
View gist:2080024
<?xml version="1.0" standalone="no"?>
<svg viewBox = "0 0 1100 350" version = "1.1" preserveAspectRatio = "xMidYMid meet" zoomAndPan = "magnify" contentScriptType = "application/ecmascript" contentStyleType = "text/css">
<circle cx="400" cy="350" r="300" stroke="red" stroke-width="5" fill="none"/>
<circle cx="100" cy="50" r="3" stroke="blue"fill="blue"/>
<path id = "quadcurveABC" d = "M 100 350 q 0 -300 300 -300" stroke = "blue" stroke-width = "5" fill = "none"/>
View gist:3171990
diff --git a/spec/urbanairship_spec.rb b/spec/urbanairship_spec.rb
index 224591e..2fa550f 100644
--- a/spec/urbanairship_spec.rb
+++ b/spec/urbanairship_spec.rb
@@ -454,9 +454,12 @@ describe Urbanairship do
it "does not attempt to log if logger is not set" do
+ Urbanairship::Timer.should_receive(:timeout).with(5.0).and_raise(Timeout::Error)
Urbanairship.logger = nil
  • 2 eggs
  • 3 oz (by volume) baker's sugar
  • 1/2 tsp nutmeg
  • 4 oz bourbon, brandy or rum
  • 6 oz whole milk
  • 4 oz heavy cream

Whip eggs and sugar, then add remaining ingredients. Garnish with more nutmeg.

View spec_age.rb
require "date"
specs = []
def get_indentation(line)
end["FILE"]) do |file|
spec = nil