Skip to content

Instantly share code, notes, and snippets.

@OddBloke
OddBloke / nose_checker.py
Created September 24, 2013 08:07
A pylint plugin to fix nose.tools import errors
# The MIT License (MIT)
#
# Copyright (c) 2013 Daniel Watkins <daniel@daniel-watkins.co.uk>
#
# 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:
/opt/vagrant/embedded/gems/gems/vagrant-1.3.4/plugins/provisioners/salt/config.rb:78:in `pillar': undefined method `deep_merge!' for {}:Hash (NoMethodError)
from /home/danielwatkins/dev/zonza-webapp-formula/Vagrantfile:21:in `block (2 levels) in <top (required)>'
from /opt/vagrant/embedded/gems/gems/vagrant-1.3.4/plugins/kernel_v2/config/vm_provisioner.rb:42:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.3.4/plugins/kernel_v2/config/vm_provisioner.rb:42:in `initialize'
from /opt/vagrant/embedded/gems/gems/vagrant-1.3.4/plugins/kernel_v2/config/vm.rb:214:in `new'
from /opt/vagrant/embedded/gems/gems/vagrant-1.3.4/plugins/kernel_v2/config/vm.rb:214:in `provision'
from /home/danielwatkins/dev/zonza-webapp-formula/Vagrantfile:18:in `block in <top (required)>'
from /opt/vagrant/embedded/gems/gems/vagrant-1.3.4/lib/vagrant/config/v2/loader.rb:37:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.3.4/lib/vagrant/config/v2/loader.rb:37:in `load'
from /opt/vagrant/embedded/gems/gems/vagrant-1.
def produce_lists(elements, n):
sources = [range(n) for _ in range(elements)]
return product(*sources)
@OddBloke
OddBloke / ical_uid_test.py
Last active August 29, 2015 14:00
Test of iCalendar UIDs
#!/usr/bin/env python
from datetime import date
from icalendar import Calendar, Event, vCalAddress, vText
def add_person(event):
person = vCalAddress('http://foo.bar.com/blah/')
person.params['cn'] = vText('Our Example Person')
event.add('attendee', person)
@OddBloke
OddBloke / pre-push
Last active August 29, 2015 14:01
Ahhh... Push It
#!/bin/sh
curl -s "$(youtube-dl -g http://www.youtube.com/watch\?v\=vCadcBR95oU)" | mplayer -really-quiet -cache 8192 -vo null - > /dev/null 2>&1 &
Xlib: extension "RANDR" missing on display ":99".
*** LOG addons.manager: Application has been upgraded
*** LOG addons.xpi: startup
*** LOG addons.xpi: checkForChanges
*** LOG addons.xpi: Directory state JSON differs: cache [] state [{"name":"app-system-share","addons":{"ubufox@ubuntu.com":{"descriptor":"/usr/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}/ubufox@ubuntu.com","mtime":1401360312000,"rdfTime":1375741724000}}},{"name":"app-global","addons":{"{972ce4c6-7e08-4474-a285-3208198ce6fd}":{"descriptor":"/usr/lib/firefox/browser/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}","mtime":1401360309000,"rdfTime":1398715524000},"langpack-en-GB@firefox.mozilla.org":{"descriptor":"/usr/lib/firefox/browser/extensions/langpack-en-GB@firefox.mozilla.org.xpi","mtime":1398716532000},"langpack-en-ZA@firefox.mozilla.org":{"descriptor":"/usr/lib/firefox/browser/extensions/langpack-en-ZA@firefox.mozilla.org.xpi","mtime":1398716532000}}},{"name":"app-profile","addons":{"fxdriver@googlecode.com":{"descri
2014-Aug-01 16:51:40 LedgerConsensus:NFO initial position 0000000000000000000000000000000000000000000000000000000000000000
2014-Aug-01 16:51:42 LedgerConsensus:NFO Proposers:5 nw:70 thrV:3 thrC:4
2014-Aug-01 16:51:42 LedgerTiming:NFO normal consensus
2014-Aug-01 16:51:42 LedgerConsensus:NFO Converge cutoff (5 participants)
2014-Aug-01 16:51:42 LedgerConsensus:NFO CNF newLCL 3E9A03856D2A06F8816180269941153E7D9FF26951CC7C9F71FA2FF289F9482D
2014-Aug-01 16:51:42 LedgerMaster:NFO Advancing accepted ledger to 89583 with >= 3 validations
2014-Aug-01 16:51:42 Ledger:WRN Ledger 3 missing hash for 1 (1,2)
2014-Aug-01 16:51:42 Ledger:WRN Can't get seq 1 from 3 past
2014-Aug-01 16:51:42 Ledger:WRN Ledger 3 missing hash for 0 (1,3)
2014-Aug-01 16:51:42 Ledger:WRN Can't get seq 0 from 3 error
### Keybase proof
I hereby claim:
* I am OddBloke on github.
* I am odd_bloke (https://keybase.io/odd_bloke) on keybase.
* I have a public key whose fingerprint is 5848 D31C A3C4 2D64 609F 49EB DDAA DAB0 E8A4 14F6
To claim this, I am signing this object:
@OddBloke
OddBloke / reproduce.sh
Last active August 29, 2015 14:17
CVE-2015-2296 Reproduction
#!/bin/bash
set -m
cleanup () {
jobs -p | xargs kill -INT
}
python source.py &
python target.py &

Keybase proof

I hereby claim:

  • I am OddBloke on github.
  • I am odd_bloke (https://keybase.io/odd_bloke) on keybase.
  • I have a public key whose fingerprint is 4ADD 4744 1A66 23E7 291B F2B9 EEE6 8776 EDB1 3EA0

To claim this, I am signing this object: