Skip to content

Instantly share code, notes, and snippets.

View matt-mcmahon's full-sized avatar
🏠
Working from home

Matt McMahon matt-mcmahon

🏠
Working from home
  • Millbury, Ohio, USA
View GitHub Profile

Keybase proof

I hereby claim:

  • I am matt-mcmahon on github.
  • I am affablematt (https://keybase.io/affablematt) on keybase.
  • I have a public key whose fingerprint is 64A2 72B0 4297 6468 DBB2 405E 6511 B9C2 75CC CE54

To claim this, I am signing this object:

### Keybase proof
I hereby claim:
* I am matt-mcmahon on github.
* I am mattmcmahon (https://keybase.io/mattmcmahon) on keybase.
* I have a public key ASBbFohk0b6uNbBI4E5NA-MQRU0ilNtZIDP66YjNMIKiMwo
To claim this, I am signing this object:
// Auto Curry "Magic Spell", by Eric Elliott
// https://medium.com/javascript-scene/a-functional-programmers-introduction-to-javascript-composing-software-d670d14ede30
const curry = (
f, arr = []
) => (...args) => (
a => a.length === f.length ?
f(...a) :
curry(f, a)
)([...arr, ...args]);
@matt-mcmahon
matt-mcmahon / context.js
Created May 15, 2017 13:44 — forked from bennadel/context.js
Method Binding Is An Implicit Part Of Your API Contract (Whether You Like It Or Not)
// Require the core node modules.
var chalk = require( "chalk" );
// ----------------------------------------------------------------------------------- //
// ----------------------------------------------------------------------------------- //
// I am a mock zEmbed class.
// --
// NOTE: With a traditional "class", all of the internal references use "this" because
// the methods are all located on the class prototype and do not have a lexical binding
My thoughts on writing tiny reusable modules that each do just one
thing. These notes were adapted from an email I recently sent.
***
If some component is reusable enough to be a module then the
maintenance gains are really worth the overhead of making a new
project with separate tests and docs. Splitting out a reusable
component might take 5 or 10 minutes to set up all the package
overhead but it's much easier to test and document a piece that is
@matt-mcmahon
matt-mcmahon / gist:2396063
Created April 16, 2012 02:28
Stop Stupid VirtualBox piix4_smbus Error
Originally here: http://finster.co.uk/2010/11/16/virtualbox-piix4_smbus-error/
VirtualBox piix4_smbus Error
1. Check module is being loaded: -
lsmod | grep i2c_piix4
2. If so, blacklist it in /etc/modprobe.d/blacklist.conf, by adding the following to the end of the file :-
@matt-mcmahon
matt-mcmahon / node-on-ubuntu-with-git.sh
Last active July 9, 2016 21:20 — forked from isaacs/node-and-npm-in-30-seconds.sh
My procedure for installing node.js on ubuntu server.
# Prerequisites:
sudo apt-get install g++ make libssl-dev git-core pkg-config
# pkg-config: is needed so that configure will be able to verify that openssl is
# installed.
# curl: is handy, but not needed for node.js to work.
# Install into user-specific local bin:
mkdir ~/local
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc