Skip to content

Instantly share code, notes, and snippets.

@WoozyMasta
WoozyMasta / create-container-registry-proxies.sh
Last active March 6, 2024 08:11
Create multiplie container registry cache proxies using docker distribution in registry mirror mode
#!/bin/bash
set -eu
# Listen address for all docker.io/registry instances
listen_address=0.0.0.0
# Listen port for the first container
# all subsequent ports for containers will be incremented by one
listen_port_first=5000
insecure=true
@hfs
hfs / git2debchangelog.sh
Created October 12, 2016 09:53
Convert git log into changelog in Debian format
#!/bin/bash
#
# Convert git log into changelog in Debian format
#
# Tags in format 1.2.3-4 become version entries. Log entries between them
# become changelog entries. Merge commits are not excluded, so you probably
# have to clean up the result manually.
RE_VERSION='^v\?[0-9]\+\([.-][0-9]\+\)*'
# Assume the name of the current directory is the package name
@yangacer
yangacer / icu-detect.cpp
Created July 6, 2011 14:11
ICU charset detection
// compile with g++ icu-detect.cpp -I /usr/local/include -L /usr/local/lib -licuuc -licudata -licui18n
#include <cstdio>
#include <string>
#include <cassert>
#include "unicode/ucsdet.h"
#include "unicode/uclean.h"
int main(int argc, char **argv)
{
using namespace std;