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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Alpine.js Example</title> | |
<script> | |
document.addEventListener('alpine:init', () => { | |
Alpine.directive('modal', ($el) => { |
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
while read i; do echo "Deleting $i" && shopify theme delete --theme $i -f --store=[YOUR STORE NAME] ; done < <(shopify theme list --store=[YOUR STORE NAME] | awk '/Development \(.*\)/ {print $4}' | sed 's/#//') |
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
/** | |
* @typedef {import('mdast').Root} Root | |
* @typedef {import('mdast-util-math')} DoNotTouchAsThisImportIncludesMathInTree | |
* @typedef Options | |
* @property {string} [startDelimiter=string] | |
* @property {string} [endDelimiter=string] | |
*/ | |
import {visit, CONTINUE} from 'unist-util-visit' | |
import * as acorn from 'acorn' |
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
name: ci | |
on: | |
push: | |
paths-ignore: | |
- 'README.md' | |
- 'docs/**' | |
env: | |
PGUSER: postgres | |
PGPASSWORD: postgres | |
jobs: |
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
// | |
// This is quick demo of how I currenty normalize / denormalize JSON API responses into redux | |
// | |
import normalize from 'json-api-normalizer' | |
// Given this example response from a JSONAPI endpoint | |
const json = { | |
data: [{ |
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 React from 'react' | |
import { PureComponent } from 'react' | |
class ScrollVelocity extends PureComponent { | |
constructor (props, context) { | |
super(props, context) | |
this.state = { | |
lastScrollTop: 0, | |
lastScrollLeft: 0, |
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
namespace :invalid_records do | |
task check: [:environment] do | |
puts "Checking for invalid records...\n" | |
invalid_records = [] | |
total_record_count = 0 | |
# Make sure that all AR models are required | |
Dir["#{Rails.root}/app/models/**/*.rb"].each { |file_path| require file_path rescue nil } |
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 BulkFileJob | |
@queue = :bulk | |
#----------------------------------------------------------------------------- | |
# Class methods | |
#----------------------------------------------------------------------------- | |
def self.perform(bulk_id) | |
new(bulk_id).perform |
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
// Retina helper mixins for Compass | |
// http://www.joelambert.co.uk | |
// | |
// Copyright 2012, Joe Lambert. | |
// Free to use under the MIT license. | |
// http://joelambert.mit-license.org/ | |
// Inline for standard / URL for retina | |
=inline-background-image-retina($image) | |
background-image: asset-data-uri($image) |
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
classes = | |
aClass: class AClass | |
constructor: -> | |
alert("A class") | |
# Should say "A class" | |
new classes.aClass | |
class bClass extends classes.aClass | |
constructor: -> |
NewerOlder