Install needed node packages:
npm install -g cylon-ble
npm install cylon cylon-ollie
First scan for your BB8 (the device name should contain BB in it):
> sudo cylon-ble-scan
[...]
| --- | |
| # Source: calico/templates/calico-config.yaml | |
| # This ConfigMap is used to configure a self-hosted Calico installation. | |
| kind: ConfigMap | |
| apiVersion: v1 | |
| metadata: | |
| name: calico-config | |
| namespace: kube-system | |
| data: | |
| # Typha is disabled. |
Install needed node packages:
npm install -g cylon-ble
npm install cylon cylon-ollie
First scan for your BB8 (the device name should contain BB in it):
> sudo cylon-ble-scan
[...]
| Floating serenely through a peaceful abyss, a sigh escapes; content. | |
| A siren wails, you're jolted from your respite | |
| /dev/xsdb1 is at 100% | |
| A cacophony of alerts screech from the phone. | |
| Upset is the fragile balance, failure cascades. | |
| Was only a matter of time. | |
| Get some coffee. | |
| All you ping seems to crumble, machine after machine fall; a massacre of uptime. |
| #!/bin/bash | |
| set -e | |
| # Send a private message to someone on slack | |
| # from the command line. | |
| # Print a usage message and exit. | |
| usage(){ | |
| local name=$(basename "$0") |
| #!/bin/bash | |
| # | |
| # This script will mount /Users in the boot2docker VM using NFS (instead of the | |
| # default vboxsf). It's probably not a good idea to run it while there are | |
| # Docker containers running in boot2docker. | |
| # | |
| # Usage: sudo ./boot2docker-use-nfs.sh | |
| # |
| #cloud-config | |
| --- | |
| coreos: | |
| units: | |
| - name: update-fleet-metadata.service | |
| command: start | |
| content: |- | |
| [Unit] | |
| Description=Update Fleet metadata tag | |
| Before=fleet.service |
| r := mux.NewRouter() | |
| // Single handler | |
| r.HandleFunc("/form", use(http.HandlerFunc(formHandler), csrf, logging) | |
| // All handlers | |
| http.Handle("/", recovery(r)) | |
| // Sub-routers | |
| apiMiddleware := []func(http.Handler) http.Handler{logging, apiAuth, json} |
Dashing widget to display a Jenkins build status and build progress
The widget is based on the meter-widget which is default in the Dashing installation
The widget can also see the progress of a "pre-build", i.e if you have a job triggering the actual build you want to define, you can configure this job in the jenkins_build.rb as a prebuild.
For more information, please see Coding Like a tosser
| #include <utility> | |
| #include <iostream> | |
| // http://en.cppreference.com/w/cpp/types/decay | |
| template< class X > | |
| using Decay = typename std::decay<X>::type; | |
| // ConstructBinary<T>(X,Y) = T<X,Y> | |
| template< template<class...> class X > | |
| struct ConstructBinary { |
| ruby_block "create ssh key" do | |
| block do | |
| k = SSHKey.generate(:type => 'RSA', :bits => 1024, :comment => "Postgres Master") | |
| node.set[:postgresql][:pubkey] = k.ssh_public_key | |
| node.save | |
| # Much of the DSL disappears in ruby blocks. Here's how to create a template. | |
| rc = Chef::RunContext.new(node, node.cookbook_collection) | |
| t = Chef::Resource::Template.new "/var/lib/postgresql/.ssh/id_rsa" | |
| t.source("id_rsa.erb") |