This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import asyncio | |
import os | |
import shutil | |
import subprocess | |
from pathlib import Path | |
# Base configuration | |
LIB_DIRS = ["/lib", "/lib32", "/usr/lib", "/usr/lib32"] | |
BIN_DIRS = [ | |
"/bin", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Likely only works on Linux due to GNU Find, probably needs to be ported for BSD utils | |
OPTIONAL_FIND_ARGS=-xdev # Remove if you don't have slow remote mounts etc. | |
# Start with liblzma | |
LIBS=liblzma.so.5 | |
LIB_DIRS="/usr/lib /lib" | |
BIN_DIRS="/usr/bin /bin /usr/local/bin" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import logging | |
import random | |
import string | |
import sys | |
import traceback | |
from os import environ | |
from loguru import logger |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env sh | |
# | |
# Unattended sync of Mercurial to Git | |
# | |
# You will need to configure GIT_REPO, possibly HG_REPO | |
# If using SSH you will also need to set up the SSH agent + key | |
# | |
# You will also need git-fast-import and git-remote-hg: | |
# https://github.com/felipec/git-remote-hg |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env sh | |
set -exu | |
# Which Git repo to sync with - change this for sure | |
GIT_REPO="git@..." | |
# Paths | |
HG_REPO="$(pwd -P)" # You might need to change this | |
GIT_TMP="/tmp/git-sync-$(date +%s)" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This minimal script seems to reproduce the issue with Rubygems | |
# | |
# It seems Ruby DNS resolver does something odd, as when FREEDOME is on, this | |
# fails with a SocketError, and when FreeDOME is off it fails with a | |
# Resolv::ResolvError. | |
# | |
# This code is built based on Rubygems source code: | |
# https://github.com/rubygems/rubygems/blob/v2.3.0/lib/rubygems/remote_fetcher.rb#L92-L93 | |
# | |
# That code is in the backtrace of `gem install --backtrace jekyll` when this error happens. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html><head><!-- | |
OBS Studio video playback tool. To get video to play automatically, and get audio to stream AND desktop so you can hear it as well. | |
1. Edit the "Configuration" -section below, save this file in the same directory as your video | |
2. Make sure you have the Browser Source installed in your OBS Studio | |
3. Add a new BrowserSource -source to your scene of choice | |
4. Choose "Local File" and point it to this file | |
5. Set width and height to your streaming resolution | |
6. Check "Shutdown when not active" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Calculate required key/password length to achieve satisfactory level | |
# of security. E.g. if you want something to be pretty secure so it can | |
# handle a week of brute forcing by pretty big hash farms. | |
# | |
# License: WTFPL http://www.wtfpl.net/ | |
# | |
# How long do you want the cracking to take | |
TARGET_DURATION = 60 * 60 * 24 * 3 # Seconds |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Temporary directory to work in | |
TMPDIR="$HOME/tmp/djbdns" | |
# Where to install daemontools | |
PACKAGE="/package" | |
# Version numbers for packages | |
UCSPI_VERSION="0.88" |