Skip to content

Instantly share code, notes, and snippets.

Avatar
:octocat:

Jo Sprague localjo

:octocat:
View GitHub Profile
@localjo
localjo / eslint-scope-hack-commands.md
Last active Jul 30, 2018
How to revoke npm tokens and clear node_modules recursively after eslint-scope hack
View eslint-scope-hack-commands.md

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
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);
}, []
)
};
View keybase.md

Keybase proof

I hereby claim:

  • I am localjo on github.
  • I am localjo (https://keybase.io/localjo) on keybase.
  • I have a public key ASC7Ty9759EwTi152UaIdwBc16C4pwfGVzWGAihKZDTGcAo

To claim this, I am signing this object:

View example-state.js
{
sites: [
'example.com': 'http://example.com?q=[keyword]'
],
keywords: [
'kitteh',
'doge'
],
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: 'example.com',
username: 'example',
dest: 'path/to/project'
};
View gist:7538b2ddd333eff8bb44
[PHP Modules]
apc
apcu
bcmath
bz2
calendar
Core
ctype
curl
date
You can’t perform that action at this time.