Skip to content

Instantly share code, notes, and snippets.

ECO Count Name PGN
A40 2,160,508 Queen Pawn Opening 1.d4
B00 1,398,214 King's Pawn 1.e4
C20 1,050,507 King Pawn Game 1.e4 e5
B20 955,201 Sicilian Defense 1.e4 c5
D00 661,940 Queen Pawn Game 1.d4 d5
A45 651,186 Indian Game 1.d4 Nf6
C44 571,079 King's Knight Opening: Normal Variation 1.e4 e5 2.Nf3 Nc6
C40 532,194 King's Knight Opening 1.e4 e5 2.Nf3
B50 517,282 Sicilian Defense: Modern Variations 1.e4 c5 2.Nf3 d6
@schoblaska
schoblaska / queries.rb
Last active August 29, 2015 14:18
tracking down which lines of code are executing mysql queries
$queries = 0
$locations = Hash.new { |h, k| h[k] = 0 }
class ActiveRecord::ConnectionAdapters::AbstractMysqlAdapter
def execute_with_tracking(sql, name = nil)
$queries += 1
caller.select{ |c| c =~ /app/ }.each{ |c| $locations[c] += 1 }
execute_without_tracking(sql, name)
end

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: http://www.eudesign.com/chessops/epin-01b.htm

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

AMERICAN
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

Keybase proof

I hereby claim:

  • I am joeyschoblaska on github.
  • I am joeyschoblaska (https://keybase.io/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:

@schoblaska
schoblaska / doge
Last active August 29, 2015 13:55
# 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
@schoblaska
schoblaska / craigslist.rake
Last active December 16, 2015 21:59
A rake task to scan Craigslist periodically and email any new listings that match a set of parameters.
require 'open-uri'
def in_bounds?(lat, lng)
bounds = [
{:north => 41.87849, :east => -87.623917, :south => 41.872041, :west => -87.633787}
]
bounds.any?{|b| lat >= b[:south] && lat <= b[:north] && lng <= b[:east] && lng >= b[:west]}
end
@schoblaska
schoblaska / text_cats
Last active March 7, 2017 14:50
An example of the "text/cats" content-type.
$ curl -v "http://api.groupon.com/v2/deals/nori-chicago-2.cats?client_id=21a3dda11309f0db69bdbefddda4a9625a66cd77"
< HTTP/1.1 200 OK
< Content-Type: text/cats; charset=utf-8
{"de
al":{"
tipped
At":"2
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
end
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
<?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"/>
</svg>