Skip to content

Instantly share code, notes, and snippets.

View witoff's full-sized avatar
💭
fully protected

Rob Witoff witoff

💭
fully protected
View GitHub Profile
@hudon
hudon / docker-log-truncate
Last active November 9, 2016 06:06
Automatically truncate docker logs on a coreos machine
cat > /var/tmp/log-truncate <<EOF
#!/bin/sh
set -eux
cd /var/lib/docker/containers
for id in *
do
logfile="\${id}/\${id}-json.log"
[ -e "\${logfile}" ] && truncate -s 0 "\${logfile}"
done
btrfs balance start -v -dusage=20 /var/lib/docker/btrfs
@bwhaley
bwhaley / poodle_shave.py
Created October 15, 2014 05:09
Remove SSLv3 from AWS ELBs
# poodle_shave.py
# It is YOUR responsibility to stop POODLE attacks by disabling SSLv3!
import os
import sys
import boto.ec2.elb
try:
os.environ["AWS_ACCESS_KEY_ID"]
os.environ["AWS_SECRET_ACCESS_KEY"]
@0xabad1dea
0xabad1dea / rsa-not-buying-it.md
Last active May 4, 2022 21:59
Sorry, RSA, I'm just not buying it

Sorry, RSA, I'm just not buying it

I want to be extremely clear about three things. First, this is my personal opinion – insert full standard disclaimer. Second, this is not a condemnation of everyone at RSA, present and past. I assume most of them are pretty okay, and that the problem is confined to a few specific points in the company. However, “unknown problem people making major decisions at RSA” is a bit unwieldy, so I will just say RSA. Third, I'm not calling for a total boycott on RSA. I work almost literally across the street from them and I don’t want to get beat up by roving gangs of cryptographers at the local Chipotle.

RSA's denial published last night is utter codswallop that denies pretty much everything in the world except the actual allegations put forth by Reuters and hinted at for months by [other sources](http://li

@witoff
witoff / Poll_Coinbase.js
Last active December 15, 2015 08:39
Poll Coinbase for Coin Availability
/* COMPILED:
* Add this snippet as a bookmark and click while on this url:
* https://coinbase.com/buys to check for coin availability every 60 seconds.
* Will sound an audible alarm when coins are available, if using a compliant browser (use chrome).
* Note: Don't DDOS our friends at coinbase!
*/
javascript:var%20s%3Ddocument.createElement%28%27script%27%29%3Bs.setAttribute%28%27type%27%2C%20%27text/javascript%27%29%3Bs.innerHTML%3D%22var%20beep%3D%28function%28%29%7Bvar%20ctx%3Dnew%28window.audioContext%7C%7Cwindow.webkitAudioContext%29%3Breturn%20function%28duration%2Ctype%2CfinishedCallback%29%7Bduration%3D%2Bduration%3Btype%3D%28type%255%29%7C%7C0%3Bif%28typeof%20finishedCallback%21%3D%27function%27%29%7BfinishedCallback%3Dfunction%28%29%7B%7D%7Dvar%20osc%3Dctx.createOscillator%28%29%3Bosc.type%3Dtype%3Bosc.connect%28ctx.destination%29%3Bosc.noteOn%280%29%3BsetTimeout%28function%28%29%7Bosc.noteOff%280%29%3BfinishedCallback%28%29%7D%2Cduration%29%7D%7D%29%28%29%3B%24%28%27%23transfer_btc%27%29.fo
@joshaven
joshaven / vash.rb
Created September 10, 2009 21:19
Volatile Ruby Hash > Vash
#############################################################################
# Class: Vash (Ruby Volatile Hash)
# Hash that returns values only for a short time. This is useful as a cache
# where I/O is involved. The primary goal of this object is to reduce I/O
# access and due to the nature of I/O being slower then memory, you should also
# see a gain in quicker response times.
#
# For example, if Person.first found the first person from the database & cache
# was an instance of Vash then the following would only contact the database for
# the first iteration: