Skip to content

Instantly share code, notes, and snippets.

@nikhilCad
nikhilCad / parser.py
Created July 22, 2023 05:19
Exporting JSON Newpipe Subscriptions to OPML for RSS Readers
import json
f = open('Your_Newpipe_subscription_export.json')
data = json.load(f)#dict
f.close()
@Jacke
Jacke / Correct_GnuPG_Permission.sh
Created April 22, 2022 08:11 — forked from oseme-techguy/Correct_GnuPG_Permission.sh
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
@mitchellkrogza
mitchellkrogza / generate-webp-images
Created August 16, 2021 12:07
Generate webp images from png and jpg files recursively in any web folder (uses webp command line tool)
#!/bin/bash
# ---------------------------------------------------------------------------
# Generate WebP Images - Uses cwebp command line tool for Linux
# This will generate / re-generate all webp images for all JPG and PNG files
# Being command line based it is incredibly fast
# If you don't want to re-generate existing files set generateall=0
# If you want to re-generate everything set generateall=1
# USE this script at your own risk and Only if you know what you are doing
# Written by Mitchell Krog - mitchellkrog@gmail.com
@pocc
pocc / png_to_webp.sh
Last active November 9, 2023 14:03
Convert all png images to webp recursively
#!/usr/bin/env bash
# This script will get a list of all jpg and png files recursively
# and convert them all in place to webp files.
# cwebp options for max compression: `-m 6 -q 100 -z 9`
shopt -s globstar
for image in $PWD/**/*.png; do
echo "File is $image"
outfile=${image::-4}.webp
echo "outfile is $outfile"
@beeman
beeman / remove-all-from-docker.sh
Created November 15, 2016 03:04
Remove all from Docker
# Stop all containers
docker stop `docker ps -qa`
# Remove all containers
docker rm `docker ps -qa`
# Remove all images
docker rmi -f `docker images -qa `
# Remove all volumes

Contributing

When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.

Please note we have a code of conduct, please follow it in all your interactions with the project.

Pull Request Process

  1. Ensure any install or build dependencies are removed before the end of the layer when doing a
@myusuf3
myusuf3 / uninstall.sh
Created April 21, 2011 03:06
how to cleanly uninstall python packages installed with python setup.py
# Next time you need to install something with python setup.py -- which should be never but things happen.
python setup.py install --record files.txt
# This will cause all the installed files to be printed to that directory.
# Then when you want to uninstall it simply run; be careful with the 'sudo'
cat files.txt | xargs sudo rm -rf