Skip to content

Instantly share code, notes, and snippets.


Keybase proof

I hereby claim:

  • I am bcc on github.
  • I am bcc ( on keybase.
  • I have a public key ASD_WK1Gu7hEsrx3pTDFzfXg1UdtrUJ3oAga0KnouFnmwQo

To claim this, I am signing this object:

bcc / Fix-SplunkBuckets.ps1
Last active Mar 11, 2019
Fix splunk bucket ID clashes
View Fix-SplunkBuckets.ps1
# Used this to merge buckets from a cluster that was being deprecated into a single node for archive purposes.
# You can leave the node GUID, but the IDs do need to be unique. It's not pretty but it works.
# 0. Stop splunk
# 1. Copy {index}/db/db_* directories from each indexer (you can ignore the rb_ ones, those are replicated buckets). On windows, this works well over RDP: robocopy "\\tsclient\D\Splunk\var\lib\splunk" f:\indexes /MIR /XD "rb_*" /XD "hot_*" /XD "GlobalMetaData"
# 2. Add missing indexes to etc/system/local/indexes.conf
# 3. Run this script in the db directory for any index with conflicting bucket IDs (probably all of them that you've messed with)
# 4. If the internal indexes are fine and splunk starts (if not, check splunkd.log), check the index list for any other disabled indexes and enable them. This search will find any further conflicts: index="_internal" "id conflicts"
# 5. You might also need to handle colddb - easiest thing is to bump $id to a safe value (greater than number of buck
bcc /
Created Dec 9, 2017
The Pi Hut LED Christmas Tree serene mode
from gpiozero import LEDBoard
from signal import pause
from time import sleep
brightness = 0.1/steps
leds = LEDBoard(*range(2,28),pwm=True)
while True:
bcc /
Created Mar 14, 2016
Extract OATH token seeds from a Gemalto provided PSKC v1 XML file.
# Extract OATH token seeds from a Gemalto provided PSKC v1 XML file.
# This script will *only* work if the data is aes128-cbc encrypted, and the
# passphrase is strengthened using PBKDF2.
# I've tested this with a file provided for the IDProve 100 / Easy OTP Token v3.
#, 2013
use strict;