Skip to content

Instantly share code, notes, and snippets.

⛰️
Hi

Tristan Rice d4l3k

⛰️
Hi
View GitHub Profile
View mount-lvm-img.md

Mounting LVM partition from disk image

$ sudo losetup /dev/loop0 ./MTFC64GJVDN-4M_1BIT@LFBGA169_3731.BIN
$ sudo partx --update /dev/loop0
$ sudo lvmdiskscan
  /dev/nvme0n1         [    <476.94 GiB]
  /dev/loop0           [      59.28 GiB]
  /dev/mapper/cryptlvm [    <237.13 GiB] LVM physical volume
  /dev/nvme0n1p1       [     100.00 MiB]
View unpack.go
package main
import (
"archive/zip"
"io"
"log"
"os"
"path/filepath"
"strings"
@d4l3k
d4l3k / ap.fbs
Last active Jun 15, 2020
Autopilot neural network weights flatbuffer schema file from Tesla Model 3 - version 2018.32.6
View ap.fbs
namespace fbs.ap;
table Root {
layers : [Layer];
}
table Layer {
name: string;
weights : [Weights];
}
View decode.go
package main
import (
"bytes"
"encoding/binary"
"flag"
"io"
"io/ioutil"
"log"
"os"
@d4l3k
d4l3k / output zmqtest
Last active Feb 5, 2019
ZMQ TCP Push/Pull message drop on tcp reset
View output zmqtest
tristanr@tristanr-arch ~/D/zmqtest> go build -v .; and sudo ./zmqtest
2019/02/05 11:55:44 zmqtest.go:93: sent 0
2019/02/05 11:55:44 zmqtest.go:124: received 0
2019/02/05 11:55:44 zmqtest.go:93: sent 100000
2019/02/05 11:55:44 zmqtest.go:124: received 100000
2019/02/05 11:55:44 zmqtest.go:93: sent 200000
2019/02/05 11:55:44 zmqtest.go:93: sent 300000
2019/02/05 11:55:44 zmqtest.go:124: received 200000
2019/02/05 11:55:44 zmqtest.go:93: sent 400000
2019/02/05 11:55:44 zmqtest.go:93: sent 500000
@d4l3k
d4l3k / reference.md
Last active Jul 25, 2019
Dropbike.ca API
View reference.md
@d4l3k
d4l3k / tensorflow_api.csv
Created Jun 12, 2018 — forked from dustinvtran/tensorflow_api.csv
List of all TensorFlow operations
View tensorflow_api.csv
We can make this file beautiful and searchable if this error is corrected: It looks like row 5 should actually have 1 column, instead of 2. in line 4.
# TensorFlow r0.10
#
# Building Graph
#
add_to_collection,tf.add_to_collection
as_dtype,tf.as_dtype
bytes,tf.bytes
container,tf.container
control_dependencies,tf.control_dependencies
convert_to_tensor,tf.convert_to_tensor
@d4l3k
d4l3k / fuzz_test.go
Created Mar 23, 2018
Generate GRPC request structs for fuzzing.
View fuzz_test.go
package integration
import (
"context"
"crypto/rand"
"log"
mrand "math/rand"
"path/filepath"
"reflect"
"strings"
@d4l3k
d4l3k / queue.go
Created Dec 27, 2017
firego worker queue tool
View queue.go
package main
import (
"fmt"
"log"
"github.com/pkg/errors"
"gopkg.in/zabawaba99/firego.v1"
)
View cockroach.log
I171122 10:36:38.859185 1 util/log/clog.go:992 [config] file created at: 2017/11/22 10:36:38
I171122 10:36:38.859185 1 util/log/clog.go:992 [config] running on machine: ariel
I171122 10:36:38.859185 1 util/log/clog.go:992 [config] binary: CockroachDB CCL v1.2-alpha.20171026 (linux amd64, built 2017/10/26 20:12:03, go1.9)
I171122 10:36:38.859185 1 util/log/clog.go:992 [config] arguments: [/usr/bin/cockroach start --certs-dir=/etc/cockroachdb/certs --store=/var/data/cockroachdb/ --port=26257 --http-port=7005 --logtostderr=ERROR]
I171122 10:36:38.859185 1 util/log/clog.go:992 line format: [IWEF]yymmdd hh:mm:ss.uuuuuu goid file:line msg utf8=✓
I171122 10:36:38.859184 1 server/config.go:311 available memory from cgroups (8.0 EiB) exceeds system memory 31 GiB, using system memory
W171122 10:36:38.859557 1 cli/start.go:713 Using the default setting for --cache (128 MiB).
A significantly larger value is usually needed for good performance.
If you have a dedicated server a reasonable setting is --cache=25%
You can’t perform that action at this time.