Skip to content

Instantly share code, notes, and snippets.

🎓
Learning about CS

Birkhoff Lee BirkhoffLee

🎓
Learning about CS
View GitHub Profile
@BirkhoffLee
BirkhoffLee / custom-firewalld.conf
Created May 7, 2020
/etc/fail2ban/action.d/custom-firewalld.conf
View 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 Apr 27, 2020
Install Docker Engine on CentOS 7
View playbook.yml
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 Jan 12, 2020
Birkhoff Lee's PGP key
View pgp.pub
-----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
@BirkhoffLee
BirkhoffLee / README.md
Last active May 27, 2020
zer0zero. CS: GO configuration files
View README.md

zer0zero. CS: GO configuration files

This configuration features:

  • Pro player settings. These are based on former Cloud9 player Shroud's config.
  • Human-readable explanations for every line of commands
  • Gameplay optimizations in technical aspects
    • Minimize shifting when firing the Weapon
    • Disable unnecessary video/audio effects
  • Useful shortcuts:
    • Jump throw: j
View gist:7a2896accf597f5b8d3fde5a37681b86
#!/bin/sh
# install rustc (comes with cargo)
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source $HOME/.cargo/env
yum install llvm
cargo install bat
@BirkhoffLee
BirkhoffLee / gist:b8069b9e689e24d1147863c222a7edf4
Created Nov 23, 2019 — forked from jimbojsb/gist:1630790
Code highlighting for Keynote presentations
View gist:b8069b9e689e24d1147863c222a7edf4

Step 0:

Get Homebrew installed on your mac if you don't already have it

Step 1:

Install highlight. "brew install highlight". (This brings down Lua and Boost as well)

Step 2:

@BirkhoffLee
BirkhoffLee / install.sh
Last active Nov 21, 2019
Install Docker Engine on CentOS 8
View install.sh
#!/bin/sh
# Tested on Vultr as of Nov 21, 2019
groupadd docker
usermod -aG docker birkhoff # add birkhoff to docker group
newgrp docker
yum remove -y docker \
docker-client \
@BirkhoffLee
BirkhoffLee / gist:84fcae9dc0b2095a3a87eedfbedd4ce8
Created Nov 21, 2019
Install Borg & Borgmatic on CentOS 8
View gist:84fcae9dc0b2095a3a87eedfbedd4ce8
# Tested on a Vultr CentOS 8 server. Run with root!
yum install -y openssl-devel gcc-c++ python3-devel libacl-devel
dnf install -y redhat-rpm-config
pip3 install virtualenv
virtualenv --python=python3 borg-env
source borg-env/bin/activate
pip3 install borgbackup
# Borgmatic
@BirkhoffLee
BirkhoffLee / docker-compose.yml
Created Sep 16, 2019
docker-compose Grafana + InfluxDB + collectd with Traefik
View docker-compose.yml
version: '3.2'
services:
collectd:
image: fr3nd/collectd
privileged: true
network_mode: host
volumes:
- /proc:/mnt/proc:ro
- ./collectd.conf:/etc/collectd/collectd.conf
@BirkhoffLee
BirkhoffLee / index.js
Last active Aug 31, 2019
daily RSS feed to mailgun email
View index.js
let d = new Date()
d.setDate(d.getDate() - 1)
const date = d.toISOString().split('T')[0]
const RssToEmail = require('rss-to-email')
const config = {
accentColor: "red",
header: {
link: "",
title: "RSS Feed"
You can’t perform that action at this time.