Skip to content

Instantly share code, notes, and snippets.

View stouset's full-sized avatar

Stephen Touset stouset

View GitHub Profile
@stouset
stouset / LICENSE
Last active May 27, 2022 16:46
Best-practices based API key authentication
Copyright © 2021 Stephen Touset <stephen@touset.org>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SO

Keybase proof

I hereby claim:

  • I am stouset on github.
  • I am stouset (https://keybase.io/stouset) on keybase.
  • I have a public key ASCxRy-wugLMPCswprmewJ4K8TAe4GzpiAdWE5FjHsw0hwo

To claim this, I am signing this object:

$ cargo release
Running cargo publish
Updating registry `https://github.com/rust-lang/crates.io-index`
error: no matching package named `sudo_plugin-sys` found
location searched: file:///Users/stephen/Development/squareup.com/sudo_pair/sudo_plugin-sys
required by package `sudo_plugin v1.0.0 (file:///Users/stephen/Development/squareup.com/sudo_pair/sudo_plugin)`
# 1.8
# NOTHING WAS WRONG WITH THIS, ASSHOLES
{ nil => nil,
:a => :b,
'a' => 'b', }
# 1.9+
{ nil: nil, # lol jk this is actually :nil => nil,
a: :b, # this looks ugly as fuck now,
'a': 'b', } # lol jk this is actually still :a => 'b'
/* current API */
{
let secret = Secret::new( /* bytes */ );
secret.read(|slice| { println!("{}", slice) });
}
/* desired API */
{
let secret = Secret::new( /* bytes */ );
10/26/14 1:30:29.469 PM OpenEmuHelperApp[10387]: parent application is: OpenEmu
10/26/14 1:30:29.519 PM OpenEmuHelperApp[10387]: Some shit about the game.
10/26/14 1:30:29.675 PM OpenEmuHelperApp[10387]: Higan: Loading game
10/26/14 1:30:29.675 PM OpenEmuHelperApp[10387]: Loading file "manifest.bml"
10/26/14 1:30:29.676 PM OpenEmuHelperApp[10387]: Loading file "program.rom"
10/26/14 1:30:29.684 PM OpenEmuHelperApp[10387]: Loading file "save.ram"
10/26/14 1:30:29.709 PM OpenEmuHelperApp[10387]: Loading file "ipl.rom"
10/26/14 1:30:30.686 PM OpenEmuHelperApp[10387]: Setting up emulation
#!/bin/bash
CAFOPTS="--soundcheck-generate"
AACOPTS="--soundcheck-read -u pgcm 2 -b 256000 -q 127 -s 2"
DIR=`dirname "$1"`
BASENAME=`basename "$1" .flac`
FLAC=$DIR/$BASENAME.flac
AAC=$DIR/$BASENAME.m4a

Keybase proof

I hereby claim:

  • I am stouset on github.
  • I am stouset (https://keybase.io/stouset) on keybase.
  • I have a public key whose fingerprint is 762C 4988 A937 E727 E751 8481 0C7E 0CE2 F436 D1CF

To claim this, I am signing this object:

Pry.config.tap do |pry|
pry.prompt = [
->(*_) { '>> ' },
->(*_) { ' ' },
]
end
@stouset
stouset / gist:7219295
Last active December 26, 2015 21:58
@sdaubert's remaining contributions
6f97adbd ext/ffi_c/ArrayType.c:129 VALUE ffi_Type;
f8f9ba34 ext/ffi_c/ArrayType.c:131 ffi_Type = rbffi_TypeClass;
f8f9ba34 ext/ffi_c/ArrayType.c:138 rbffi_ArrayTypeClass = rb_define_class_under(moduleFFI, "ArrayType", ffi_Type);
f8f9ba34 ext/ffi_c/ArrayType.c:146 rb_define_const(ffi_Type, "Array", rbffi_ArrayTypeClass);
f8f9ba34 ext/ffi_c/Buffer.c:340 VALUE ffi_AbstractMemory = rbffi_AbstractMemoryClass;
f8f9ba34 ext/ffi_c/Buffer.c:347 BufferClass = rb_define_class_under(moduleFFI, "Buffer", ffi_AbstractMemory);
f8f9ba34 ext/ffi_c/FunctionInfo.c:263 VALUE ffi_Type;
f8f9ba34 ext/ffi_c/FunctionInfo.c:265 ffi_Type = rbffi_TypeClass;
f8f9ba34 ext/ffi_c/FunctionInfo.c:270 rbffi_FunctionTypeClass = rb_define_class_under(moduleFFI, "FunctionType",ffi_Type);
f8f9ba34 ext/ffi_c/FunctionInfo.c:283 rb_define_const(ffi_Type, "Function", rbffi_FunctionTypeClass);