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 / unfollow_github_spammers.go
Created April 16, 2025 13:03
To unfollow GitHub profiles that follow over 1'000 other profiles
package gh
import (
"context"
"fmt"
"os"
"github.com/google/go-github/v71/github"
)
@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
@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)