Skip to content

Instantly share code, notes, and snippets.

View jonhoo's full-sized avatar
🤦‍♂️
Permanent 418 status code.

Jon Gjengset jonhoo

🤦‍♂️
Permanent 418 status code.
View GitHub Profile

Hi there!

I'm looking for a mascot to use with my [YouTube] and [Twitch] channels. Unlike seemingly many of the channels out there, mine is not gaming related, but is instead a place where I do live programming videos with an educational focus on the [Rust programming language].

My want for a mascot is particularly tied to a new series of streams I've started doing called "Crust of Rust". I think the name is cute, and warrants a mascot, though I'd like to also use the mascot for the rest of my channel.

#!/bin/bash
dry=0
if [[ $# -gt 0 && $1 == "-n" ]]; then
dry=1
shift
fi
prefix="v"
if [[ $# -gt 0 ]]; then
if [[ $1 = -* || $# -gt 1 ]]; then
<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:googleplay="http://www.google.com/schemas/play-podcasts/1.0" version="2.0">
<channel>
<title>The Unknown Podcast</title>
<link>http://sample.com/podcasts/unknown/index.html</link>
<language>en-us</language>
<copyright>℗ 2025 Unknown Podcaster Corp</copyright>
<googleplay:author>Unannounced Podcaster</googleplay:author>
<googleplay:description>The Unknown Podcast will look at all the things that are unknown or unknowable. Find us on Google Play Music!</googleplay:description>
<description>The Unknown Podcast will look at all the things that are unknown or unknowable.</description>
@jonhoo
jonhoo / README.md
Last active July 19, 2021 10:49
Distributed RWMutex in Go
@jonhoo
jonhoo / raft.go
Created March 16, 2016 22:33
Raft pseudocode
// This file gives pseudocode for the complete operation of a Raft peer,
// including the fast backtracking optimization. The implementation here is
// currently 0-indexed, as this simplifies the implementation in many cases.
// This implementation also does not discuss locks at all, which will be vital
// in any real implementation.
//
// ============================================================================
// The following data needs to be persisted
// ============================================================================
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
>
<channel>
<atom:link href="{{ site.url }}{{ page.url }}" rel="self" type="application/rss+xml" />
<link>{{ site.url }}</link>
@jonhoo
jonhoo / gist:2205417
Created March 26, 2012 14:20
Swipe and click handlers in simple JS
try{
document.createEvent("TouchEvent");
// Here we're ensured touch capabilities
var scroll = document.getElementById('myid');
var start = null;
var clickIfEnd = true;
scroll.addEventListener('touchstart', function (e) {
start = e.touches[0].pageX;
clickIfEnd = true;
@jonhoo
jonhoo / vpn.sh
Created December 16, 2011 14:10
Script for connecting to VPN using OpenVPN configs
#!/bin/bash
if [ -n "$1" ];
then
if [ -e "$HOME/.openvpn/$1.ovpn" ]
then
sudo openvpn --cd ~/.openvpn --config "$1.ovpn" --daemon
STATUS=$?
if [ $STATUS -eq 0 ]
then
echo "Connected to VPN network $1"
view-request::submit request:
mean: 5.3µs, p50: 8µs, p90: 16µs, p99: 24µs, p999: 24µs, max: 24µs, #: 34
1µs | ************************************ | 88.2th %-ile
2µs | | 88.2th %-ile
4µs | | 88.2th %-ile
8µs | | 88.2th %-ile
16µs | **** | 97.1th %-ile
view-request::waiting for service readiness:
mean: 1404.2µs, p50: 1466µs, p90: 1859µs, p99: 3670µs, p999: 3670µs, max: 3670µs, #: 34
64µs | ** | 2.9th %-ile
diff --git a/tower-buffer/Cargo.toml b/tower-buffer/Cargo.toml
index 328a0c7..4728c9e 100644
--- a/tower-buffer/Cargo.toml
+++ b/tower-buffer/Cargo.toml
@@ -21,12 +21,17 @@ Buffer requests before dispatching to a `Service`.
categories = ["asynchronous", "network-programming"]
edition = "2018"
+[features]
+log = ["tracing/log"]