d3.unconf example gist. Fork it here.
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
class Post < ActiveRecord::Base | |
has_many :comments | |
end | |
class TwitterNotification < ActiveRecord::Observer | |
observe :post | |
def after_create post | |
TwitterService.send_tweet post.subject | |
end |
An example of using transition.styleTween to avoid using the computed style value, and instead use the style value as-set.
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
// GET /users/1 | |
{ | |
address: null, | |
city: null, | |
country: null, | |
created_at: "2013-03-03T06:24:53Z", | |
email: "hung.dao@me.com", | |
id: 1, | |
license_plate: null, | |
name: null, |
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 "nokogiri" | |
# opens every file in the given dir tree and converts any html img tags to rails image_tag calls | |
# | |
# example usage: | |
# ruby convert.rb ~/my_rails_app/app/views | |
# | |
# ***be careful and backup before using this*** | |
# |
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
TMPDIR="/gisdata/temp/" | |
UNZIPTOOL=unzip | |
WGETTOOL="/usr/bin/wget" | |
export PGBIN=/usr/local/bin | |
export PGPORT=5432 | |
export PGHOST=localhost | |
export PGUSER=hung | |
export PGPASSWORD= | |
export PGDATABASE=geocoder | |
PSQL=${PGBIN}/psql |
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
TMPDIR="/gisdata/temp/" | |
UNZIPTOOL=unzip | |
WGETTOOL="/usr/bin/wget" | |
export PGBIN=/usr/local/bin | |
export PGPORT=5432 | |
export PGHOST=localhost | |
export PGUSER=hung | |
export PGPASSWORD= | |
export PGDATABASE=geocoder | |
PSQL=${PGBIN}/psql |
Disclaimer: This piece is written anonymously. The names of a few particular companies are mentioned, but as common examples only.
This is a short write-up on things that I wish I'd known and considered before joining a private company (aka startup, aka unicorn in some cases). I'm not trying to make the case that you should never join a private company, but the power imbalance between founder and employee is extreme, and that potential candidates would
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
{ | |
"data": [ | |
{ | |
"id": "47245daa-8d79-43f7-a7a4-02d69cd59970", | |
"type": "cities", | |
"attributes": { | |
"name": "San Francisco", | |
"slug": "san-francisco", | |
"state": "CA", | |
"country": "US", |
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
var intervalID = window.setInterval(myCallback, 1000); | |
function myCallback() { | |
var $claim = $("#claim") | |
if (!$claim.is(":disabled")) { | |
$claim.click() | |
clearInterval(intervalID) | |
} | |
} |
OlderNewer