Skip to content

Instantly share code, notes, and snippets.


T.J. Fogarty tjFogarty

View GitHub Profile
View api.js
import axios from 'axios';
let instance = axios.create();
instance.defaults.baseURL = ''
instance.defaults.headers.common['Authorization'] = 'Bearer XXX';
export default instance;
mikeapr4 / suspend.js
Created Nov 7, 2019
Suspend Mixin to stop/start component re-rendering
View suspend.js
/* eslint-disable no-underscore-dangle */
export default (computedName) => ({
watch: {
// We add in a mechanism to delay re-render of this component
// depending on derived reactive data.
[computedName](val) {
const render = this._watcher;
if (render && val) {
this._suspendGetter = render.getter;
render.getter = () => { render.dirty = true; };
davidweatherall2 / z.scss
Created Jul 8, 2019
Z index sass helper function
View z.scss
// Z-index mapping: Correctly place your variable in the correct position based on what it should appear above and behind.
// Example usage: z-index: z(header);
$z-list: (
@function z($var) {
View how_much_netflix.js
// how_much_netflix.js
// A script that looks through your Netflix viewing activity and
// tallys up how much time you've spent watching Netflix
// Open and the developer console
// Copy and paste this script into the developer console and press enter
(function() {
var fetchAllViewedItems = function() {
edenthecat /
Last active Feb 9, 2018
Alert me when a process is complete

Install terminal-notifier via homebrew:

If using zsh, create an alias: alias -g holler="echo 'holler' | terminal-notifier -sound default"

Store it in ./zshrc if you're happy with it!

Now you can run bundle exec rspec ; holler and it will make a notification that says "holler" when your tests are done.

jasesmith / atom-vertical-file-tabs.less
Last active Dec 10, 2020
For vertically stacked open file tabs, put this in your `./atom/styles.less`
View atom-vertical-file-tabs.less
atom-workspace-axis.vertical atom-pane {
flex-direction: row;
.tab-bar:not(:empty) {
box-shadow: inset -1px 0 0 #181a1f;
resize: horizontal;
height: auto;
display: block;
padding-right: 1px;
padding-bottom: 3em;
min-width: 14em;
samthor / dialog-focus-restore.js
Last active Apr 2, 2021
Restore focus after a HTML dialog is shown modally
View dialog-focus-restore.js
* Updates the passed dialog to retain focus and restore it when the dialog is closed. Won't
* upgrade a dialog more than once. Supports IE11+ and is a no-op otherwise.
* @param {!HTMLDialogElement} dialog to upgrade
var registerFocusRestoreDialog = (function() {
if (!window.WeakMap || !window.MutationObserver) {
return function() {};
var registered = new WeakMap();
stursby /
Last active Apr 23, 2021
Vue + Firebase + Auth Demo

Vue + Firebase + Auth Demo

A simple App using Vue.js & Firebase with Auth.

See the DEMO.

danrcoull / Foundation6-TabToAccordion.js
Last active Nov 18, 2016
Foundation 6 - Convert Tabs to Accordion on small Screens.
View Foundation6-TabToAccordion.js
## Description Add the below To any Foundation 6 theme and change the iniialUlClass to whatever your tab ul class is.
## Author : Daniel Coull <>
var tabsToAccordian = {
initialUlClass: '.easytabs',
accordian: null,