Skip to content

Instantly share code, notes, and snippets.

View wilmoore's full-sized avatar
🦄
Proverbs 3:21

Wil (₩) Moore III wilmoore

🦄
Proverbs 3:21
View GitHub Profile
@wilmoore
wilmoore / 01-composition-pipeline.js
Last active June 23, 2017 19:16
Functional Programming Fundamentals Code
'use strict'
const assert = require('assert')
function words (text) {
return text.split(/\s+/)
}
function reverse (list) {
return list.reverse()
@wilmoore
wilmoore / poke-pointfree.js
Created January 21, 2016 16:11
Pokemon API Exploration
'use strict'
const all = require('promise-all')
const got = require('got')
const map = require('arraymap')
const mapcat = require('array-mapcat')
const pipe = require('function-pipeline')
const selectn = require('selectn')
const unique = require('array-unique')
@wilmoore
wilmoore / index.js
Created November 19, 2015 18:26
requirebin sketch
'use strict'
var sum = require('lodash').sum
var threads = [
{
id: '1ad2a01b-209f-4216-85fb-a04c67655472',
subject: 'My Coverage & Benefits',
latestMessageId: '0dbae0cc-0a81-4376-9b99-9d4ac4d829c6',
unreadCount: 1,
messageCount: 2,
@wilmoore
wilmoore / index.js
Created November 19, 2015 17:56
requirebin sketch
'use strict'
var selectn = require('selectn')
var first = require('array-head')
function json (response) {
return response.json()
}
fetch('https://api.github.com/gists/public')
@wilmoore
wilmoore / nodejs-install.rb
Last active November 6, 2015 08:25
Installs pre-compiled NodeJS binaries while avoiding sudo or chown
class NodejsInstall < Formula
desc "Installs pre-compiled NodeJS binaries while avoiding sudo or chown"
homepage "https://github.com/wilmoore/nodejs-install"
url "https://github.com/wilmoore/nodejs-install/archive/1.0.0.tar.gz"
sha256 "5ce90a3398884d55a891e0e1a889ee46a8aa41e48cd700b4a9b34c6c74de78ef"
head "https://github.com/wilmoore/nodejs-install.git"
def install
prefix.install "bin"
end
@wilmoore
wilmoore / promise.js
Last active October 29, 2015 20:06
Example of the composability of promises especially when you use point-free functions.
'use strict'
/*!
* imports.
*/
const selectn = require('selectn')
/*!
* mock functions.
@wilmoore
wilmoore / test.js
Last active October 27, 2015 21:31
An example test case using WebdriverIO, Mocha, and ES6 Generators
'use strict'
/*!
* imports.
*/
var assert = require('assert')
/*!
* tests.
@wilmoore
wilmoore / infile.js
Last active October 11, 2015 16:44
The new JS class syntax is no panacea as it is implied in the video. I mean, there are other ways to fix this: https://youtu.be/05Z6YGiZKmE?t=11m42s
'use strict'
/*!
* exports.
*/
module.exports = initialize
/*!
* object initialization.
@wilmoore
wilmoore / .npmrc
Created September 30, 2015 15:49
Artifactory Woes
//artifactory.example.com/artifactory/api/npm/npm-local/:_password=*****
//artifactory.example.com/artifactory/api/npm/npm-local/:username=scott
//artifactory.example.com/artifactory/api/npm/npm-local/:email=scott@example.com
//artifactory.example.com/artifactory/api/npm/npm-local/:always-auth=true
//artifactory.example.com/artifactory/api/npm/npm-virtual/:_password=*****
//artifactory.example.com/artifactory/api/npm/npm-virtual/:username=scott
//artifactory.example.com/artifactory/api/npm/npm-virtual/:email=scott@example.com
//artifactory.example.com/artifactory/api/npm/npm-virtual/:always-auth=true
@wilmoore
wilmoore / install.md
Last active August 29, 2015 14:22
Configure and install rust.

Configuration

in your .zshrc or .bashrc
source rust.sh

Install