Skip to content

Instantly share code, notes, and snippets.

View zocoi's full-sized avatar

Hưng Đào zocoi

View GitHub Profile
@zocoi
zocoi / README.md
Last active August 29, 2015 13:57 — forked from milroc/README.md

d3.unconf example gist. Fork it here.

class Post < ActiveRecord::Base
has_many :comments
end
class TwitterNotification < ActiveRecord::Observer
observe :post
def after_create post
TwitterService.send_tweet post.subject
end
@zocoi
zocoi / README.md
Last active August 29, 2015 14:17 — forked from mbostock/.block

An example of using transition.styleTween to avoid using the computed style value, and instead use the style value as-set.

@zocoi
zocoi / gist:5075340
Last active December 14, 2015 10:58
// 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,
#!/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***
#
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
@zocoi
zocoi / state_loader.sh
Last active November 28, 2016 20:14
state_loader.sh
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

What I Wish I'd Known About Equity Before Joining A Unicorn

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

{
"data": [
{
"id": "47245daa-8d79-43f7-a7a4-02d69cd59970",
"type": "cities",
"attributes": {
"name": "San Francisco",
"slug": "san-francisco",
"state": "CA",
"country": "US",
var intervalID = window.setInterval(myCallback, 1000);
function myCallback() {
var $claim = $("#claim")
if (!$claim.is(":disabled")) {
$claim.click()
clearInterval(intervalID)
}
}