Skip to content

Instantly share code, notes, and snippets.

View antulik's full-sized avatar

Anton Katunin antulik

View GitHub Profile
class ProfilesController < ApplicationController
def index
@tracking_profiles = current_user.tracking_profiles
end
end

NVD3

http://nvd3.org/

  • Initial evaluation: seems the most mature. Apparently, has bad documentation, and is hard to use without going to its source code.
    • undergoing big rewrite

dimple

http://dimplejs.org/

  • Initial evaluation: its main goal is to offer a simple API to create charts
@antulik
antulik / one.md
Last active August 29, 2015 14:07
responsive grids
@antulik
antulik / one.js
Created October 1, 2014 06:53 — forked from artem-a/punchcard.js
var D3punchcard = function(el, options) {
options || (options = {});
var _chart = {};
var _svg = null;
var _this = this;
_this.el = el
_this.data = options.data;
var days = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];

Header 1

Header 2

Header 3 ### (Hashes on right are optional)

Header 4

Header 5

Markdown plus h2 with a custom ID ## {#id-goes-here}

Link back to H2

This is a paragraph, which is text surrounded by whitespace. Paragraphs can be on one

braintree

  • AU
  • 2.4% + $0.30
  • 9 currencies
  • US 2.9% + $0.30
  • recurring billing
  • 40 countries, 130 currencies
  • $25 chargeback
@antulik
antulik / controller_1.rb
Last active August 29, 2015 14:11
render_js
def show
render_js do
if result[:error]
messenger_error(message: result[:error][:message])
else
messenger_success(message: 'Your message was sent successfully')
end
hide_modal
end
end
@antulik
antulik / one.rb
Created August 13, 2015 05:49
dragon fly helper
def thumb_url photo, size
case photo
when ImageUploader
if Rails.env.development?
path = photo.path
else
path = photo.url
end
when String
path = photo
# 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)