Skip to content

Instantly share code, notes, and snippets.

View antulik's full-sized avatar

Anton Katunin antulik

View GitHub Profile
@antulik
antulik / pack.js
Created November 17, 2012 06:25
D3 Pack with links
var width = 960,
height = 960,
format = d3.format(",d");
var pack = d3.layout.pack()
.size([width - 4, height - 4])
.padding(10)
.value(function(d) { return d.size; });
var vis = d3.select("#chart").append("svg")
@antulik
antulik / _.md
Created February 2, 2013 05:03
d3.timer
@antulik
antulik / data_conversion.js
Last active December 12, 2015 08:19
Convert csv to json string
var csv_url = "/proj-pop-age-all-series-qld.csv";
d3.csv(csv_url, function(a) {
a.forEach(function(el){
el.year = parseInt(el.year)
el.age = parseInt(el.age)
el.low = parseInt(el.low)
el.medium = parseInt(el.medium)
el.high = parseInt(el.high)
})
@antulik
antulik / _.md
Created February 9, 2013 03:42
martix_heat
@antulik
antulik / _.md
Created February 9, 2013 06:21
mouse_circle
@antulik
antulik / _.md
Created February 9, 2013 06:30
series_lines
@antulik
antulik / _.md
Created February 9, 2013 06:44
force_example
@antulik
antulik / README.md
Last active December 14, 2015 10:09
CampJS D3.JS Links
class ProfilesController < ApplicationController
def index
@tracking_profiles = current_user.tracking_profiles
end
end
# OLD
context 'when token is expired' do
let!(:user) { create :user, discord_token_expired: true }
context 'when token refresh successful' do
let(:response) { build(:discord_refresh_token_response) }
before do
stub_request(:post, "https://discordapp.com/api/v6/oauth2/token")
.to_return(body: response.to_json)