Skip to content

Instantly share code, notes, and snippets.

View jasiek's full-sized avatar

Jan Szumiec jasiek

View GitHub Profile
@jasiek
jasiek / docker-compose.yml
Last active February 21, 2025 15:21
Runs pihole with support for private DNS (Android) and DNS-over-HTTPS
version: "3"
# More info at https://github.com/pi-hole/docker-pi-hole/ and https://docs.pi-hole.net/
services:
pihole:
container_name: pihole
image: pihole/pihole:latest
# For DHCP it is recommended to remove these ports and instead add: network_mode: "host"
environment:
TZ: 'Europe/Warsaw'
4859943 "British"
1063401 null
179841 "English"
83582 "Irish"
76441 "Polish"
73856 "Indian"
68676 "Romanian"
58986 "Chinese"
55624 "Italian"
42444 "German"
import os
import shutil
import sys
#
# For each file in a given directory, create a directory with the first letter of the file, and then move the file
# into that directory.
#
def main():
@jasiek
jasiek / dist.py
Last active August 2, 2018 19:35
matches.txt
from Levenshtein import distance, hamming, median
with open("miejscowosci.txt") as f:
lines = f.readlines()
newlines = []
while len(lines) > 0:
line = lines.pop()
newlines.append(line.strip())
newlines = list(set(newlines))
newlines.sort(key=lambda p : distance('Ledionkoi', p))
require 'securerandom'
N = 1_000_000
M = 16
s = Array.new(N) { SecureRandom.hex(M) }
s.sort!
def lcs(a, b)
M.times do |i|
@jasiek
jasiek / todo.txt
Created September 21, 2017 21:11
* Cyfrowy notariusz:
Uprościć podpis elektroniczny w ten sposób, że banki lub ubezpieczyciele (którzy już wykonali
proces KYC w odniesieniu do konkretnej osoby), mogą umożliwać podpisywanie dokumentów on-line.
To radykalnie obniży barierę którą trzeba przeskoczyć aby zacząć korzystać z podpisu elektronicznego.
Banki będą tym zainteresowane ponieważ umożliwa im to wygenerowanie kolejnego strumienia dochodów
z istniejącej bazy klientów.
* Konsolidacja technologiczna centrów danych. Z moich informacji wynika, że Państwo jest w posiadaniu
ogromnej ilości centrów danych, z których wiele nie jest wykorzystywanych. Należy przeprowadzić
inwentaryzację i konsolidację zarówno na poziomie materialnym jak i technologicznym. Niepotrzebne
@jasiek
jasiek / melody_in_c.ly
Last active June 8, 2017 18:47
Melody in C
\language "english"
\version "2.18.2"
\header {
title = "Melody in C"
}
a_upper = \relative c'' {
\clef treble
\key c \major

Keybase proof

I hereby claim:

  • I am jasiek on github.
  • I am jasiek (https://keybase.io/jasiek) on keybase.
  • I have a public key ASAnCMSJ1EGLfS54e39jGTQ1qCNQfWUO0dr4mt2xp0HCqQo

To claim this, I am signing this object:

void setup() {
Serial.begin(9600);
for (int i = 0; i < 14; i++) {
pinMode(i, OUTPUT);
}
}
void loop() {
for (int i = 0; i < 14; i++) {
var refParser = require('json-schema-ref-parser');
const fs = require('fs');
const path = require('path');
const jsonPath = process.argv[2] || './schemas';
const distPath = process.argv[3] || './dist';
const prefix = process.argv[4] || '';
const beautify = require('js-beautify').js_beautify;
fs.readdir(jsonPath, (err, filenames) => {
if (err) {