Skip to content

Instantly share code, notes, and snippets.

View lisaross's full-sized avatar
:shipit:
Focus!

Lisa Ross lisaross

:shipit:
Focus!
View GitHub Profile
export const mapsToken = 'Your Google Maps API token';
export const weatherToken = 'Your OpenWeatherMap API token';
export const fromPhoneNumber = 'Your Twilio phone number';
export const twilioSid = 'Your Twilio SID';
export const twilioToken = 'Your Twilio token';
@lisaross
lisaross / dark.md
Created March 19, 2019 14:30 — forked from a7madgamal/dark.md
Dark mode for Slack on MacOS
  1. Close slack
  2. Open this file /Applications/Slack.app/Contents/Resources/app.asar.unpacked/src/static/ssb-interop.js
  3. Append this to it
document.addEventListener('DOMContentLoaded', function() {
 $.ajax({
   url: 'https://cdn.rawgit.com/laCour/slack-night-mode/master/css/raw/black.css',
   success: function(css) {
 $("").appendTo('head').html(css);
@lisaross
lisaross / what-forces-layout.md
Created February 18, 2019 17:44 — forked from paulirish/what-forces-layout.md
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Element

Box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
  • elem.clientLeft, elem.clientTop, elem.clientWidth, elem.clientHeight
  • elem.getClientRects(), elem.getBoundingClientRect()
/**
* Retrieves all the rows in the active spreadsheet that contain data and logs the
* values for each row.
* For more information on using the Spreadsheet API, see
* https://developers.google.com/apps-script/service_spreadsheet
*/
function readRows() {
var sheet = SpreadsheetApp.getActiveSheet();
var rows = sheet.getDataRange();
var numRows = rows.getNumRows();
@lisaross
lisaross / monolog.php
Created September 6, 2018 19:50 — forked from mamchenkov/monolog.php
Example use of Monolog logger
<?php
// Before: composer require monolog/monolog
// composer autoloader
require_once 'vendor/autoload.php';
// Shortcuts for simpler usage
use \Monolog\Logger;
use \Monolog\Formatter\LineFormatter;
use \Monolog\Handler\StreamHandler;
@lisaross
lisaross / gulpfile.js
Created September 4, 2018 01:23 — forked from rc1/gulpfile.js
A single gulpfile which can be configured via run scripts. Puts configuration over code, contradicting the goal of gulp. But handy when you need to do the same thing over and over again quickly.
// Modules
// =======
//
// gulp gulp-plumber gulp-concat gulp-if gulp-rename gulp-sourcemaps browser-sync gulp-csso gulp-less gulp-autoprefixer gulp-uglify gulp-babel babel-preset-es2015 gulp-jade git://github.com/oroce/gulp-jade-php#v2.0.0-0 gulp-sass
// Gulp
// ----
var gulp = require( 'gulp' );
var gulpif = require( 'gulp-if' );
var concat = require( 'gulp-concat' );
@lisaross
lisaross / gulpfile.js
Created September 3, 2018 17:14 — forked from martincarlin87/gulpfile.js
Example gulpfile for PHP, SASS, Watching, Minifying, Optimising, Live Reload and Deploying
var gulp = require('gulp');
var gutil = require('gulp-util');
var argv = require('minimist')(process.argv);
var prompt = require('gulp-prompt');
var rsync = require('gulp-rsync');
var sass = require('gulp-sass');
var autoprefixer = require('gulp-autoprefixer');
var sourcemaps = require('gulp-sourcemaps');
var browserSync = require('browser-sync');
var useref = require('gulp-useref');
@lisaross
lisaross / workbox.md
Created August 30, 2018 23:52 — forked from addyosmani/workbox.md
Workbox recipes

Workbox runtime caching recipes

Your Service Worker script will need to import in Workbox and initialize it before calling any of the routes documented in this write-up, similar to the below:

importScripts('workbox-sw.prod.v1.3.0.js');
const workbox = new WorkboxSW();

// Placeholder array populated automatically by workboxBuild.injectManifest()
@lisaross
lisaross / Gatsby-bootstrap-lifecycle.md
Created August 15, 2018 13:17 — forked from swyxio/Gatsby-bootstrap-lifecycle.md
Gatsby bootstrap lifecycle

Sequence of Gatsby's bootstrap lifecycle with links to source code as of v2.0.0

  1. open and validate gatsby-config (get-config-file.js)
  2. load plugins (load-plugins/index.js) from the list given in gatsby-config.js
  3. onPreBootstrap: runs onPreBootstrap if it is implemented in any plugins, for example gatsby-plugin-typography. Receives handy [apiCallArgs](https://github.com/gatsbyjs/gatsby/blob/ffd8b2d691c995c760fe380769852bcdb26a2278/packages/gatsby/src/util
@lisaross
lisaross / ForkUpdates.md
Created August 13, 2018 15:57 — forked from CristinaSolana/gist:1885435
Keeping a fork up to date

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream