Skip to content

Instantly share code, notes, and snippets.


Austin Story Austio

View GitHub Profile
brianboyko /
Last active Sep 9, 2021
VueJS Best Practices Guide

Deverus Vue.js Style Guide

Guide for developing Vue.js applications.

v. 0.0.1

Vue.js is an amazing framework, which can be as powerful as Angular or React, the two big heavy hitters in the world of front-end frameworks.

However, most of Vue's ease-of-use is due to the use of Observables - a pattern that triggers re-renders and other function calls with the reassignment of a variable.

View caching_instrumentation.rb
# Define an instrumentation that performs the caching
class CachingInstrumentation
def instrument(_type, field)
return field unless field.metadata.include?(:cache_proc)
old_resolver = field.resolve_proc
new_resolver = -> (obj, args, ctx) do
# Get the caching key
cache_key = field.metadata[:cache_proc].call(obj, args, ctx)
myshov / function_invocation.js
Last active Apr 4, 2021
11 Ways to Invoke a Function
View function_invocation.js
(_ => console.log(2))();
eval('console.log(3);');, 4);
console.log.apply(null, [5]);
new Function('console.log(6)')();
Reflect.apply(console.log, null, [7])
Reflect.construct(function(){console.log(8)}, []);, null, [9]);, null, 10);
paulsturgess / service_spec.js
Created Feb 8, 2017
Test Axios promise with jasmine-ajax
View service_spec.js
import Service from 'path/to/service';
import 'jasmine-ajax'
describe('Service', () => {
let request, promise;
let instance = Service;
let payload = {foo:'bar'};
let path = '/path';
let callback = jasmine.createSpy('callback');
ziadoz /
Last active Oct 26, 2021
Install Chrome, ChromeDriver and Selenium on Ubuntu 16.04
#!/usr/bin/env bash
# Versions
Rich-Harris /
Last active Oct 17, 2021
Stuff I wish I'd known sooner about service workers

Stuff I wish I'd known sooner about service workers

I recently had several days of extremely frustrating experiences with service workers. Here are a few things I've since learned which would have made my life much easier but which isn't particularly obvious from most of the blog posts and videos I've seen.

I'll add to this list over time – suggested additions welcome in the comments or via

Use Canary for development instead of Chrome stable

Chrome 51 has some pretty wild behaviour related to console.log in service workers. Canary doesn't, and it has a load of really good service worker related stuff in devtools.

yoavniran /
Last active Oct 27, 2021
The Ultimate Unit Testing Cheat-sheet For Mocha, Chai, Sinon, and Jest
jonyt / connect_heroku_to_amazon_rds
Last active Apr 13, 2017
How to connect a Heroku application to an Amazon RDS Postgresql instance
View connect_heroku_to_amazon_rds
Download the certificate with:
`wget -O config/rds-combined-ca-bundle.pem`
Then connect with:
obfusk /
Last active Sep 3, 2021
python "breakpoint" (more or less equivalent to ruby's binding.pry); for a proper debugger, use
import code; code.interact(local=dict(globals(), **locals()))
apneadiving / before.rb
Last active Aug 29, 2015
The before is some standard code, `with_waterfall` presents another way to write it (fully chainable)
View before.rb
# In controller
result =
if result[:success]
render json: { value: result[:value] }
render json: { errors: result[:errors] }, status: 422
# The service
class TaxCalculator