Skip to content

Instantly share code, notes, and snippets.

View sspreitzer's full-sized avatar
💭
🔬 T = M/E

Sascha Spreitzer sspreitzer

💭
🔬 T = M/E
View GitHub Profile
@sspreitzer
sspreitzer / op-dedup.rb
Created August 13, 2022 12:47
OnePassword entry deduplication in ruby
require 'open3'
require 'json'
require 'uri'
# MIT license, (c) Sascha Spreitzer, 2022
# !!! Create an export before using this tool !!!
# !!! You may loose all your passwords !!!
# !!! Use at your own risk !!!
# Sascha Spreitzer (c) 2018, MIT License
require 'net/http'
require 'thread'
url = ARGV[0] ||= 'http://example.com/'
many = ARGV[1] ||= 100
res = {}
m = Mutex.new
thr = []
def test
true
end

Keybase proof

I hereby claim:

  • I am sspreitzer on github.
  • I am sspreitzer (https://keybase.io/sspreitzer) on keybase.
  • I have a public key whose fingerprint is BBB7 412E 2856 8425 5600 4487 68D6 6FF5 DDAC 361F

To claim this, I am signing this object:

@sspreitzer
sspreitzer / base16.rb
Last active May 13, 2021 21:49
ruby base16
# Ruby base16 encode/decode
# (c) Sascha Spreitzer, 2016
# MIT license
def b16decode(what)
chars = ''
ret = ''
what.each_char do |c|
chars += c
if chars.size == 2
@sspreitzer
sspreitzer / arp.py
Last active November 2, 2015 12:10
Python Class for Linux ARP Cache
# MIT License (c) Sascha Spreitzer, 2015
class ArpEntry(object):
def __init__(self, line):
self.ip, self.hw_type, self.flags, self.hw_address, self.mask, self.device = \
line.split()
def __str__(self):
return '%s: %s' % (self.ip, self.hw_address)