Skip to content

Instantly share code, notes, and snippets.

Available for hire!

Jo Sprague localjo

Available for hire!
Block or report user

Report or block localjo

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
localjo /
Last active Jul 30, 2018
How to revoke npm tokens and clear node_modules recursively after eslint-scope hack

Here are some useful commands for securing your environment in light of the eslint-scope hack.

List all npm tokens

npm token list

Revoke an npm token

localjo / flattenArray.js
Created Jun 26, 2017
An example of how to flatten an array in JavaScript
View flattenArray.js
function flattenArray (arr) {
return arr.reduce(
// This function is passed to Array.reduce (above) and concatenates all of the values into an accumulator
function (accumulator, value) {
// Check if value is an array, and use recursion if so to flatten deeper nested arrays
return accumulator.concat(Array.isArray(value) ? flattenArray(value) : value);
}, []

Keybase proof

I hereby claim:

  • I am localjo on github.
  • I am localjo ( on keybase.
  • I have a public key ASC7Ty9759EwTi152UaIdwBc16C4pwfGVzWGAihKZDTGcAo

To claim this, I am signing this object:

View example-state.js
sites: [
'': '[keyword]'
keywords: [
results: [ // Should be in a DB, ? not state ? copied to state
View gulpfile.js
// Simplified and included for context
var gulp = require('gulp');
var sync = require('sync.js');
var themeLocation = {
host: '',
username: 'example',
dest: 'path/to/project'
View gist:7538b2ddd333eff8bb44
[PHP Modules]
You can’t perform that action at this time.