Skip to content

Instantly share code, notes, and snippets.

View perrupa's full-sized avatar

Christopher Marlow perrupa

View GitHub Profile
@perrupa
perrupa / Subscription.js
Created June 10, 2021 17:32
Pricing Plan
import "isomorphic-fetch";
import { gql } from "apollo-boost";
const PRICING_PLANS = {
begginer: {
returnUrl: `${process.env.HOST}/getting_started`,
planName: "Kenyarlow Beginner Plan",
price: 5,
},
pro: {
git branch | grep '*' | awk '{print $2}'
const modalUrl = '/path/to/modal/contents.html';
// This function is executed in the Channel's original iframe
function applyCallback(label) {
// This is the magic line here. -----\
// |
// V
const modalDom = ShopifyApp.Modal.window().window.document
# this_weekend = Weekender::this_weekend()
class Weekender
def self.this_weekend( today = Date.now() )
case today.day
when :friday
when :saturday
when :sunday
Weekend.new(today.previous_friday, today.next_sunday)
@perrupa
perrupa / gist:d50d11551acfffa52b3c
Last active August 29, 2015 14:23
Automatically generate code blocks
/*
Find all code wrapped in .exampleCode classes and generate
a highlighted code block to insert in the DOM after it
*/
$(".exampleCode").each(function(){
var $example = $(this),
code = $example.html(),
$preBlock = $("<pre></pre>").append( $("<code></code>").text(code) );
<?php
# Implements a recursive null object pattern.
#
# Implemented as a trait so any object can make it's properties use
# the null pattern without resorting to inheritance.
#
# The goal is so you can pull data off a partially populated object
# without excessive existance checks.
trait NullPattern {
✓ > /dev-git/platform-a > (feature/reports-filter) $ git log --graph --pretty=format:'%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit | head -n 10
* 4e4b861 - (HEAD, origin/feature/reports-filter, feature/reports-filter) ZAP-6864 - changed a conflicting scss class name causing layout issues. (5 months ago) <Chris Marlow>
* 897a178 - Merge branch 'hotfix_26_02' of ssh://tor-repo01/mnt/opt/git/platform-a into hotfix_26_02 (5 months ago) <Avinder>
|\
| * 8a35fe6 - PFAPROD-13066 - V26: Standard Reports: Raw data: pagination does not work (5 months ago) <Maryam>
| * ae42825 - PFAPROD-13064 - standard reports (v26)- 'Filter' option is not working. (5 months ago) <Maryam>
* | d47af7b - NO-JIRA: Added a missing space in the employee name of marriott self enrollment form (5 months ago) <Avinder>
|/
* 25ab3e5 - Merge branch 'hotfix_26_02' of ssh://tor-repo01/mnt/opt/git/platform-a into hotfix_26_02 (5 months ago) <Avinder>
@perrupa
perrupa / Gruntfile.js
Last active August 29, 2015 14:08 — forked from jlouthan/Gruntfile.js
// wrapper function
module.exports = function(grunt){
// load all our Grunt plugins
require('load-grunt-tasks')(grunt);
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
// task configuration goes here
jshint: {
@perrupa
perrupa / app.js
Created September 24, 2012 17:48
Song Carousel
var Song = Backbone.Model.extend({
defaults : {
selected : false,
active : false
},
initialize : function(attributes) {
this.set("uniqueID", this.cid);