Skip to content

Instantly share code, notes, and snippets.

View paigeadelethompson's full-sized avatar
💭
🧫 making stuff

Paige Thompson paigeadelethompson

💭
🧫 making stuff
View GitHub Profile
@paigeadelethompson
paigeadelethompson / server.properties
Last active April 2, 2023 07:41
Minecraft Java Edition v1.19.4
#Minecraft server properties
#Sat Apr 01 19:40:11 UTC 2023
enable-jmx-monitoring=false
rcon.port=25575
level-seed=3735928559
gamemode=survival
enable-command-block=false
enable-query=true
generator-settings={"coordinateScale"\:684.412,"heightScale"\:3211.7324,"lowerLimitScale"\:282.6338,"upperLimitScale"\:36.204224,"depthNoiseScaleX"\:200.0,"depthNoiseScaleZ"\:200.0,"depthNoiseScaleExponent"\:0.99542254,"mainNoiseScaleX"\:247.42958,"mainNoiseScaleY"\:71.40845,"mainNoiseScaleZ"\:177.02113,"baseSize"\:8.5,"stretchY"\:27.821339,"biomeDepthWeight"\:1.0,"biomeDepthOffset"\:0.0,"biomeScaleWeight"\:1.0,"biomeScaleOffset"\:0.0,"seaLevel"\:64,"useCaves"\:true,"useDungeons"\:true,"dungeonChance"\:15,"useStrongholds"\:false,"useVillages"\:true,"useMineShafts"\:true,"useTemples"\:false,"useMonuments"\:false,"useRavines"\:true,"useWaterLakes"\:true,"waterLakeChance"\:50,"useLavaLakes"\:true,"lavaLakeChance"\:80,"useLavaOceans"\:false,"fixedBiome"\:-1,"biomeSize"\:4,"riverSize"\:5,"dirtSize"\:33,"dirtCount"\:10,"dirtMinHei
@paigeadelethompson
paigeadelethompson / 1.nftables.sh
Last active December 31, 2023 18:51
99 handles and iptables aint one
nft flush ruleset
nft add table inet filter
nft add set inet filter icmp_egress_meter4 '{ type ipv4_addr; size 8; flags timeout, dynamic; }'
nft add set inet filter icmp_egress_meter6 '{ type ipv6_addr; size 8; flags timeout, dynamic; }'
nft add map inet filter drop_bogons4 '{ type ipv4_addr : verdict; flags interval; }'
nft add element inet filter drop_bogons4 '{ 224.0.0.0/4 : continue }'
nft add element inet filter drop_bogons4 '{ 192.168.0.0/16 : continue }'
localhost:/home/parallels # evm_kr_id=$(keyctl newring _evm @u)
localhost:/home/parallels # keyctl show
Session Keyring
707671089 --alswrv 1000 100 keyring: _ses
968893873 ---lswrv 1000 65534 \_ keyring: _uid.1000
localhost:/home/parallels # cd /etc/keys
localhost:/etc/keys # ls
ima
localhost:/etc/keys # openssl genrsa -out /etc/keys/privkey.pem 1024
Generating RSA private key, 1024 bit long modulus (2 primes)
# substitute apt or yum or zypper for brew for whichever operating system you're on
brew install tmate
cd ~
git clone https://github.com/tmate-io/tmate-ssh-server.git
cd tmate-ssh-server
@paigeadelethompson
paigeadelethompson / gist:7ecbf0222122408b9250612a38f434f6
Last active January 6, 2023 11:13
phillips hue x, y color changer
import itertools
from phue import Bridge
[setattr(Bridge().groups[-4].lights[0], 'xy', [x, y]) for x, y, brightness, xyz, gamma, original in (lambda gamma,
to_x, to_y, to_z, to_xy, rgb_ranges: ((to_xy(x, y, z), to_xy(y, x, z), y, (x, y, z), gamma_corrected_rgb_values,
orig_rgb_values) for x, y, z, gamma_corrected_rgb_values, orig_rgb_values in ((to_x(r, g, b), to_y(r, g, b),
to_z(r, g, b), (r, g, b), orig_rgb_values) for r, g, b, orig_rgb_values in ((gamma(r), gamma(g), gamma(b),
(r, g, b)) for r, g, b in rgb_ranges))))(gamma = lambda c: (c > 0.04045) and pow((c + 0.055) / (1.0 + 0.055),
2.4) or (c / 12.92), to_x = lambda r, g, b: (r * 0.649926) + (g * 0.103455) + (b * 0.197109),
to_y = lambda r, g, b: (r * 0.234327) + (g * 0.743075) + (b * 0.022598), to_z = lambda r, g,
print("".join([(c % 16 == 0 and "\n{} ".format(d) or " {} ".format(d)) for c, d in zip(range(16 * 16), (lambda l: [(len(list(filter(lambda f: f == b, list(range(25, 31)) + [17, 18, 20, 21, 22, 24, 138, 184, 136, 137, 169, 185, 170]))) >=1 and '{} '.format('#') or '{0:03d}'.format(b)) for b in l])([a for a in list(range(16 * 16))]))]))
@paigeadelethompson
paigeadelethompson / index.html
Last active October 31, 2022 15:35
my css chessboard
<div class="board">
<div class="board-row">
<div class="square black-even">
</div>
<div class="square black-odd">
</div>
<div class="square black-even">