Skip to content

Instantly share code, notes, and snippets.

View Doom4535's full-sized avatar

Aaron Covrig Doom4535

  • Walla Walla University
View GitHub Profile
@Doom4535
Doom4535 / demod_demo_gr3_7.grc
Last active September 16, 2023 19:18 — forked from marcusmueller/demod_demo.grc
FSK Demod example for GNU Radio 3.7 (XML Synatx)
<?xml version='1.0' encoding='utf-8'?>
<?grc format='1' created='3.7.9'?>
<flow_graph>
<timestamp>Thu Apr 28 14:05:53 2016</timestamp>
<block>
<key>options</key>
<param>
<key>author</key>
<value></value>
</param>
@Doom4535
Doom4535 / gpg_git_signing.md
Created January 5, 2022 01:39 — forked from alopresto/gpg_git_signing.md
Steps to enable GPG signing of git commits.

If anyone is interested in setting up their system to automatically (or manually) sign their git commits with their GPG key, here are the steps:

  1. Generate and add your key to GitHub
  2. $ git config --global commit.gpgsign true ([OPTIONAL] every commit will now be signed)
  3. $ git config --global user.signingkey ABCDEF01 (where ABCDEF01 is the fingerprint of the key to use)
  4. $ git config --global alias.logs "log --show-signature" (now available as $ git logs)
  5. $ git config --global alias.cis "commit -S" (optional if global signing is false)
  6. $ echo "Some content" >> example.txt
  7. $ git add example.txt
  8. $ git cis -m "This commit is signed by a GPG key." (regular commit will work if global signing is enabled)
@Doom4535
Doom4535 / building_tensorflow.md
Created June 12, 2021 00:52 — forked from kmhofmann/building_tensorflow.md
Building TensorFlow from source

Building TensorFlow from source (TF 2.3.0, Ubuntu 20.04)

Why build from source?

The official instructions on installing TensorFlow are here: https://www.tensorflow.org/install. If you want to install TensorFlow just using pip, you are running a supported Ubuntu LTS distribution, and you're happy to install the respective tested CUDA versions (which often are outdated), by all means go ahead. A good alternative may be to run a Docker image.

I am usually unhappy with installing what in effect are pre-built binaries. These binaries are often not compatible with the Ubuntu version I am running, the CUDA version that I have installed, and so on. Furthermore, they may be slower than binaries optimized for the target architecture, since certain instructions are not being used (e.g. AVX2, FMA).

So installing TensorFlow from source becomes a necessity. The official instructions on building TensorFlow from source are here: ht

@Doom4535
Doom4535 / README.md
Created June 1, 2021 14:12 — forked from Jakuje/README.md
OpenSC test Sign, Verify, Encipher and Decipher from commandline with OpenSSL CLI
export PIN=111111
export SIGN_KEY=11
export ENC_KEY=55

Sign/Verify using private key/certificate

  • Create a data to sign

    echo "data to sign (max 100 bytes)" > data
    
@Doom4535
Doom4535 / Unbrick_Buffalo_WZR-HP-G300NH.md
Created March 11, 2021 23:41 — forked from pjobson/Unbrick_Buffalo_WZR-HP-G300NH.md
How to Unbrick the Buffalo WZR-HP-G300NH

Unbricking a Buffalo WZR-HP-G300NH

TFTP recovery in OSX 10.13

Similar steps can be used under Linux, I have no idea how to Windows anymore. This will probably work for similar Buffalo WZR routers, though your milage may vary. These directions flash the router back to stock Buffalo branded DDWRT.

When these routers brick they tend to go into a kind of reboot mode. At the begining of the reboot, the TFTP server is available for a brief period of time, then all of the lights flash and the unit reboots. We're exploiting the short period of time where the router is in TFTP mode at the start of the reboot. You can try to do a put via TFTP at the begining of this cycle, even if your router has been plugged in for awhile.

Back to Stock Buffalo Branded DDWRT

@Doom4535
Doom4535 / tweaks.md
Created March 31, 2018 02:36 — forked from jakelee8/tweaks.md
Linux performance tweaks

Linux performance tweaks

All commands are run as root.

Enable swap file

Create the swap file using either of these commands. fallocate is faster but may not work on all filesystems.

fallocate -l 32G /swap/swap0
@Doom4535
Doom4535 / ipow.c
Created April 2, 2017 05:42 — forked from orlp/ipow.c
int64_t ipow(int64_t base, uint8_t exp) {
static const uint8_t highest_bit_set[] = {
0, 1, 2, 2, 3, 3, 3, 3,
4, 4, 4, 4, 4, 4, 4, 4,
5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5,
6, 6, 6, 6, 6, 6, 6, 6,
6, 6, 6, 6, 6, 6, 6, 6,
6, 6, 6, 6, 6, 6, 6, 6,
6, 6, 6, 6, 6, 6, 6, 255, // anything past 63 is a guaranteed overflow with base > 1
@Doom4535
Doom4535 / crc.js
Created February 20, 2017 03:20 — forked from TooTallNate/crc.js
Modbus Serial RTU CRC Algorithm
var data;
process.stdin.on('data', function(chunk) {
data = chunk
});
process.stdin.on('end', function() {
console.log(data);
var givenCrc = data.slice(data.length-2);
givenCrc = (data[1] << 7 | data[0]);
console.log(givenCrc);