Skip to content

Instantly share code, notes, and snippets.

@ono
ono / category.ex
Last active January 13, 2018 12:34
defmodule MyApp.Category do
use Ecto.Schema
alias MyApp.Category
schema "categories" do
field :name, :string
field :description, :string
field :display_order, :integer
embeds_many :children, Child, [on_replace: :delete] do

This role has been filled - Frontend Lead at Food Clubs

  • Start up: shape the build from day 1.
  • Competitive salary, options.
  • Mission: making sustainable food accessible to everyone.
  • Options + Chance of leadership role.
  • Creds: Backed by a leading VC, domain expertise.
  • Team members: Founded/worked on Farmdrop, Wonderbly, Geckoboard...

The company

Keybase proof

I hereby claim:

  • I am ono on github.
  • I am tatsuyaono (https://keybase.io/tatsuyaono) on keybase.
  • I have a public key whose fingerprint is 259B 1703 0E6F 11A9 E23B 40CD ADA9 CDDD DD74 8709

To claim this, I am signing this object:

defmodule Sample.DlxTest do
@moduledoc """
DlxTest shows a sample code of how to work with Dead Exchange Letter on RabbitMQ.
Dead Letter Exchange will let you control retry logic.
## Requirement
- [AMQP](https://hex.pm/packages/amqp)
## How to run

spoke

Front-end developer at Spoke

  • Website: www.spoke.law
  • Location: London Bridge, London, United Kingdom
  • Duration: ~3 month freelance contract (potential to extend)
  • Renumeration: Dependent on experience

ABOUT THE ROLE

@ono
ono / test.md
Last active August 29, 2015 14:21
require 'net/http'
require 'json'
class GeckoboardClient
def initialize(api_key)
@api_key = api_key
end
def url(widget_key)
"https://push.geckoboard.com/v1/send/#{widget_key}"
#!/usr/bin/env ruby
# A copy of script that gets API usage from Librato.
# Some variables are replaced for security reasons - so it won't work as it is for you.
# It's a reference of my blog post on geckoboard blog.
class LibratoMetric
def initialize
@user = APP_CONFIG["librato"]["user"]
@api_token = APP_CONFIG["librato"]["api_token"]
@ono
ono / newrelic_async_sinatra.rb
Last active December 11, 2015 10:38
NewRelic instrumentation async Sinatra. But note that this doesn't instrument EM.callback etc.. You still need custom instrumentation for callbacks.
# NewRelic instrumentation for async_sinatra.
#
# The following code was reffered.
# https://github.com/newrelic/rpm/blob/51767a324046baff0ea4d347862cd4696d73374d/lib/new_relic/agent/instrumentation/sinatra.rb
require 'newrelic_rpm'
require 'new_relic/agent/instrumentation/controller_instrumentation'
module AsyncSinatraInstrumentation
def async_handle_exception_with_newrelic &blk