Skip to content

Instantly share code, notes, and snippets.

View stefan2904's full-sized avatar
🚲
¯\_(ツ)_/¯

Stefan stefan2904

🚲
¯\_(ツ)_/¯
View GitHub Profile
@stefan2904
stefan2904 / demo.php
Created June 23, 2021 16:23
PHP: Check if property exists in decoded JSON (using strict types)
<?php declare(strict_types=1);
$json = '{"a":1,"b":2,"c":3,"d":4,"e":5}';
$j = json_decode($json);
var_dump($j);
var_dump($j->a == NULL);
@stefan2904
stefan2904 / courses.csv
Last active June 1, 2021 12:34
TU Graz courses (study year 2020/21)
We can't make this file beautiful and searchable because it's too large.
id,title,other_uni
BEA.01001PH,"Ästhetik, Kunst und visuelle Kultur (STEOP)",PH_Stmk
BEA.02001PI,Introduction to the subject specific professional field of ARTS Education,PPH_Graz
BEA.03001PH,Grundlagen bildnerischen Gestaltens I,PH_Stmk
BEA.04001PH,Wahrnehmungspsychologie,PH_Stmk
BEA.05001PH,Grundlagen der Fachdidaktik,PH_Stmk
BEA.06001PH,Grundlagen bildnerischen Gestaltens II,PH_Stmk
BEA.07115UB,Introduction to Iconography,Uni Graz
BEB.01001PH,Grafik I,PH_Stmk
BEB.02001PI,Painting I,PPH_Graz
@stefan2904
stefan2904 / studies.csv
Last active May 20, 2021 14:03
TU Graz Study Programme
study programme number study programme name study programme type
221 Geodesy Bachelor programme
211 Information and Computer Engineering Bachelor programme
243 Architecture Bachelor programme
253 Biomedical Engineering Bachelor programme
273 Chemical and Process Engineering Bachelor programme
662 Chemistry Bachelor programme
264 Civil Engineering Sciences and Construction Management Bachelor programme
521 Computer Science Bachelor programme
235 Electrical Engineering Bachelor programme
@stefan2904
stefan2904 / u2f_demo.py
Created January 18, 2021 14:37
U2F Host Demo (in Python)
from u2flib_host import u2f, exc
from u2flib_host.utils import websafe_encode, websafe_decode
from u2flib_host.register import register
from u2flib_host.authenticate import authenticate
import json
import struct
import base64
# Using https://github.com/Yubico/python-u2flib-host
# See also: https://webauthn.guide/#webauthn-api
@stefan2904
stefan2904 / filtered.csv
Last active January 6, 2021 02:34
interesting HTTPS cert fingerprints for alexia's top 1m (not complete!). to verify open https://<domain>
id webpage fingerprint
8 qq.com 5F:8D:A5:E4:8C:A7:85:A0:DE:75:70:EF:2D:28:DD:B3:3A:7F:9A:08:07:BA:EE:92:FA:7F:D1:F6:CA:EA:2E:5E
88 go.com AC:65:50:8A:B6:0C:2E:81:B2:6E:63:26:77:66:6D:5D:7F:13:8E:EB:8F:09:C8:9C:AA:65:4B:94:94:7A:11:F7
103 haosou.com 43:6E:91:11:E7:B1:0E:4B:3B:16:76:6B:48:A5:09:BB:6A:0C:A7:BA:B2:F6:51:88:9B:0C:21:A7:1E:17:C1:58
122 bilibili.com 38:E5:3D:9C:C3:9D:74:50:B2:53:2D:B7:EC:A6:91:10:EA:54:9D:63:B7:27:FC:34:ED:3C:5E:3B:4B:E0:65:CD
142 ettoday.net 5D:F8:67:7F:79:A1:41:A2:EE:E5:7B:F7:CA:56:E7:57:0C:B3:B3:B6:57:14:37:D2:06:8B:BB:09:FD:D7:81:15
183 onlinesbi.com 2D:A2:4A:89:DF:DE:4D:E3:35:6A:98:BD:25:0C:E1:DC:33:A3:6F:E1:9A:4D:CF:40:A8:B6:1D:32:4B:DF:3D:69
198 steampowered.com 33:BF:9A:05:6A:3A:5D:3D:AA:9A:10:25:56:E5:55:E3:70:49:A8:79:29:6F:D9:11:BD:89:23:15:C6:B2:22:7F
204 iqiyi.com 04:D9:4F:86:51:D3:17:74:22:33:B4:01:A4:CE:F3:B7:B5:9D:5E:00:70:0C:19:10:19:BD:8D:D7:42:74:DB:E7
215 rdsa2012.com AE:4A:10:2F:29:84:33:69:C6:2A:33:FF:6B:D2:96:BE:EF:82:69:8F:BF:91:4C:3E:B5:8B:CD:D3:D8:A3:75:89
@stefan2904
stefan2904 / export.sh
Last active October 23, 2020 13:30
draw.io / diagrams.net batch exporter
#!/bin/bash
# Get desktop-app (which includes CLI) from http://get.diagrams.net
NUM_PAGES=4
DRAWIO_FILE="cdn-setup1"
#set -o xtrace
for ((page=0; page<NUM_PAGES; page++))
@stefan2904
stefan2904 / VerrStorage.sol
Last active August 11, 2020 12:53
Some demo Smart Contract (deploy via https://remix.ethereum.org)
pragma solidity >=0.4.22 <0.7.0;
/**
* @title VerrStorage
* @dev Store & retreive value in a variable
*/
contract VerrStorage {
address payable public owner = msg.sender;
uint public creationTime = block.timestamp;
@stefan2904
stefan2904 / .i3blocks.conf
Last active March 27, 2020 22:17
i3-gnome-pomodoro snippet for i3blocks
[pomodoro]
command=~/.i3/i3blocks/pomodoro.sh $BLOCK_BUTTON
interval=1