Skip to content

Instantly share code, notes, and snippets.

View KernelPanicAUS's full-sized avatar
🎯
Focusing

Thomas Khalil KernelPanicAUS

🎯
Focusing
View GitHub Profile
@KernelPanicAUS
KernelPanicAUS / README.md
Created March 4, 2020 13:51 — forked from mosquito/README.md
Add doker-compose as a systemd unit

Docker compose as a systemd unit

Create file /etc/systemd/system/[email protected]

[Unit]
Description=%i service with docker compose
Requires=docker.service
After=docker.service
@KernelPanicAUS
KernelPanicAUS / dl.py
Created June 16, 2020 11:11
springer-dl
from lxml import html
import requests
import os
root_url = "https://hnarayanan.github.io/springer-books/"
category = "Computer Science"
download_path = f"{os.getcwd()}/downloads/{category.lower().replace(' ', '_')}"
headers = {
"Host": "link.springer.com",
"User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:77.0) Gecko/20100101 Firefox/77.0",
@KernelPanicAUS
KernelPanicAUS / main.tf
Last active July 31, 2020 13:40
Safer handling of resource multiplicity in Terraform
terraform {
required_version = ">= 0.12"
required_providers {
aws = "~> 2.0"
}
}
provider "aws" {
region = "eu-central-1"
@KernelPanicAUS
KernelPanicAUS / bulk-encode.sh
Created March 19, 2024 11:22
Bulk encode MKV files
#!/usr/bin/env bash
trap ctrl_c INT
function ctrl_c() {
echo "** Trapped Ctrl+C **"
exit 0 # Exit the script with exit code 0 (successful termination)
}
input_dir=$1