Skip to content

Instantly share code, notes, and snippets.

View pandruszkow's full-sized avatar

Piotr Andruszkow pandruszkow

View GitHub Profile
@jj1bdx
jj1bdx / sleep5.sh
Created June 2, 2014 04:02
A shell one-liner for an infinite loop (sh/zsh/bash compatible)
while true; do date; sleep 5; done
@yangchenyun
yangchenyun / fetch_kindle.js
Last active July 29, 2026 08:42
Get back my books from Kindle
/*
* @fileoverview Program to free the content in kindle books as plain HTML.
*
* This is largely based on reverse engineering kindle cloud app
* (https://read.amazon.com) to read book data from webSQL.
*
* Access to kindle library is required to download this book.
*/
// The Kindle Compression Module copied from http://read.amazon.com application
@a-raccoon
a-raccoon / radio.m3u
Last active August 1, 2023 04:12
My hodgepodge of News & Talk Radio feed live streams.
#EXTM3U
# filename: radio.m3u
# -------------------
# My Talk/News Live Streaming Radio Playlist
# Get this playlist on your phone! I use VLC
##### https://git.io/vKiO1 ######
# #
# #
# █▀▀▀▀▀█ █▄█ █▄█ ▄ █▀▀▀▀▀█ #
@sebble
sebble / stars.sh
Last active August 3, 2026 01:05
List all starred repositories of a GitHub user.
#!/bin/bash
USER=${1:-sebble}
STARS=$(curl -sI https://api.github.com/users/$USER/starred?per_page=1|egrep '^Link'|egrep -o 'page=[0-9]+'|tail -1|cut -c6-)
PAGES=$((658/100+1))
echo You have $STARS starred repositories.
echo
@MrSimbax
MrSimbax / ffmpeg-cut.sh
Last active December 6, 2021 09:48
This script uses ffmpeg to cut a video without losing much quality
#!/bin/sh
# This script uses ffmpeg to cut a video without losing much quality
me=`basename "$0"`
# Check if necessary parameters were passed
if [ -z "$1" -o -z "$2" -o -z "$3" ]; then
echo "Usage: $me INPUT BEGIN END [OUTPUT=Dropbox]";
exit 0
fi
@reillysiemens
reillysiemens / signing-vbox-kernel-modules.md
Last active August 11, 2026 18:14
Signing VirtualBox Kernel Modules

Signing VirtualBox Kernel Modules

These are the steps I followed enable VirtualBox on my laptop without disabling UEFI Secure Boot. They're nearly identical to the process described on [Øyvind Stegard's blog][blog], save for a few key details. The images here are borrowed from the [Systemtap UEFI Secure Boot Wiki][systemtap].

  1. Install the VirtualBox package (this might be different for your platform).
    src='https://download.virtualbox.org/virtualbox/rpm/fedora/virtualbox.repo'
@ryan-blunden
ryan-blunden / reset_sourcegraph_admin_password.md
Last active February 6, 2025 07:27
Instructions for resetting the Sourcegraph admin password

Presuming you have access to the Sourcegraph Docker container and the container name is sourcegraph:

  1. Get the id for the admin account (should be 1 in most cases):
docker container exec sourcegraph psql -U postgres sourcegraph -c 'SELECT id, username, passwd FROM users'
  1. Set the $ID variable:
Rank Type Prefix/Suffix Length
1 Prefix my+ 2
2 Suffix +online 6
3 Prefix the+ 3
4 Suffix +web 3
5 Suffix +media 5
6 Prefix web+ 3
7 Suffix +world 5
8 Suffix +net 3
9 Prefix go+ 2
@tarruda
tarruda / etc-libvirt-qemu.conf
Created December 8, 2020 09:04
gpu-passthrough-debian-10.xml
# Necessary to prevent random host freeze. For more details, see:
# https://bugs.launchpad.net/ubuntu/+source/qemu/+bug/1849720/comments/65
seccomp_sandbox = 0
@MrSimbax
MrSimbax / ffmpeg-compress.py
Last active November 8, 2024 10:33
A script to convert a video to a desired file size.
#!/usr/bin/env python
# A script to convert a video to a desired filesize.
# Example use case: 8 MB Discord upload limit
# NO WARRANTY
#
# Requirements:
# - Python 3
# - ffmpeg should be in PATH
# - ffmpeg-python