This file contains hidden or 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 Builder < Struct | |
def self.with(spec, &block) | |
struct = new(*(spec.keys)) do | |
def initialize(options={}) | |
super | |
options.each { |opt, value| self[opt] = value } | |
freeze | |
end | |
def with(options, &block) |
This file contains hidden or 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
# I created a minimal wrapper around the chef-server cookbook | |
# with these commands. For your convenience I include in this gist the complete .kitchen.yml, metadata.rb, and recipies/default.rb | |
# You can see the output from 'kitchen converge' in the console.log also included in the gist. | |
# the kitchen log file is in an earlier revision of this gist: | |
# https://gist.githubusercontent.com/dobbs/1611a20cdb8232c76617/raw/28e99ec849ee3c42901db3a242f5917d8b78fcce/.kitchen%2520logs%2520default-ubuntu-1404.log | |
chef generate cookbook wrap-chef-server | |
cd wrap-chef-server | |
echo "depends 'chef-server', '~> 4.0.0'" >> metadata.rb | |
echo "include_recipe 'chef-server'" >> recipes/default.rb | |
ruby -pi -e 'gsub(/ubuntu-.*/, "ubuntu-14.04"); gsub(/^.*name: centos.*$/, "")' .kitchen.yml |
This file contains hidden or 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
#!/bin/bash | |
# | |
# /usr/local/sbin/ipaddress | |
usage() { | |
cat <<EOF | |
Usage: $(basename $0) [interface] | |
Report the IP 4 address for the default interface (or the one given in the params) | |
(default interface is computed from the default route) |
This file contains hidden or 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
{"Response":"Success","Type":100,"Aggregated":false,"Data":[{"time":1359936000,"close":20.43,"high":21.05,"low":19.86,"open":20.59,"volumefrom":52219.14,"volumeto":1066570.21},{"time":1360022400,"close":20.6,"high":20.79,"low":20.2,"open":20.43,"volumefrom":29212.44,"volumeto":600949.67},{"time":1360108800,"close":21.18,"high":21.33,"low":20.6,"open":20.6,"volumefrom":51989.6,"volumeto":1096396.16},{"time":1360195200,"close":22.15,"high":22.22,"low":20.77,"open":21.18,"volumefrom":64263.77,"volumeto":1388465.81},{"time":1360281600,"close":22.66,"high":22.77,"low":22,"open":22.15,"volumefrom":48649.93,"volumeto":1090678.48},{"time":1360368000,"close":23.65,"high":23.99,"low":22.58,"open":22.66,"volumefrom":38133.01,"volumeto":886034.01},{"time":1360454400,"close":23.97,"high":24.11,"low":22.67,"open":23.65,"volumefrom":56426.07,"volumeto":1321513.68},{"time":1360540800,"close":24.65,"high":24.68,"low":23.65,"open":23.97,"volumefrom":29526.73,"volumeto":712458.7},{"time":1360627200,"close":25.17,"high":25.83,"l |
This file contains hidden or 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
FROM node:8.5 as src | |
WORKDIR /usr/local/src | |
RUN git clone "https://github.com/OriginProtocol/demo-dapp.git" \ | |
--branch master | |
RUN cd demo-dapp && npm install | |
RUN cd demo-dapp && npm run build | |
FROM abiosoft/caddy:0.11.0 | |
COPY --from=src /usr/local/src/demo-dapp/build/ /srv |
OlderNewer