Skip to content

Instantly share code, notes, and snippets.

View benmccormick's full-sized avatar

Ben McCormick benmccormick

View GitHub Profile
@benmccormick
benmccormick / file.js
Created December 24, 2015 04:08
Array.prototype functional methods
let arr = [1, 2, 3];
function log(item) {
console.log(item);
}
//forEach performs an action on each item
//in an array
arr.forEach(log); //logs 1 2 3 in order
@benmccormick
benmccormick / params.js
Created December 22, 2017 03:11
Params fn
/* takes a list of params in the format
[{
key: 'foo'
value: 'bar'
}]
or an object with key-value params
{
foo: 'bar'
}
}
@benmccormick
benmccormick / projects.txt
Created June 11, 2018 03:31
Github Top 25 Libraries/Frameworks June 10th 2018
bootstrap -css
tensorflow - python
react -js
vue -js
d3 - js
react-native -js
angular.js - js
animate.css - css
jquery - js
laravel - php
@benmccormick
benmccormick / mobx-codemod.js
Last active June 17, 2018 21:39
Mobx Codemod Example
module.exports = function (file, api) {
const j = api.jscodeshift;
const buildDecoratorPropertiesFromCurrentObject = currentObj => {
let decoratorProps = [];
currentObj.properties.forEach(prop => {
if (prop.value.type === 'CallExpression' && prop.value.callee.name === 'computed') {
prop.kind = 'get';
let fnBody = prop.value.arguments[0];

Keybase proof

I hereby claim:

  • I am benmccormick on github.
  • I am ben_mccormick (https://keybase.io/ben_mccormick) on keybase.
  • I have a public key ASA-PhwIqziP2g1Ycexv29-bEBSVn-qNjgtQRZ0ZLDjIbgo

To claim this, I am signing this object: