Skip to content

Instantly share code, notes, and snippets.

View audiodude's full-sized avatar

Travis Briggs audiodude

View GitHub Profile
g++ -I. -I/opt/local/lib/ruby/1.8/i686-darwin9 -I/opt/local/lib/ruby/1.8/i686-darwin9 -I. -I/opt/local/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -fno-common -O2 -fno-common -pipe -fno-common -c board_tanbo.cpp
g++ -I. -I/opt/local/lib/ruby/1.8/i686-darwin9 -I/opt/local/lib/ruby/1.8/i686-darwin9 -I. -I/opt/local/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -fno-common -O2 -fno-common -pipe -fno-common -c point_tanbo.cpp
board_tanbo.h: In static member function ‘static bool BoardTanbo::in_bounds(const PointTanbo*)’:
board_tanbo.h:53: error: invalid use of undefined type ‘const struct PointTanbo’
board_tanbo.h:44: error: forward declaration of ‘const struct PointTanbo’
board_tanbo.h:53: error: invalid use of undefined type ‘const struct PointTanbo’
board_tanbo.h:44: error: forward declaration of ‘const struct PointTanbo’
board_tanbo.h:53: error: invalid use of undefined type ‘const struct PointTanbo’
board_tanbo.h:44: error: forward declaration of ‘const struct PointTanbo’
board_tanbo.h:53: error: inv
g++ -c -I/opt/local/include/ -I/Users/tmoney/code/rb/Ruby-Tanbo/ai/ruby_uct -o test/test_board.o test/test_board.cpp
g++ -c -I/opt/local/include/ -I/Users/tmoney/code/rb/Ruby-Tanbo/ai/ruby_uct -o test/test_moves.o test/test_moves.cpp
g++ -c -I/opt/local/include/ -I/Users/tmoney/code/rb/Ruby-Tanbo/ai/ruby_uct -o test/test_roots.o test/test_roots.cpp
g++ -c -I/opt/local/include/ -I/Users/tmoney/code/rb/Ruby-Tanbo/ai/ruby_uct -o test/ruby_uct_fixture.o test/ruby_uct_fixture.cpp
g++ -L/opt/local/lib/ -o testrunner test/test_board.o test/test_moves.o test/test_roots.o test/ruby_uct_fixture.o -lruby -lcppunit
Undefined symbols:
"typeinfo for RubyTanboTest", referenced from:
typeinfo for BoardTestin ruby_uct_fixture.o
"vtable for RubyTanboTest", referenced from:
__ZTV13RubyTanboTest$non_lazy_ptr in ruby_uct_fixture.o
from lxml import etree
from urllib2 import urlopen, HTTPError
try:
etree.parse(urlopen('http://www.google.com/search?q=forbidden'))
except HTTPError as e:
root = etree.HTML(e.read())
h1 = root.xpath('//h1')
for h1s in h1:
print h1s.tail
Control.TabsDynamic = Class.create({
initialize: function(link_to_container_map,options){
this.activeContainer = false;
this.activeLink = false;
this.containers = $H({});
this.links = [];
Control.TabsDynamic.instances.push(this);
this.options = {
beforeChange: Prototype.emptyFunction,
afterChange: Prototype.emptyFunction,
@audiodude
audiodude / README.textile
Created March 1, 2011 21:21
Export your SSH variables for use with GNU screen
  1. Put scratch in ~/bin/
  2. Put itch in your .bashrc
  3. Start screen with ‘scratch’ instead of screen (SCReen ATtaCH)
  4. As soon as you’re in your screen, if it’s not a new screen, `itch` that scratch!

Thanks to Samat Jane

module Paperclip
# Handles thumbnailing videos that are uploaded.
class FlvConvert < Processor
def initialize file, options = {}, attachment = nil
super
@file = file
@current_format = File.extname(@file.path)
@basename = File.basename(@file.path, @current_format)
@audiodude
audiodude / .screenrc
Created July 1, 2011 08:47
My .screenrc file, for safekeeping and sharing
# C-a :source .screenrc
escape ^gg
@audiodude
audiodude / gist:2714860
Created May 16, 2012 23:22 — forked from kevinzen/gist:2711857
Job Description for a Ruby Developer at http://dmcouncil.org
Company: The District Management Council http://www.dmcouncil.org
Position: Ruby on Rails Developer(s)
The District Management Council is seeking skilled and passionate Rails developers
to help us shape the future of public education.
We develop innovative web applications to meet the most pressing challenges
facing public school districts today. Public schools across America are using
our software and services to increase the effectiveness of Special Education
@audiodude
audiodude / gist:2765025
Created May 21, 2012 22:14
Red Sox 25 Man Roster in order of ... ?
Daniel Bard
Ryan Sweeney
Cody Ross
Mike Aviles
Adrian Gonzales
Daniel Nava
Jon Lester
Andrew Miller
Jarrod Saltalamacchia
Dustin Pedroia
2012-07-11 01:03:57+0000 [scrapy] INFO: Scrapy 0.14.4 started (bot: artchart.info_wikiscrape)
2012-07-11 01:03:57+0000 [scrapy] DEBUG: Enabled extensions: LogStats, TelnetConsole, CloseSpider, WebService, CoreStats, MemoryUsage, SpiderState
2012-07-11 01:03:57+0000 [scrapy] DEBUG: Enabled downloader middlewares: HttpAuthMiddleware, DownloadTimeoutMiddleware, UserAgentMiddleware, RetryMiddleware, DefaultHeadersMiddleware, RedirectMiddleware, CookiesMiddleware, HttpCompressionMiddleware, ChunkedTransferMiddleware, DownloaderStats
2012-07-11 01:03:57+0000 [scrapy] DEBUG: Enabled spider middlewares: HttpErrorMiddleware, OffsiteMiddleware, RefererMiddleware, UrlLengthMiddleware, DepthMiddleware
2012-07-11 01:03:57+0000 [scrapy] DEBUG: Enabled item pipelines:
2012-07-11 01:03:57+0000 [wikipedia] INFO: Spider opened
2012-07-11 01:03:57+0000 [wikipedia] INFO: Crawled 0 pages (at 0 pages/min), scraped 0 items (at 0 items/min)
2012-07-11 01:03:57+0000 [scrapy] DEBUG: Telnet console listening on 0.0.0.0:6024
2012-07-11