This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Format Module Mode Description | |
------------------------------------------------------------------------------- | |
3FR DNG r-- Hasselblad CFV/H3D39II | |
AAI* AAI rw+ AAI Dune image | |
AI PDF rw- Adobe Illustrator CS2 | |
ART* ART rw- PFS: 1st Publisher Clip Art | |
ARW DNG r-- Sony Alpha Raw Image Format | |
AVI MPEG r-- Microsoft Audio/Visual Interleaved | |
AVS* AVS rw+ AVS X image | |
BGR* BGR rw+ Raw blue, green, and red samples |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Takes a Number and returns a US/CAN currency string. | |
function toCurrency(amount) { | |
return "$" + amount.toFixed(2); | |
}; | |
// Adds a .toCurrency() method to Numbers. | |
Number.prototype.toCurrency = function() { | |
return toCurrency(this); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"object": { | |
"id": "sub_Ees5zGujQ85DxG", | |
"object": "subscription", | |
"application_fee_percent": null, | |
"billing": "charge_automatically", | |
"billing_cycle_anchor": 1554603702, | |
"billing_thresholds": null, | |
"cancel_at": null, | |
"cancel_at_period_end": false, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.vagrant |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Controller } from "stimulus" | |
class PageSectionFormController extends Controller { | |
initialize() { | |
this.sectionID = parseInt(this.element.getAttribute("data-page-section-id")) | |
this.preview = this.application.getControllerForElementAndIdentifier( | |
document.querySelector(`[data-controller="rich-text-preview"][data-page-section-id="${this.sectionID}"]`), | |
'rich-text-preview', | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Customer from 'Customer'; | |
import API from 'API'; | |
import Spies from 'Spies'; | |
beforeEach(() => { | |
Spies.start(); | |
}); | |
afterEach(() => { | |
Spies.stop(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Company < ApplicationRecord | |
has_many :employees | |
has_many :projects | |
end | |
class Project < ApplicationRecord | |
belongs_to :company | |
has_many :project_employees |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://developers.google.com/analytics/devguides/collection/analyticsjs/ecommerce | |
ga('tutorTracker.require', 'ecommerce'); | |
var price = (Coach.Conversion.revenue_cents/100).toFixed(2); | |
var txID = Coach.Conversion.object.order_id.toString(); | |
ga('tutorTracker.ecommerce:addTransaction', { | |
'id': txID, | |
'affiliation': | |
'Podia Storefront', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#################################################################################### | |
# Dracula themed prompt | |
# https://github.com/dracula/terminal.app/issues/2#issuecomment-254878940 | |
# Colors | |
black="\[$(tput setaf 0)\]" | |
red="\[$(tput setaf 1)\]" | |
green="\[$(tput setaf 2)\]" | |
yellow="\[$(tput setaf 3)\]" | |
blue="\[$(tput setaf 4)\]" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# == Let's work with a subscription that has an existing coupon == | |
subscription = Stripe::Subscription.retrieve('sub_ABC123') | |
subscription.discount.coupon.id # => "early-upgrade" | |
# Preview invoice keeps the coupon, as expected. | |
Stripe::Invoice.upcoming( | |
customer: subscription.customer, | |
subscription: subscription.id | |
).discount.coupon.id # => "early-upgrade" |