Skip to content

Instantly share code, notes, and snippets.

View kelnos's full-sized avatar

Brian Tarricone kelnos

View GitHub Profile
@kelnos
kelnos / README.md
Last active February 22, 2021 08:05
Building esp32-wifi against Rust 1.50.0 using ESP-IDF 4.2
  1. Grab the following:
  2. If you've downloaded the Rust tarball, unpack to /opt/xtensa. If you are building from source, use the script provided in this gist (rust-xtensa-build) to build it.
  3. Install form: cargo install form
  4. Install svdtools (requires python 3.6 or above): pip3 install --upgrade --user svdtools
  5. Install an old-ish version of svd2rust using:
@kelnos
kelnos / gmail-auto-purge.gs
Created February 10, 2021 18:53
GMail Auto-Purge Script
// The name of the Gmail labels and categories that are to be auto-purged
var GMAIL_LOCATIONS = {
"label": [
"<some-label>"
],
"category": [
"promotions"
]
};
[:~] $ cat what.scala
object what {
object the {
case object hell
}
def main(args: Array[String]): Unit =
println(what.the.hell.getClass.getSimpleName)
}
[:~] $ scalac what.scala
@kelnos
kelnos / weird.md
Created November 26, 2019 04:39
Dockerfile COPY is weird

So I do some docker things:

$ ls project
README.md src
$ ls project/src
main test
$ cat Dockerfile
# ... other stuff...
WORKDIR /work

Keybase proof

I hereby claim:

  • I am kelnos on github.
  • I am kelnos (https://keybase.io/kelnos) on keybase.
  • I have a public key whose fingerprint is 0111 BE68 55BF 32D4 CE90 EE18 28F7 0DC9 50FB 17A7

To claim this, I am signing this object:

@kelnos
kelnos / gist:5166387
Last active December 14, 2015 23:29
make your jenkins confs quieter
--- gistfile0.xml 2013-03-14 16:59:33.676442261 -0700
+++ gistfile1.xml 2013-03-14 16:59:35.100413108 -0700
@@ -1,59 +1,44 @@
<hudson.plugins.emailext.ExtendedEmailPublisher>
- <recipientList>{recipients}</recipientList>
+ <recipientList></recipientList>
<configuredTriggers>
<hudson.plugins.emailext.plugins.trigger.UnstableTrigger>
<email>
- <recipientList></recipientList>
@kelnos
kelnos / monitor-toggle.sh
Created January 10, 2013 10:03
script to toggle ext monitor on and offf
#!/bin/bash
set -ex
stuff=$(xrandr | grep -v -E '^eDP1' | grep ' connected') && have_ext=yes || have_ext=no
if [ "$have_ext" = "no" ]; then
# just make sure it's off
for op in $(xrandr | awk '/disconnected/ { print $1 }'); do
xrandr --output $op --off
@kelnos
kelnos / gist:4020031
Created November 5, 2012 20:05
remote file copy w/o scp
# from memory; could have errors
remote-host $ tar czf - * | ssh local-host "mkdir destdir && cd destdir && tar xzf -"
# or if you can't make connections remote-host to local-host:
local-host $ mkdir destdir && cd destdir && ssh remote-host "cd srcdir && tar czf - *" | tar xzf -