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 / readme.md
Last active April 13, 2022 17:53
Cell Generator Errors
» yarn redwood generate cell example
  ✔ Generating cell files...
    ✔ Successfully wrote file `./web/src/components/ExampleCell/ExampleCell.mock.js`
    ✔ Successfully wrote file `./web/src/components/ExampleCell/ExampleCell.test.js`
    ✔ Successfully wrote file `./web/src/components/ExampleCell/ExampleCell.stories.js`
    ✔ Successfully wrote file `./web/src/components/ExampleCell/ExampleCell.js`
  ⠹ Generating types ...

Error: Could not generate GraphQL type definitions (web)
@wilmoore
wilmoore / azcopy.rb
Created December 6, 2019 22:51
AzCopy
class Azcopy < Formula
desc "AzCopy is a command-line utility that you can use to copy blobs or files to or from a storage account."
homepage "https://azure.microsoft.com/en-us/blog/tag/azcopy/"
sha256 "4ca3f7ab59f8506224a1c70c20ca3edf47d47b95c21c47d32581bc902e022eb7"
url "https://aka.ms/downloadazcopy-v10-mace"
def install
bin.install "azcopy"
end
end
@wilmoore
wilmoore / __readme.md
Created September 7, 2019 15:25 — forked from maxivak/__readme.md
Building Docker image with Packer and provisioning with Ansible

Building Docker image with Packer and provisioning with Ansible

Overview

Packer

  • Packer is used to build image from a base image, perform provisions and store (commit) the final image.

  • We use provisioners and Packer templates to do the actual work to create the final image.

  • We use Ansible for provisioning.

@wilmoore
wilmoore / server.js
Last active April 7, 2019 22:26
Intrinsic Node.js HTTP server taking into consideration IPv6 address (::)
const http = require('http');
const hostname = '127.0.0.1';
const port = 3000;
const server = http.createServer((req, res) => {
res.statusCode = 200;
res.setHeader('Content-Type', 'text/plain');
res.end('Hello World\n');
});
@wilmoore
wilmoore / server.js
Created April 7, 2019 22:17
Simple Node.js HTTP server with clean formatting of http address and port.
const http = require('http');
const hostname = '127.0.0.1';
const port = 3000;
const server = http.createServer((req, res) => {
res.statusCode = 200;
res.setHeader('Content-Type', 'text/plain');
res.end('Hello World\n');
});
@wilmoore
wilmoore / index.js
Last active March 12, 2019 16:09
Flattens a nested array recursively (A quick ES6 prototype of my https://www.npmjs.com/package/flatten-arr)
const toString = Object.prototype.toString
/**
* Recursive list item concatenation.
*
* @param {Array} nested
* Nested array.
*
* @param {Array} flat
* Initial/Flattended array.
@wilmoore
wilmoore / index.js
Last active February 12, 2019 23:28
flatten kata
exports.flatten = (input) => input.toString().split(',').map(Number)
@wilmoore
wilmoore / kubernetes-helm223.rb
Last active August 18, 2017 21:47
Installs Kubernetes Helm 2.2.3
class KubernetesHelm223 < Formula
desc "Installs Kubernetes Helm 2.2.3"
homepage "https://helm.sh"
url "https://storage.googleapis.com/kubernetes-helm/helm-v2.2.3-darwin-amd64.tar.gz"
sha256 "64420d467e03ceb666a4f22b89e08b93c06f76f5917fe539860b04cd5e5e515f"
head "https://github.com/kubernetes/helm.git"
def install
bin.install "helm"
end
@wilmoore
wilmoore / promiseWhile
Created August 10, 2017 19:50
Promise loop (can use as a long-running worker) with predicate.
/**
* Hat Tip: https://gist.github.com/victorquinn/8030190#gistcomment-1615901
*/
'use strict'
var Promise = require('bluebird')
var times = 0
function promiseWhile (predicate, action) {