Skip to content

Instantly share code, notes, and snippets.

View b3z's full-sized avatar
🚿
showering

b3z

🚿
showering
  • 06:07 (UTC +01:00)
View GitHub Profile
@b3z
b3z / pyny.py
Last active February 1, 2021 11:36
Tiny Python Webserver
#!/usr/bin/env python3
# A tiny webserver in python
# ready to run!
import os
import configparser
import socket
@b3z
b3z / lineGenerator.py
Created July 30, 2020 10:20
Me trying to generate word lines for Discoed categories. I didn't succeed.
import sys
from fontTools.ttLib import TTFont
from fontTools.ttLib.tables._c_m_a_p import CmapSubtable
font = TTFont('whitney.ttf')
cmap = font['cmap']
t = cmap.getcmap(3,1).cmap
s = font.getGlyphSet()
units_per_em = font['head'].unitsPerEm
@b3z
b3z / DrStrange.java
Created March 2, 2020 09:11
Yep, that one DrStrange gist.
import java.util.ArrayList;
import java.util.List;
class DrStrange {
private static List<Integer> numbers;
public DrStrange() {
numbers = new ArrayList<>(); }
@b3z
b3z / pouchdbBenchmark.ts
Created February 25, 2020 09:43
A little benchmark for typescript pouchdb. Hell it is fast.
//import PouchDB from 'pouchdb';
var PouchDB = require('pouchdb');
PouchDB.plugin(require('pouchdb-quick-search'));
class Database {
db: any;
constructor(databaseName: string) {
this.db = new PouchDB(databaseName);
@b3z
b3z / theme.css
Created February 10, 2020 21:32
Yet another goes dark theme
.full {
background: #2E313E
}
.hljs {
display: block;
overflow-x: auto;
padding: 0.5em;
background-color: #2b2b2b !important;
@b3z
b3z / gogsDownloader.sh
Created February 8, 2020 12:52
Download Gogs via command line.
curl -s https://api.github.com/repos/gogs/gogs/releases/latest \
| grep "linux_amd64.*zip" \
| cut -d : -f 2,3 \
| tr -d \" \
| wget -qi -