Skip to content

Instantly share code, notes, and snippets.

View toranb's full-sized avatar

Toran Billups toranb

View GitHub Profile
@toranb
toranb / store.js
Created March 24, 2014 22:17 — forked from tomdale/store.js
function buildRecord(type, data, store) {
var containerKey = 'model:' + type;
var factory = store.container.lookupFactory(containerKey);
var record = factory.create({
id: data.id,
$data: data
});

References - For Later Reading, or Right Now

  1. [Dice][] - where you are, who we are.
  2. [How GitHub Uses GitHub to Build GitHub][githubcubed]
  3. [Forking A Repository on GitHub][githubfork]
  4. [Submitting Pull Requests][githubpull]
  5. [Choosing A License][choosealicense]
  6. [OCTOCATS!!][octocats]
@toranb
toranb / components.my-numbers.js
Last active August 10, 2016 02:54 — forked from dustinfarris/components.my-numbers.js
ember-redux in action!
import Ember from 'ember';
import hbs from 'htmlbars-inline-precompile';
import connect from 'ember-redux/components/connect';
var stateToComputed = (state) => {
return {
number: state.number
};
};
import Ember from 'ember';
export default Ember.Component.extend({
tagName: 'button',
click() {
this.sendAction();
}
});
@toranb
toranb / app.js
Created July 4, 2020 15:07 — forked from nicolasblanco/app.js
Stripe.js elements integration inside a Elixir LiveView (Bootstrap styles)
// Code handling the card payment
const payWithCard = function (stripe, card, clientSecret, liveView) {
stripe
.confirmCardPayment(clientSecret, {
payment_method: {
card: card,
},
})
.then(function (result) {
if (result.error) {