Skip to content

Instantly share code, notes, and snippets.

View crap0101's full-sized avatar

Marco Chieppa crap0101

View GitHub Profile
@oseme-techguy
oseme-techguy / Correct_GnuPG_Permission.sh
Last active November 4, 2024 08:39
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
@crap0101
crap0101 / lazy_set.py
Created February 8, 2011 14:46 — forked from rik0/lazy_set.py
#coding: utf-8
# Copyright (C) 2011 by Enrico Franchi (tweaks by crap0101)
#
# This file is released under the terms of the MIT license
# http://www.opensource.org/licenses/mit-license.php
import itertools as it
import functools
@rik0
rik0 / lazy_set.py
Created February 6, 2011 10:02
Trace of lazy set implementation in Python
# Copyright (C) 2011 by Enrico Franchi
#
# This file is released under the terms of the MIT license
# http://www.opensource.org/licenses/mit-license.php
import itertools as it
def silence_generator_already_executing(generator):
try:
for element in generator: