...
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const toString = Object.prototype.toString | |
/** | |
* Recursive list item concatenation. | |
* | |
* @param {Array} nested | |
* Nested array. | |
* | |
* @param {Array} flat | |
* Initial/Flattended array. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
exports.flatten = (input) => input.toString().split(',').map(Number) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Hat Tip: https://gist.github.com/victorquinn/8030190#gistcomment-1615901 | |
*/ | |
'use strict' | |
var Promise = require('bluebird') | |
var times = 0 | |
function promiseWhile (predicate, action) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict' | |
const assert = require('assert') | |
function words (text) { | |
return text.split(/\s+/) | |
} | |
function reverse (list) { | |
return list.reverse() |
NewerOlder