Skip to content

Instantly share code, notes, and snippets.

View zankich's full-sized avatar

Adrian Zankich zankich

View GitHub Profile
@zankich
zankich / 01-getting_started.md
Last active May 2, 2019 01:42
Gophercon getting started with Gobot

First go to the Gobot Intel Edison Readme (https://github.com/hybridgroup/gobot/tree/master/platforms/intel-iot/edison#how-to-install) and follow the getting started guide. Your Edison has already been updated to the latest firmware version,
so you can skip that part! You will not need to download the Intel XDK, you only need to go through the steps detailing how to connect through the serial interface and then configure your edison.

Find the box called "Base Shield" and open that up and place the grove "Base Shield" onto your Intel Edison. This will allow you to use the Grove connectors shields and cables!

@zankich
zankich / README.md
Last active April 30, 2019 19:45
testing a bosh template using the bosh-template gem
$ cd cf-mysql-release
$ gem install bosh-template
$ bosh-template jobs/mysql/templates/my.cnf.erb --context "$(cat template-context.json)"
@zankich
zankich / bbb_connect.sh
Last active April 1, 2019 10:56
connect to your beaglebone black using the usb->ethernet and forward the internet from your host computer to the beaglebone black
#!/bin/bash
#
# run this script on your linux host computer to connect to the bbb and forward your internet.
# be sure to replace "enp0s20u1" with the appropriate usb device for your bbb, which can be found
# by doing an "ifconfig" on your host computer.
#
sudo -- sh -c 'echo 1 > /proc/sys/net/ipv4/ip_forward'
sudo iptables -A POSTROUTING -t nat -j MASQUERADE
@zankich
zankich / notifier.go
Last active February 16, 2019 11:48
Santa Monica Golang
package main
import (
"encoding/json"
"fmt"
"net/http"
"time"
"github.com/goiot/devices/piglow"
"golang.org/x/exp/io/i2c"
@zankich
zankich / steps.md
Last active July 24, 2018 18:02
Gobot firmata instructions for Windows
  1. Install gort
  1. Install arduino dependencies and flash firmata
  • Make sure you are running your terminal as an Administrator
  • $ ./gort arduino install
  • reload your env variables, or close your cmd prompt and open a new one
  • $ ./gort scan serial
  • Take note of the COM port listed, this should be your arduino
bosh -d cf-mysql start mysql/2
Using environment 'https://104.199.112.1' as client 'admin'
Using deployment 'cf-mysql'
Continue? [yN]: y
Task 77
Task 77 | 19:49:03 | Preparing deployment: Preparing deployment (00:00:02)
bosh -d cf-mysql instances --details
Using environment 'https://104.199.112.1' as client 'admin'
Task 78. Done
Deployment 'cf-mysql'
Instance Process State AZ IPs State VM CID VM Type Disk CIDs Agent ID Index Resurrection Bootstrap Ignore
Paused
backup-prepare/d011e3cc-7862-4e43-b900-0db88200f332 running z1 10.244.0.150 started d4298212-8046-425f-61c6-0b0bf6fddbd8 default 436f94bc-201e-4dae-7427-ee8462afef64 3fba3b27-7d51-4791-818f-65b48308b3a3 0 false true false

Problems and Questions:

  1. Cross-pollution of duties between objects (calculating old vs new state, building changeset, applying changes)
  2. Cost of refactoring current abstractions vs overhauling deploy/CCK to wholly use new system a. Some code in current flow (e.g. NetworkPlanner, which is primarily concerned with handling static and VIP networking) is not going to be used when hot-swap is turned on. b. We could refactor only hot-swap relevant portions to use patent strategy, but we then will have to support two different systems, which will likely need to interact cleanly; we would need to have a method of converting information between the two systems. c. Edge cases may arise while writing the new patent strategy which break the paradigm. The architecture will need to be vetted more thoroughly, to ensure that we aren't forced to rewrite the new code or sacrifice the abstraction.
  3. Related to #1, the changeset is constructed throughout the flow rather than being finalized before being passed to the
@zankich
zankich / compilation.md
Last active March 18, 2017 00:18 — forked from ships/mvp patents.md
MVP description of parts for foo-mechanism/hotswap-strategy

Compilation

Claims

package claim - A package claim will contain the current package version and the stemcell

Patent Counsel

The patent counsel will create package claims for the new version number and/or stemcell version

Inspector

Will generate embodiment package claims based on the stemcell and version number of used package in instance groups

azs:
- name: z1
cloud_properties: {zone: us-west1-a}
vm_types:
- name: common
cloud_properties:
machine_type: n1-standard-4
root_disk_size_gb: 20
root_disk_type: pd-ssd