Skip to content

Instantly share code, notes, and snippets.

View jkjuopperi's full-sized avatar

Juho Juopperi jkjuopperi

View GitHub Profile
(ns puzzle
(:require [clojure.set :refer [union intersection difference]]))
(def initial-world
"The initial puzzle world is a structure with
three slots, :a, :b and :c. These are sets that start
with all possible numbers from 0 to 9."
{:a #{0 1 2 3 4 5 6 7 8 9}
:b #{0 1 2 3 4 5 6 7 8 9}
:c #{0 1 2 3 4 5 6 7 8 9}})
# 5 GHz channel list with 40 MHz channels
# - 12 unique 40 MHz channel names. The AP can select either of the 20 MHz subchannels depending on which one has room.
# e.g. selecting "ch42@80MHz/ch38@40MHz" let's the AP select 5180 or 5200 as base channel.
# - The channel names have the 80 MHz channels mentioned so try to split the used channels
# to difference 80 MHz channels if you want AC devices to benefit from 80 MHz.
# Set /caps-man configuration ... hw-protection-mode=rts-cts to ensure per packet bandwith
# selection works on AC.
/caps-man channel
add band=5ghz-onlyac control-channel-width=20mhz extension-channel=Ceee frequency=5180 name=ch42@80MHz/ch38@40MHz
@jkjuopperi
jkjuopperi / gist:d33b1fba482ab4f05e0bceab08aa3064
Created December 23, 2018 03:00
MikroTik wlan5ghz wireless settings
country=finland
distance=indoors
band=5ghz-n/ac
channel-width=20/40/80mhz-XXXX
scan-list=5GHz/80MHz
frequency=auto
rate-set=configured
@jkjuopperi
jkjuopperi / gist:e2fefa48c79bafb59b23ffefa8384bb3
Last active March 7, 2024 10:24
MikroTik wireless channels
/interface wireless channels
add band=2ghz-b/g/n width=20 list=2GHz/20MHz frequency=2412 name=ch1
add band=2ghz-b/g/n width=20 list=2GHz/20MHz frequency=2437 name=ch6
add band=2ghz-b/g/n width=20 list=2GHz/20MHz frequency=2462 name=ch11
add band=5ghz-onlyac width=20 list=5GHz/80MHz extension-channel=Ceee frequency=5180 name=ch36/38/42
add band=5ghz-onlyac width=20 list=5GHz/80MHz extension-channel=eCee frequency=5200 name=ch40/38/42
add band=5ghz-onlyac width=20 list=5GHz/80MHz extension-channel=eeCe frequency=5220 name=ch44/46/42
add band=5ghz-onlyac width=20 list=5GHz/80MHz extension-channel=eeeC frequency=5240 name=ch48/46/42
@jkjuopperi
jkjuopperi / pubclip
Created August 15, 2015 09:09
Show my SSH public key and copy it into clipboard on Mac
#!/bin/sh
cat ~/.ssh/id_rsa.pub
cat ~/.ssh/id_rsa.pub |pbcopy
echo "# Public key copied to clipboard" >&2
Features for eth0:
rx-checksumming: off
tx-checksumming: on
tx-checksum-ipv4: off [fixed]
tx-checksum-unneeded: off [fixed]
tx-checksum-ip-generic: on
tx-checksum-ipv6: off [fixed]
tx-checksum-fcoe-crc: off [fixed]
tx-checksum-sctp: off [fixed]
scatter-gather: on
@jkjuopperi
jkjuopperi / proxycache.py
Created October 16, 2014 16:19
nginx proxy cache listing and purging tool in python
#!/usr/bin/env python
from __future__ import print_function
import os
import sys
from collections import namedtuple
CacheFile = namedtuple('CacheFile', ['path', 'key'])
def read_cache_file(path):
with open(path, 'r') as f:
f.seek(0x28) # skip header
key_magic = f.read(6)

Keybase proof

I hereby claim:

  • I am jkjuopperi on github.
  • I am jkj (https://keybase.io/jkj) on keybase.
  • I have a public key whose fingerprint is 4882 4DFF 4E9B A496 AFD2 1AD1 C8D9 8F8A 4AE1 6F9D

To claim this, I am signing this object: