- Download and save scripts "step01-" and "step02-".
- Change to sudo / root
- Execute scripts step01* and then step02*
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
### Keybase proof | |
I hereby claim: | |
* I am elcritch on github. | |
* I am elcritch (https://keybase.io/elcritch) on keybase. | |
* I have a public key ASASCJtnU3IMLH8bOK9NLa1eHUQxMm2uzyItyqtAP-80lQo | |
To claim this, I am signing this object: |
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
require Logger | |
defmodule TestNpn.Application do | |
use Application | |
alias Nerves.Networking | |
@interface :eth0 | |
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
[root@johnny-no-5 (hq) ~]# dmesg | grep bnx1 | |
2016-09-25T22:53:03.543456+00:00 johnny-no-5 mac: [ID 469746 kern.info] NOTICE: bnx1 registered | |
2016-09-25T22:53:03.543467+00:00 johnny-no-5 pcieb: [ID 586369 kern.info] PCIE-device: pci1028,235@0,1, bnx1 | |
2016-09-25T22:53:03.543471+00:00 johnny-no-5 npe: [ID 236367 kern.info] PCI Express-device: pci1028,235@0,1, bnx1 | |
2016-09-25T22:53:03.543476+00:00 johnny-no-5 genunix: [ID 936769 kern.info] bnx1 is /pci@0,0/pci8086,3408@1/pci1028,235@0,1 | |
2016-09-25T22:53:03.543480+00:00 johnny-no-5 bnx: [ID 219732 kern.info] NOTICE: bnx1: (6.0.3) BCM5709 device with F/W Ver5020003 is initialized (1 MSIX) | |
2016-09-25T22:53:03.543763+00:00 johnny-no-5 bnx: [ID 328528 kern.info] NOTICE: bnx1: Copper link is up (1000Mbps, Full Duplex, Tx & Rx Flow Control ON) | |
2016-09-25T22:53:03.543766+00:00 johnny-no-5 bnx: [ID 328528 kern.info] NOTICE: bnx1: Copper link is down | |
2016-09-25T22:53:03.543769+00:00 johnny-no-5 mac: [ID 435574 kern.info] NOTICE: bnx1 link up, 0 Mbps, half duplex | |
2016-09-2 |
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
defmodule Cluster.Strategy.BroadcastGossip do | |
@moduledoc """ Here's the module I made for libcluster that uses local network broadcasting. Useful for nerves local devices. """ | |
require Logger | |
use GenServer | |
use Cluster.Strategy | |
alias Cluster.Strategy.State | |
@default_ifname "eth0" | |
@default_port 45893 |
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
#cloud-config | |
rancher: | |
services: | |
zerotier: | |
image: zerotier/zerotier-containerized:1.2.4 | |
labels: | |
io.rancher.os.scope: system | |
volumes: | |
- /var/lib/zerotier-one:/var/lib/zerotier-one | |
restart: always |
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
iex(node-a@192.168.1.2)1> Node.list() | |
[:"node-b@192.168.1.3"] | |
iex(node-a@192.168.1.2)1> :rpc.call :"node-b@192.168.1.3", IEx, :start, [] |
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
#!/bin/sh | |
sudo systemctl enable syncthing@`whoami`.service | |
sudo systemctl start syncthing@`whoami`.service | |
systemctl status syncthing@`whoami`.service | |
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
defmodule ParseUdhcpd do | |
def find_leases(interface \\ "eth0") do | |
udhcpd_lease_bytes = | |
"/tmp/vintage_net/udhcpd.#{interface}.leases" | |
|> File.read!() | |
<<written_at::signed-integer-64, leases_bytes::bits >> = udhcpd_lease_bytes | |
parse_leases(leases_bytes, []) |
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
0x4A |> Integer.to_string(2) |> String.pad_leading(8, "0") |> String.pad_leading(10,"0x") |