Skip to content

Instantly share code, notes, and snippets.

View CrystalMethod's full-sized avatar

Lars Martin CrystalMethod

View GitHub Profile
@CrystalMethod
CrystalMethod / README.md
Created October 4, 2018 23:03 — forked from AlinaNova21/README.md
Rancher 2.0, RKE, and some Raspberry Pi 3s

Kubernetes and Arm

Getting rke and Rancher setup to run kubernetes on arm is interesting. There is no official support yet via rancher, although there is interest and some work done towards those efforts. This is my attempt at getting a cluster of 3 Pis (2 3Bs and 1 3B+) provisioned and registered to a rancher 2 server.

Prep

I've successfully completed this both with Hypriot OS 1.9.0 and the arm64 builds https://github.com/DieterReuter/image-builder-rpi64 Both times I used the same basic cloud-init setup

@CrystalMethod
CrystalMethod / HowToOTGFast.md
Created August 13, 2018 11:04 — forked from MarcTreySonos/HowToOTGFast.md
Simple guide for setting up OTG modes on the Raspberry Pi Zero, the fast way!

###Setting up Pi Zero OTG - The quick way (No USB keyboard, mouse, HDMI monitor needed)
More details - http://blog.gbaman.info/?p=791

For this method, alongside your Pi Zero, MicroUSB cable and MicroSD card, only an additional computer is required, which can be running Windows (with Bonjour, iTunes or Quicktime installed), Mac OS or Linux (with Avahi Daemon installed, for example Ubuntu has it built in).
1. Flash Raspbian Jessie full or Raspbian Jessie Lite onto the SD card.
2. Once Raspbian is flashed, open up the boot partition (in Windows Explorer, Finder etc) and add to the bottom of the config.txt file dtoverlay=dwc2 on a new line, then save the file.
3. If using a recent release of Jessie (Dec 2016 onwards), then create a new file simply called ssh in the SD card as well. By default SSH is

@CrystalMethod
CrystalMethod / snips-jackd.md
Created August 13, 2018 11:03 — forked from MarcTreySonos/snips-jackd.md
Snips jackd configuration

TL;DR

Edit the file /etc/snips.toml, in the section snips-audio-server uncomment the line mike and change the name to be the jack source:

[snips-audio-server]
# frame = 256
# bind = "0.0.0.0:26300"
mike = "system"
@CrystalMethod
CrystalMethod / snips-nlu-rs.md
Created August 13, 2018 11:03 — forked from MarcTreySonos/snips-nlu-rs.md
cross compile snips-nlu-rs with dinghy

this exemple suppose :

  • you clone the project in the directory /home/user1
  • you have an Android standalone located at /home/user1/x-tools/NDKr17/arm64

update those path accordingly and check this page for reference https://github.com/snipsco/dinghy/blob/master/docs/android.md

Clone the snips-nlu-rs project

Clone the snips-nlu-rs project and the submodule, then enter the snips-nlu-lib folder

@CrystalMethod
CrystalMethod / NodeDetailFormatter.java
Created February 28, 2014 22:26
Simple Detail Formatter to show detailed information on Neo4j Nodes in "Variables" View (Eclipse Debugger).
StringBuilder sb = new StringBuilder();
sb.append("Id: ");
sb.append(getId());
sb.append("\nLabels: ");
StringBuilder sub = new StringBuilder();
for (org.neo4j.graphdb.Label l : getLabels()) {
sub.append(l.toString());
sub.append(", ");
}
if (sub.length() > 1) {
@CrystalMethod
CrystalMethod / RelationshipDetailFormatter.java
Created February 28, 2014 22:23
Simple Detail Formatter to show detailed information on Neo4j Relationships in "Variables" View (Eclipse Debugger).
StringBuilder sb = new StringBuilder();
sb.append("Id: ");
sb.append(getId());
sb.append("\nType: ");
sb.append(getType().name());
sb.append("\nStart: ");
sb.append(getStartNode().getId());
sb.append("\nEnd: ");
sb.append(getEndNode().getId());
sb.append("\nProperties: ");