Skip to content

Instantly share code, notes, and snippets.

View tjFogarty's full-sized avatar
🇮🇪

T.J. Fogarty tjFogarty

🇮🇪
View GitHub Profile
import axios from 'axios';
let instance = axios.create();
instance.defaults.baseURL = 'xxx.teamwork.com'
instance.defaults.headers.common['Authorization'] = 'Bearer XXX';
export default instance;
@mikeapr4
mikeapr4 / suspend.js
Created November 7, 2019 18:28
Suspend Mixin to stop/start component re-rendering
/* 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
davidweatherall2 / z.scss
Created July 8, 2019 07:05
Z index sass helper function
// 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: (
highest,
lowest
);
@function z($var) {
// how_much_netflix.js
// A script that looks through your Netflix viewing activity and
// tallys up how much time you've spent watching Netflix
//
// INSTRUCTIONS TO USE:
// Open https://www.netflix.com/WiViewingActivity and the developer console
// Copy and paste this script into the developer console and press enter
//
(function() {
var fetchAllViewedItems = function() {
@swalkinshaw
swalkinshaw / tutorial.md
Last active November 13, 2023 08:40
Designing a GraphQL API
@edenthecat
edenthecat / holler.md
Last active February 9, 2018 18:05
Alert me when a process is complete

Install terminal-notifier via homebrew: https://github.com/julienXX/terminal-notifier

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
jasesmith / atom-vertical-file-tabs.less
Last active December 10, 2020 01:18
For vertically stacked open file tabs, put this in your `./atom/styles.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
samthor / dialog-focus-restore.js
Last active December 1, 2023 14:39
Restore focus after a HTML dialog is shown modally
/**
* 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
stursby / README.md
Last active May 13, 2022 07:41
Vue + Firebase + Auth Demo

Vue + Firebase + Auth Demo

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

See the DEMO.

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