Skip to content

Instantly share code, notes, and snippets.

@bsoule
bsoule / index.html
Last active March 22, 2019 22:11
object error event
<!DOCTYPE html>
<html>
<head>
<title>test object svg reload</title>
</head>
<script>
let beeurl = "https://www.beeminder.com/legacy_images/infinibee.svg"
let noturl = "https://beeminder-dev.s3-us-west-2.amazonaws.com/not-a-valid-file-name.svg"
let svgurl = "https://s3-us-west-2.amazonaws.com/beeminder-dev/graphwith.svg"
function updateSVG(url) {
@bsoule
bsoule / gmail_count.rb
Created September 22, 2012 05:07
Count the number of read messages in your gmail inbox
require 'util'
require 'lib/imap_patch'
## gmail zero game (from Gemfile)
# gem 'gmail', '= 0.4.0',
# :git => 'https://github.com/nu7hatch/gmail.git',
# :branch => 'master'
class GmailCount
@bsoule
bsoule / dabblet.css
Created December 22, 2014 21:19 — forked from anonymous/dabblet.css
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
body {
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
margin: 0px;
text-align: center;
}
@bsoule
bsoule / spec_helper.rb
Created November 18, 2014 05:21
Today Stripe dropped support for SSLv3 protocol. We're using an older version of PhantomJS in our specs, which defaults to sslv3, so this broke a swath of the Beeminder test suite. Here's the fix for anyone else with PhantomJS tests that wants to force not-sslv3.
require 'capybara/poltergeist'
Capybara.register_driver :poltergeist do |app|
Capybara::Poltergeist::Driver.new(app, :inspector => true, :js_errors => true, :phantomjs_options => ['--ssl-protocol=tlsv1'])
end