Skip to content

Instantly share code, notes, and snippets.

View noqqe's full-sized avatar
😴

Florian Baumann noqqe

😴
View GitHub Profile
@noqqe
noqqe / show-docker-ports.py
Created May 9, 2022 14:30
Shows ports that are used for your nexus instances docker repos
#!/usr/bin/env python3
# Usage
# ./show-docker-ports.py https://adminuser:adminpass@nexus.acme.com
import sys
import json
import requests
base_url=sys.argv[1]
@noqqe
noqqe / bitcoin.sh
Created June 4, 2011 10:32
Bitcoin Mining Script for Debian
#!/bin/bash
### BEGIN INIT INFO
# Provides: BitCoinMining
# Required-Start: $local_fs $network
# Required-Stop: $local_fs $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# X-Interactive: false
# Short-Description: Start/stop BitCoing Mining poclbm-mod
### END INIT INFO
@noqqe
noqqe / rsa-bash-usage
Last active December 11, 2022 17:53
RSA Implementation written in Bash
$#./rsa.bash prime1 prime2 msg
$ ./rsa.bash 911 43 8234
priv: 21977
pub: 1913
phi: 38220
orig msg: 8234
encr msg: 33207
decr msg: 8234
@noqqe
noqqe / nacl-encryption.py
Last active January 18, 2022 15:43
An example code for pynacl encryption and decryption (Salsa20+poly1305)
#!/usr/bin/env python2.7
# -*- coding: utf-8 -*-
import nacl.secret
import nacl.utils
import base64
from pyblake2 import blake2b
import getpass
@noqqe
noqqe / 0ocrawl.bash
Created June 12, 2012 19:11
0ocrawl.bash: Easy webcrawling with redis
#!/bin/bash
# 0ocrawl.bash: Easy webcrawling with redis
# Copyright: (C) 2012 Florian Baumann
# License: GPL-3 <http://www.gnu.org/licenses/gpl-3.0.txt>
# Date: Friday 2012-06-08
## Configuration
REDIS="/usr/bin/redis-cli"
REDISOPTS="--raw -h localhost"
@noqqe
noqqe / laschomat.go
Created April 7, 2021 15:14
Armin Laschet denkt über Ostern nach.
package main
import (
"fmt"
"math/rand"
"time"
)
var number = []string{
"ein-",
@noqqe
noqqe / archivist.py
Last active January 18, 2021 15:32
Fetches images from http://gatherer.magic.com and saves them to local disk
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
from bs4 import BeautifulSoup
import requests
import urllib
import argparse
ap = argparse.ArgumentParser()
@noqqe
noqqe / rot13.bash
Created August 13, 2011 11:39
An implementation of rot13 encryption written in pure bash
#!/bin/bash
# Choose your favorite table
# classic
SIGNS=( a b c d e f g h i j k l m n o p q r s t u v w x y z )
# advanced
#SIGNS=( a b c d f e h g j i l k m n o p q r s t u v w x y z . - ? ! "#" "+" )
@noqqe
noqqe / identify-codeblocks.py
Last active April 17, 2020 13:27
Helped me to identify 1000 markdown codeblocks in my hugo blog. Syntax Highlighter was quite happy after appliying this!
#!/usr/bin/env python3
import sys
import re
import signal
f = sys.argv[1]
def signal_handler(sig, frame):
@noqqe
noqqe / maxupload.go
Last active April 8, 2020 13:38
Tiny HTTP Server to test MaxUploadSize behind a Loadbalancer
package main
import (
"os"
"fmt"
"bytes"
"log"
"strconv"
"net/http"
)