Skip to content

Instantly share code, notes, and snippets.

@sdwilsh
sdwilsh / pi-mac.sh
Created May 30, 2020 17:20
Get the MAC Address of the Pi
echo "PI_MAC=$(ifconfig eth0 | awk '/ether/{ print $2;}' | tr ':' '-')"
@sdwilsh
sdwilsh / build.sh
Created May 30, 2020 17:06
Ubuntu Server Image Building for Network Booting a Pi 4
ETH0_IPV4="10.117.0.40/23"
ETH0_IPV6="fd36:3eb3:43b0:75::28/64"
ETH0_GATEWAY="10.117.0.1"
ETH0_DNS="10.117.0.3 fd36:3eb3:43b0:75::3 10.117.0.4 fd36:3eb3:43b0:75::4"
HOSTNAME="monitor01.hogs.tswn.us"
ISCSI_INITIATOR_IQN="iqn.2019-09.us.tswn.us:monitor01"
ISCSI_TARGET_IQN="iqn.2019-09.net.shawnwilsher.firstlightweaveslivingsong.ctl:monitor01"
ISCSI_TARGET_IP="10.117.0.10"
NTPD_SERVERS="10.117.0.10"
ROOT_PUB_KEY="ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOLhuqsROt8cbpGzED6l47JXPTTsPyxAOl9Kji3ezjr8 ed25519-key-20200521"
@sdwilsh
sdwilsh / setup.sh
Last active May 30, 2020 22:53
Ubuntu Server Setup for Network Booting a Pi 4
# Fetch and Install Dependencies
sudo apt install \
cloud-guest-utils \
golang-go \
kpartx \
nfs-common \
open-iscsi \
qemu-user-static
# Install Packer
@sdwilsh
sdwilsh / netboot-pi-config.json
Last active September 22, 2023 09:15
Packer Config for Network Booting a Pi 4
{
"variables": {
"eth0_ipv4": "",
"eth0_ipv6": "",
"eth0_gateway": "",
"eth0_dns": "",
"hostname": "",
"iscsi_initiator_iqn": "",
"iscsi_target_iqn": "",
"iscsi_target_ip": "",
100 bazel (master) $ ./output/bazel build --verbose_failures //src/main/cpp/util:*
WARNING: Output base '/home/sdwilsh/.cache/bazel/_bazel_sdwilsh/019bdcb464c09203676cd7463f866545' is on NFS. This may lead
to surprising failures and undetermined behavior.
INFO: Found 23 targets...
INFO: From Compiling src/main/cpp/util/port.cc:
gcc: unrecognized option '-no-canonical-prefixes'
INFO: From Compiling src/main/cpp/util/errors.cc:
gcc: unrecognized option '-no-canonical-prefixes'
INFO: From Compiling src/main/cpp/util/strings.cc:
gcc: unrecognized option '-no-canonical-prefixes'
& "C:\Program Files\Rust stable 1.1\bin\rustc.EXE" --crate-name messenger --crate-type rlib --emit obj -o buck-out\gen\messenger\messenger\libmessenger.rlib messenger\messenger.rs
& "C:\Program Files\Rust stable 1.1\bin\rustc.EXE" --crate-name hello --crate-type bin -o buck-out\gen\hello\hello --extern messenger=buck-out\gen\messenger\messenger\libmessenger.rlib hello.rs
@sdwilsh
sdwilsh / errors
Created July 13, 2015 21:52
Build Errors with 1.1.0
/home/sdwilsh/code/rustc-1.1.0/src/libcore/num/flt2dec/bignum.rs:336:32: 336:39 error: mismatched types:
expected `&'static [&'static str]`,
found `&[&'static str; 1]`
(expected slice,
found array of 1 elements) [E0308]
/home/sdwilsh/code/rustc-1.1.0/src/libcore/num/flt2dec/bignum.rs:336 try!(write!(f, "{:#x}", self.base[sz-1]));
^~~~~~~
note: in expansion of format_args!
/home/sdwilsh/code/rustc-1.1.0/src/libcore/macros.rs:185:49: 185:71 note: expansion site
/home/sdwilsh/code/rustc-1.1.0/src/libcore/macros.rs:184:1: 186:2 note: in expansion of write!
@sdwilsh
sdwilsh / errors
Created July 13, 2015 21:52
Build Errors with 1.0.0
/home/sdwilsh/code/rustc-1.1.0/src/libcore/lib.rs:50:21: 50:47 error: unstable feature
/home/sdwilsh/code/rustc-1.1.0/src/libcore/lib.rs:50 #![cfg_attr(stage0, feature(custom_attribute))]
^~~~~~~~~~~~~~~~~~~~~~~~~~
note: this feature may not be used in the stable release channel
/home/sdwilsh/code/rustc-1.1.0/src/libcore/lib.rs:61:1: 61:20 error: unstable feature
/home/sdwilsh/code/rustc-1.1.0/src/libcore/lib.rs:61 #![feature(no_std)]
^~~~~~~~~~~~~~~~~~~
note: this feature may not be used in the stable release channel
/home/sdwilsh/code/rustc-1.1.0/src/libcore/lib.rs:66:1: 66:36 error: unstable feature
/home/sdwilsh/code/rustc-1.1.0/src/libcore/lib.rs:66 #![feature(intrinsics, lang_items)]
-- a/src/com/facebook/buck/android/AndroidPrebuiltAar.java
+++ b/src/com/facebook/buck/android/AndroidPrebuiltAar.java
@@ -56,7 +56,7 @@ public class AndroidPrebuiltAar
/* resources */ ImmutableSortedSet.<SourcePath>of(),
Optional.of(proguardConfig),
/* postprocessClassesCommands */ ImmutableList.<String>of(),
- ImmutableSortedSet.<BuildRule>of(prebuiltJar),
+ /* exportedDeps */ ImmutableSortedSet.<BuildRule>of(prebuiltJar),
/* providedDeps */ ImmutableSortedSet.<BuildRule>of(),
/* additionalClasspathEntries */ ImmutableSet.<Path>of(),
--- a/src/com/facebook/buck/android/AndroidPrebuiltAar.java
+++ b/src/com/facebook/buck/android/AndroidPrebuiltAar.java
@@ -56,7 +56,7 @@ public class AndroidPrebuiltAar
/* resources */ ImmutableSortedSet.<SourcePath>of(),
Optional.of(proguardConfig),
/* postprocessClassesCommands */ ImmutableList.<String>of(),
- ImmutableSortedSet.<BuildRule>of(prebuiltJar),
+ /* exportedDeps */ ImmutableSortedSet.<BuildRule>of(prebuiltJar),
/* providedDeps */ ImmutableSortedSet.<BuildRule>of(),
/* additionalClasspathEntries */ ImmutableSet.<Path>of(),