Skip to content

Instantly share code, notes, and snippets.

View yaauie's full-sized avatar

Ry Biesemeyer yaauie

View GitHub Profile
@bahoo
bahoo / gist:6314071
Last active December 21, 2015 13:39
Mr. Kilmer,
Thanks for your response and pardon my delay in getting back to you as
I collected my thoughts.
I appreciate you wanting to take thoughtful time for debate and
consideration on this very serious topic, but I can't help but be a
little underwhelmed at your commitment to improving the situation.
You voted 'no' on the Amash amendment. OK, the author of the PATRIOT
@yaauie
yaauie / jason-voorhees.rb
Last active June 29, 2017 16:34
JSON-decode recursively until it isn't JSON anymore.
# encoding: utf-8
require 'json'
# For when someone puts JSON in your JSON
# (because MurderingRampage™)
class JasonVoorhees
def self.load(*args)
self.new(JSON).load(*args)
end
@avdi
avdi / apology101.markdown
Created March 22, 2012 17:36
How to apologize

Chances are your head's spinning right now. That accusation of bias caught you off guard, you got kind of defensive, and now all hell has broken loose. You're feeling attacked on all sides. You're a good person at heart, and having all these people treat you like the antichrist is pretty upsetting.

You need to say something, but you're probably not in the best headspace to write copy right now. So to help you along, here's my 100% guaranteed-or-you-money-back scandal defusement apology template:

@yaauie
yaauie / hello.jscript.bat
Created May 6, 2011 21:52
A Polyglot for jscript in batch
0</* :hello
@ECHO Hello, batch!
@cscript /nologo /E:jscript %~f0 %*
@goto :EOF
*/0;
WScript.Echo('Hello, jscript!');
@tenderlove
tenderlove / terrible.rb
Last active May 16, 2020 13:13
I am a terrible person
require 'fiddle'
module IAmAHorriblePerson
def unset flag
value = _wrap self
flags = 8.times.map { |i| value[i] }.pack('C8').unpack('Q').first
[flags & ~flag].pack('Q').unpack('C8').each_with_index { |n,i|value[i] = n }
end
def class= k