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 keybase.md

Keybase proof

I hereby claim:

  • I am antulik on github.
  • I am antulik (https://keybase.io/antulik) on keybase.
  • I have a public key ASCPHuz6XIf7JPcOmonCc9BsNUf47rvmnP3_XFRuo5tQqAo

To claim this, I am signing this object:

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)
@antulik
antulik / one.rb
Created Aug 13, 2015
dragon fly helper
View one.rb
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
View controller_1.rb
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
View .md

braintree

  • AU
  • 2.4% + $0.30
  • 9 currencies
  • US 2.9% + $0.30
  • recurring billing
  • 40 countries, 130 currencies
  • $25 chargeback
View gist:bcc5c487a48f10ecea72

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

View one.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'];
View charting.libraries.md

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
You can’t perform that action at this time.