Skip to content

Instantly share code, notes, and snippets.

Carl Youngblood cayblood

Block or report user

Report or block cayblood

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 rounding_test.ex
iex(1)> alias Decimal, as: D
Decimal
iex(2)> D.set_context(%D.Context{D.get_context | precision: 2})
:ok
iex(3)> D.new("15.620000")
#Decimal<15.620000>
iex(4)> D.round(D.new("15.620000"), 2)
#Decimal<16>
View factory.ex
defmodule Juno.Factory do
use ExMachina.Ecto, repo: Juno.Repo
# import GoodTimes
# import GoodTimes.Convert
alias Juno.Transaction
alias Juno.VirtualCard
def transaction_factory do
%Transaction {
description: "Description",
View mix_phoenix_routes.txt
page_path GET / Juno.PageController :index
virtual_card_path GET /api/virtual_cards Juno.VirtualCardController :index
virtual_card_path GET /api/virtual_cards/new Juno.VirtualCardController :new
virtual_card_path GET /api/virtual_cards/:id Juno.VirtualCardController :show
virtual_card_path POST /api/virtual_cards Juno.VirtualCardController :create
virtual_card_path PATCH /api/virtual_cards/:id Juno.VirtualCardController :update
PUT /api/virtual_cards/:id Juno.VirtualCardController :update
virtual_card_path DELETE /api/virtual_cards/:id Juno.VirtualCardController :delete
virtual_card_t
View twt-embed.js
alert(window.twtPluginOptions);
View keybase.md

Keybase proof

I hereby claim:

  • I am cayblood on github.
  • I am cayblood (https://keybase.io/cayblood) on keybase.
  • I have a public key whose fingerprint is 048A 028F 9778 4D5E 5060 6D67 3F5E 2CD8 C084 BD6B

To claim this, I am signing this object:

View keybase.md

Keybase proof

I hereby claim:

  • I am cayblood on github.
  • I am carl_youngblood (https://keybase.io/carl_youngblood) on keybase.
  • I have a public key whose fingerprint is 048A 028F 9778 4D5E 5060 6D67 3F5E 2CD8 C084 BD6B

To claim this, I am signing this object:

View gist:bc6236e84206c23dc3ba
Verifying that +carlyoungblood is my openname (Bitcoin username). https://onename.io/carlyoungblood
@cayblood
cayblood / build_commands.sh
Created Nov 15, 2014
how to update chrome for drone.io
View build_commands.sh
export CHROME_BIN=/usr/bin/chromium-browser
sudo rm -rf /var/lib/apt/lists/*
sudo apt-get update -y
sudo apt-get install --only-upgrade chromium-browser -y
sudo start xvfb
npm -d install
node_modules/.bin/bower install
node_modules/.bin/gulp
View drone_version.txt
[21:44:55] Using gulpfile ~/src/github.com/TheWorldTable/beehive/gulpfile.js
[21:44:55] Starting 'test'...
INFO [karma]: Karma v0.12.25 server started at http://localhost:9876/
INFO [launcher]: Starting browser Chrome
INFO [Chrome 30.0.1599 (Linux)]: Connected on socket NlEDV22fMX1liH7FRCIJ with id 60108893
Chrome 30.0.1599 (Linux): Executed 0 of 3 SUCCESS (0 secs / 0 secs)
Chrome 30.0.1599 (Linux) <twt-user-badge> name should include the user's name FAILED
TypeError: Object #<HTMLUnknownElement> has no method 'async'
at Object.ComponentWrapper.flush (/home/ubuntu/src/github.com/TheWorldTable/beehive/app/test/support/polymer_setup.js:10:13)
at Object.<anonymous> (/home/ubuntu/src/github.com/TheWorldTable/beehive/app/test/integration/twt-user-badge-spec.js:20:15)
@cayblood
cayblood / my-element.html
Created Nov 13, 2014
how to pass object attributes to a custom element
View my-element.html
<!-- 1st method: trying to pass attribute as JSON -->
<my-element options='{"name": "Joe Blow"}'></my-element>
<!-- 2nd method: trying to pass a global object -->
<script>
window.obj = {name: "Joe Blow"};
</script>
<my-element options="{{window.obj}}"></my-element>
You can’t perform that action at this time.