Skip to content

Instantly share code, notes, and snippets.

View accdias's full-sized avatar

Antonio Dias accdias

View GitHub Profile
@jdoss
jdoss / LUKS_and_TPM2_with_Fedora.md
Last active July 2, 2025 04:13
Decrypt LUKS volumes with a TPM on Fedora Linux

Decrypt LUKS volumes with a TPM on Fedora Linux

This guide allows you to use the TPM on your computer to decrypt your LUKS encrypted volumes. If you are worried about a cold boot attack on your hardware please DO NOT use this guide with your root volume!

Preflight Checks

Verify that you have a TPM in your computer:

# systemd-cryptenroll --tpm2-device=list
PATH DEVICE DRIVER
@opalczynski
opalczynski / main.py
Created October 5, 2021 14:32
Final version of main.py for CLI
import typer
from database import Database
from data import Project, Task
from constants import TaskStatusE
app = typer.Typer()
project_app = typer.Typer()
task_app = typer.Typer()
project_app.add_typer(task_app, name="tasks")
@donly
donly / sh.sh
Last active February 14, 2023 20:38 — forked from scottopell/sh.sh
Embed SRT file into mp4 with ffmpeg
# got this from http://stackoverflow.com/questions/8672809/use-ffmpeg-to-add-text-subtitles
ffmpeg -i infile.mp4 -f srt -i infile.srt -c:v copy -c:a copy -c:s mov_text -metadata:s:s:0 language=chi outfile.mp4
# confirmed working with the following ffmpeg
# (installed using `brew 'ffmpeg', args: ['with-libvorbis', 'with-libvpx']` )
ffmpeg version 4.3.1 Copyright (c) 2000-2020 the FFmpeg developers
built with Apple clang version 12.0.0 (clang-1200.0.32.2)
configuration: --prefix=/usr/local/Cellar/ffmpeg/4.3.1_1 --enable-shared --enable-pthreads --enable-version3 --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libx
@clarkphp
clarkphp / git-use-main.md
Created August 15, 2020 11:01
Use default branch name of "main" instead of "master" in Git repositories

Set default branch name for new repositories to "main"

git version 2.28+

$ git config --global init.defaultBranch main

git version 2.27 or less

@dnbrakk
dnbrakk / about:config.md
Created March 23, 2020 16:08 — forked from MrYar/Firefox-68
Firefox telemetry and spy removal

Firefox telemetry and data collection denial

This is a fork of haasn "Firefox bullshit removal" Also heavily based off pyllyukko "Firefox hardening" https://github.com/pyllyukko/user.js/

This guide has been tested to work on Firefox 68.1.0ESR and will probably work with other versions

Instead of manually editing about:config, make changes to the user.js file

###How to use the user.js file

@stephonchen
stephonchen / Deploy_Oracle_Linux_in_GCE.md
Last active July 15, 2024 10:50
Deploy Oracle Linux in GCE
  • Install Oracle Linux in VirtualBox

  • Before shutdown, be aware to do these things

    • Edit /etc/default/grub
      • Remove splash & quiet & rhgb
      • Add console=ttyS0,38400n8d
    • Update grub
      sudo grub2-mkconfig -o /boot/grub2/grub.cfg
      
@yougg
yougg / proxy.md
Last active May 19, 2025 14:26
complete ways to set http/socks/ssh proxy environment variables

set http or socks proxy environment variables

# set http proxy
export http_proxy=http://PROXYHOST:PROXYPORT

# set http proxy with user and password
export http_proxy=http://USERNAME:PASSWORD@PROXYHOST:PROXYPORT

# set http proxy with user and password (with special characters)
@mcattarinussi
mcattarinussi / gpg-ssh-setup.md
Last active July 3, 2025 09:15
A setup guide to use a personal gpg key for ssh authentication

GPG - SSH setup

Generating the master key

Here we create the master key. We want only Certify capability: we use the master key only to create the subkeys, Sign - Encrypt - Authenticate capabilities will be assigned to the subkeys.

Run the following command to start the master key generation process. Select the set your own capabilities creation process (type 8)

  ▶ gpg --full-generate-key --expert

gpg (GnuPG) 2.2.9; Copyright (C) 2018 Free Software Foundation, Inc.

@thomdixon
thomdixon / ssh_certificate.py
Last active October 14, 2021 10:25
Simple implementation of SSH certificates for Python using Paramiko. Supports serializing from and to Message objects.
from collections import OrderedDict
import paramiko
from paramiko.agent import AgentKey
from paramiko.message import Message
CERT_ATTRIBUTE_TO_TYPE = {
'name': 'string',
'nonce': 'string',
[Unit]
Description=WS02 Identity Server
[Service]
Type=simple
PIDFile=/opt/WSO2/wso2is-5.4.0/wso2carbon.pid
Environment=JAVA_HOME=/usr/java/jdk1.8.0_161
Environment=CARBON_HOME=/opt/WSO2/wso2is-5.4.0
User=wso2
PermissionsStartOnly=true