Skip to content

Instantly share code, notes, and snippets.

View Corfucinas's full-sized avatar
🎯
Focused

Pedro Torres Corfucinas

🎯
Focused
View GitHub Profile
@Corfucinas
Corfucinas / graph_depth_first_search.py
Created December 19, 2020 12:05
dfs on python comparing dict keys as strings
"""Depth-first search implemented in python."""
from collections import defaultdict
from typing import DefaultDict, Dict, List, Union
Raw_data = Dict[str, Dict[str, float]]
Graph = DefaultDict[str, List[str]]
Path = Union[None, List[str]]
@Corfucinas
Corfucinas / neofetch_random_background.sh
Last active May 7, 2021 05:59
random ascii background for neofetch
#!/usr/bin/env bash
set -euo pipefail
IFS=$'\n\t'
# Available distros until version 7.0.0
distro_list=("AIX" "Alpine" "Anarchy" "Android" "Antergos" "antiX" "AOSC"
"Apricity" "ArcoLinux" "ArchBox" "ARCHlabs" "ArchStrike"
"XFerience" "ArchMerge" "Arch" "Artix" "Arya" "Bedrock" "Bitrig"
"BlackArch" "BLAG" "BlankOn" "BlueLight" "bonsai" "BSD"
@Corfucinas
Corfucinas / install-arch.md
Created February 25, 2022 06:52 — forked from mjnaderi/install-arch.md
Install Arch Linux with Full Disk Encryption (LVM on LUKS)
PostgreSQL Type PostgreSQL Size Description Range Diesel Type Rust Type
Nullable Types nullable Nullable``
@Corfucinas
Corfucinas / systemd_service_hardening.md
Created April 24, 2022 08:30 — forked from ageis/systemd_service_hardening.md
Options for hardening systemd service units

security and hardening options for systemd service units

A common and reliable pattern in service unit files is thus:

NoNewPrivileges=yes
PrivateTmp=yes
PrivateDevices=yes
DevicePolicy=closed
ProtectSystem=strict
@Corfucinas
Corfucinas / 2019-https-localhost.md
Created November 8, 2022 09:09 — forked from cecilemuller/2019-https-localhost.md
How to create an HTTPS certificate for localhost domains

How to create an HTTPS certificate for localhost domains

This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.

Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).

@Corfucinas
Corfucinas / backup.md
Created November 9, 2022 03:02 — forked from niklaskeerl/backup.md
Encrypted backup using an external hard drive with luks and timeshift
@Corfucinas
Corfucinas / dkmi_cloudflare_worker.js
Created November 9, 2023 10:06
Cloudflare DKMI (Mailchannels)
// Taken from https://support.mailchannels.com/hc/en-us/articles/7122849237389
// In case you're using Godaddy as a registar
addEventListener("fetch", event => {
event.respondWith(handleRequest(event.request))
})
async function handleRequest(request) {
let themeVariables = {
'--w3m-z-index': 10000,
'--w3m-accent': '',
'--w3m-accent-color': '',
'--w3m-color-mix': '',
'--w3m-color-mix-strength': '',
'--w3m-border-radius-master': '',
'--w3m-font-size-master': '',
'--w3m-font-family': '',
'--w3m-overlay-backdrop-filter': 'blur(6px)'