Skip to content

Instantly share code, notes, and snippets.

@joshcarter
joshcarter / sum_dvd_media.rb
Created October 25, 2012 22:48
Checksum directory of DVD images
def each_file(root, &block)
Dir.foreach(root) do |entry|
next if entry.start_with?(".")
entry = File.join(root, entry)
if File.file?(entry)
block.call(entry)
else
each_file(entry, &block)
### Keybase proof
I hereby claim:
* I am joshcarter on github.
* I am joshcarter (https://keybase.io/joshcarter) on keybase.
* I have a public key ASCLOgYnGQKV79FI-mDEDbJNExe0ANSGcdFUUpemojzu8go
To claim this, I am signing this object:
/**
* @file memory_tracking.cpp
* Implements simple memory tracking for use in C++ applications. Define
* TRACK_MEMORY to enable during debug and unit testing, and undef for
* production.
* Version 1.01
*
* Copyright (c) Josh Carter <[email protected]>, 2006
* All rights reserved.
*
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@joshcarter
joshcarter / ElasticSearch.ipynb
Created July 23, 2019 16:32
ElasticSearch Test Code
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@joshcarter
joshcarter / meshtastic_test.py
Created October 5, 2022 04:02
Meshtastic Python API example
from time import sleep
import meshtastic
import meshtastic.serial_interface
from pubsub import pub
def on_receive(packet, interface):
print(f'received: {packet}')
@joshcarter
joshcarter / hash_speed_test.go
Created December 4, 2022 04:56
Benchmark of various Go hashes
// Tests to benchmark how fast a 128 bytes of data can be turned into
// a 4 byte hash.
package hash_speed
import (
"crypto/sha256"
"crypto/sha512"
"hash/crc32"
"hash/crc64"
"hash/fnv"
@joshcarter
joshcarter / compounding_interest.ipynb
Created October 1, 2024 02:01
Daily Compounding Interest and Float Error Comparisor
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.