Skip to content

Instantly share code, notes, and snippets.

@oseme-techguy
oseme-techguy / Correct_GnuPG_Permission.sh
Last active August 14, 2026 01:13
This fixes the " gpg: WARNING: unsafe permissions on homedir '/home/path/to/user/.gnupg' " error while using Gnupg .
#!/usr/bin/env bash
# To fix the " gpg: WARNING: unsafe permissions on homedir '/home/path/to/user/.gnupg' " error
# Make sure that the .gnupg directory and its contents is accessibile by your user.
chown -R $(whoami) ~/.gnupg/
# Also correct the permissions and access rights on the directory
chmod 600 ~/.gnupg/*
chmod 700 ~/.gnupg
@nick3499
nick3499 / convert2nato.py
Last active July 3, 2024 22:43
Translate to NATO Phonetic Alphabet: JavaScript, Python, Ruby
#! /bin/python3
'''Convert letters to NATO phonetic alphabet.'''
_INPUT = input('Enter letters: ')
def convert_nato():
d = {
'A': 'Alpha', 'B': 'Bravo', 'C': 'Charlie',
@jkpark
jkpark / transmission-daemon-settings.json
Last active December 29, 2022 18:09
transmission-daemon-settings.json
{
"alt-speed-down": 50,
"alt-speed-enabled": false,
"alt-speed-time-begin": 540,
"alt-speed-time-day": 127,
"alt-speed-time-enabled": false,
"alt-speed-time-end": 1020,
"alt-speed-up": 50,
"bind-address-ipv4": "0.0.0.0",
"bind-address-ipv6": "::",
@hazel0177
hazel0177 / installArchBios.md
Last active March 31, 2026 18:26
Install Arch Linux on Legacy Bios Systems.

Part 1: Initial Steps

Before you can install Arch Linux, you need to get the ISO from the Arch Linux website. Once you have the ISO from your mirror of choice you should install Rufus (if you're on windows) and use that to copy the ISO to your USB drive. Then boot into the USB drive that you have just put the ISO's files onto (steps vary). Once you've booted in do these commands to ensure the rest will go smoothly.

loadkeys (your locale, google that.)
ping -c 3 google.com
@mutin-sa
mutin-sa / Top_Public_Time_Servers.md
Last active September 22, 2026 07:56
List of Top Public Time Servers

Google Public NTP [AS15169]:

time.google.com

time1.google.com

time2.google.com

time3.google.com

@lofaldli
lofaldli / wav2mmv
Last active December 2, 2024 09:06
convert wave files to custom format used by MMSSTV (http://hamsoft.ca/pages/mmsstv.php)
#!/usr/bin/env bash
[ $# -eq 0 ] && { echo "no inputfile given"; exit 1; }
[ ! -f $1 ] && { echo "file $1 not found"; exit 1; }
printf "\x55\xaa\x00\x00" > /tmp/header.mmv
ffmpeg -ac 1 -ar 11025 -f s16le -acodec pcm_s16le -loglevel quiet -y -i $1 /tmp/data.mmv
cat /tmp/header.mmv /tmp/data.mmv > $1.mmv
@sowbug
sowbug / gist:c7f83140581fbe3e6a9b3ddf24891e77
Last active January 25, 2023 09:22
Making an encrypted DVD image
# All the code from http://billauer.co.il/blog/2010/10/encrypted-iso-dvd-luks-dm-crypt-fedora-linux/
MB_COUNT=100
VOL_NAME=MyVolName
DIR_TO_COPY=/tmp/mydir
# Make a 100MB disk image
dd if=/dev/zero of=disk.img bs=1M count=$MB_COUNT
# become root
@RangelReale
RangelReale / gist:3e6392289d8ba1a52b6e70cdd7e10282
Last active June 22, 2024 23:08
How to compile ffmpeg + x264 using Visual Studio 2015
##### How to compile ffmpeg + x264 using Visual Studio 2015 #####
##### Building this way will make the DLLs compatible with SEH, so there will be no need to use /SAFESEH:NO when compiling your code #####
##### SOURCES:
### https://pracucci.com/compile-ffmpeg-on-windows-with-visual-studio-compiler.html
### https://gist.github.com/sailfish009/8d6761474f87c074703e187a2bc90bbc
### http://roxlu.com/2016/057/compiling-x264-on-windows-with-msvc
* Download "MSYS2 x86_64" from "http://msys2.github.io" and install into "C:\workspace\windows\msys64"
@davydany
davydany / how-to-tmux-background-process.md
Last active July 31, 2026 18:19
Using TMUX for running processes after you log off

How to Run a Process in the Background with TMUX

There are times when you need to log off your Linux Desktop, and you want a process to run in the background. TMUX manages this very well.

For this example, let's suppose you're running a long running task like running rspecs on your project and it is 5pm, and you need to go home.

Run Your Process

@SansGuidon
SansGuidon / gpg cheat sheet.md
Last active November 5, 2023 09:28
GPG Cheat Sheet

Basics

generate key in batch mode using a custom profile

gpg --gen-key --batch gpgspecs

create a file with your fingerprint info and display the related information. A fingerprint is used as a robust key identifier

gpg --fingerprint

Best practices