Skip to content

Instantly share code, notes, and snippets.

@austinsamsel
austinsamsel / machine.js
Last active September 3, 2020 20:04
Generated by XState Viz: https://xstate.js.org/viz
const IGNORE_ERRORS_DURATION = 3000;
const FS = {
IDLE: 'idle',
UNSEALED_RESET: 'unsealed_reset',
OPENING: 'opening',
UNSEALED_RETRYING: 'unsealed_retrying',
POLLING_PACK: 'polling_pack',
GETTING_MOMENTS: 'getting_moments',
DONE: 'done',
@austinsamsel
austinsamsel / machine.js
Last active September 3, 2020 16:01
Generated by XState Viz: https://xstate.js.org/viz
const IGNORE_ERRORS_DURATION = 3000
const FS = {
IDLE: 'idle',
UNSEALED_RESET: 'unsealed_reset',
OPENING: 'opening',
UNSEALED_RETRYING: 'unsealed_retrying',
POLLING_PACK: 'polling_pack',
GETTING_MOMENTS: 'getting_moments',
SUCCESS: 'success',
@austinsamsel
austinsamsel / machine.js
Last active August 17, 2020 16:04
Generated by XState Viz: https://xstate.js.org/viz
const FS = {
IDLE: 'idle',
IN_VIEW: 'in_view',
APPEARING: 'appearing',
UNVEILING: 'unveiling',
REVEALING: 'revealing',
HIGHLIGHT_PLAYING: 'highlight_playing',
REVEALED: 'revealed',
};
module.exports = {
config: {
// default font size in pixels for all tabs
fontSize: 14,
// font family with optional fallbacks
fontFamily: 'Inconsolata, Menlo, "DejaVu Sans Mono", "Lucida Console", monospace',
// terminal cursor background color and opacity (hex, rgb, hsl, hsv, hwb or cmyk)
@austinsamsel
austinsamsel / collections.liquid.html
Created January 20, 2017 18:01 — forked from rickydazla/collections.liquid.html
"Infinite" scrolling in Shopify collections
{% paginate collection.products by 20 %}
<ul class="collection-matrix">
{% for product in collection.products %}
<li id="product-{{ forloop.index | plus:paginate.current_offset }}">
{% include 'product' with product %}
</li>
{% endfor %}
<li class="top"><a href="#collectionpage">Back to Top</a> &uarr;</li>
{% if paginate.next %}
<li class="more">&darr; <a href="{{ paginate.next.url }}">More</a></li>
@austinsamsel
austinsamsel / collections.liquid.html
Created January 20, 2017 16:06 — forked from davecap/collections.liquid.html
"Infinite" scrolling in Shopify collections
{% paginate collection.products by 20 %}
<!-- the top of your collections.liquid -->
<!-- START PRODUCTS -->
{% for product in collection.products %}
<!-- START PRODUCT {{ forloop.index | plus:paginate.current_offset }} -->
<div class="product" id="product-{{ forloop.index | plus:paginate.current_offset }}">
{% include 'product' with product %}
</div>
<!-- END PRODUCT {{ forloop.index | plus:paginate.current_offset }} -->
# 1) https://code.tutsplus.com/tutorials/how-to-install-ruby-on-a-mac--net-21664
# 2) http://flummox-engineering.blogspot.com/2014/05/you-dont-have-write-permissions-for.html
# note to self: backup - https://getpocket.com/a/read/541537367
# note to self: backup - getpocket tags (install ruby rvm)
@austinsamsel
austinsamsel / git rm cached
Last active December 3, 2016 15:15
remove files from repository that are listed in gitignore
git rm -r --cached .
git add .
git commit -m "Removing all files in .gitignore"
# OR, in one line:
git rm -r --cached . && git add . && git commit -m "Removing all files in .gitignore"
@austinsamsel
austinsamsel / .gitignore
Last active February 4, 2017 22:01
global .gitignore
# git config --global core.excludesfile '~/.gitignore'
# http://stackoverflow.com/a/7335487
.DS_Store
node_modules
.env
# swap
[._]*.s[a-w][a-z]
@austinsamsel
austinsamsel / .vimrc
Last active August 14, 2016 21:05
current vimrc
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required