Skip to content

Instantly share code, notes, and snippets.

@armiiller
armiiller / stripe_subscription_update.rb
Created September 7, 2022 16:29 — forked from palkan/example.rb
pattern_matching_joe.rb
require 'active_support/core_ext/hash/indifferent_access'
def send_admin_notification(changes = previous_changes)
case changes
in ends_at: [Time, _]
:resubscribed
in ends_at: [nil, Time]
:churned
in processor_plan: [nil, String]
:subscribed
@armiiller
armiiller / gist:e8f9ff310d0481f033ce9e68d1eb7bc3
Created May 23, 2018 19:16 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@armiiller
armiiller / route-hooks.js
Last active November 10, 2017 16:45 — forked from Andrew-Max/gist:305483febc3c367dbf57
Route lifecycle hooks guide from Ember meetup lightning talk
// https://www.emberjs.com/api/ember/2.15/classes/Ember.Route
App.LibraryRoute = App.ApplicationRoute.extend({
activate: function () {
//no longer enter
this._super();
only called once on entering a route.
},
beforeModel: function (transition) {