Skip to content

Instantly share code, notes, and snippets.

Anton Katunin antulik

Block or report user

Report or block antulik

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View spec.rb
# 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)
View controller.rb
class ProfilesController < ApplicationController
def index
@tracking_profiles = current_user.tracking_profiles
end
end
@antulik
antulik / README.md
Last active Dec 14, 2015
CampJS D3.JS Links
View README.md
@antulik
antulik / _.md
Created Feb 9, 2013
force_example
View _.md
@antulik
antulik / _.md
Created Feb 9, 2013
series_lines
View _.md
@antulik
antulik / _.md
Created Feb 9, 2013
mouse_circle
View _.md
@antulik
antulik / data_conversion.js
Last active Dec 12, 2015
Convert csv to json string
View data_conversion.js
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)
})
View _.md
View _.md
@antulik
antulik / pack.js
Created Nov 17, 2012
D3 Pack with links
View pack.js
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")
You can’t perform that action at this time.