Skip to content

Instantly share code, notes, and snippets.

@abdennour
abdennour / README.md
Last active November 7, 2024 01:34
Nginx Reverse Proxy for Nexus Docker Registries

Overview

This is a solution of a common problem with Nexus Docker repositories. The administrator has to expose port for "pull", another port for "push", other ports for each hosted repository. This solution is about leveraging Nginx reverse proxy to avoid using these ports.

How it works ?

Given :

  • Nexus hostname is "nexus.example.com"
  • Nexus web port is 8081
#!/bin/bash
# Inspired by https://github.com/oogali/ebs-automatic-nvme-mapping
# Thanks Oogali!
# Tested on Ubuntu 16.04
# To be used with the below udev rule (/etc/udev/rules.d/99-ebs-nvme.rules)
# SUBSYSTEM=="block", KERNEL=="nvme[0-9]*n[0-9]*", ATTRS{model}=="Amazon Elastic Block Store", PROGRAM+="/usr/local/sbin/nvme-mapping.sh /dev/%k" SYMLINK+="%c"
if [[ -x /usr/sbin/nvme ]] && [[ -b ${1} ]]; then
# capture 32 bytes at an offset of 3072 bytes from the raw-binary data
# not all block devices are extracted with /dev/ prefix
@stefanbuck
stefanbuck / upload-github-release-asset.sh
Last active August 27, 2024 08:46
Script to upload a release asset using the GitHub API v3.
#!/usr/bin/env bash
#
# Author: Stefan Buck
# License: MIT
# https://gist.github.com/stefanbuck/ce788fee19ab6eb0b4447a85fc99f447
#
#
# This script accepts the following parameters:
#
# * owner
@steve-jansen
steve-jansen / .vault
Last active June 7, 2024 03:30
HashiCorp Vault Token Helper using the OS X Keychain
token_helper = "/Users/me/.vault-helper"
@kaleksandrov
kaleksandrov / global-protect.sh
Last active November 13, 2024 15:20
Simple script that starts and stops GlobalProtect.app on Mac OSX.
#!/bin/bash
case $# in
0)
echo "Usage: $0 {start|stop}"
exit 1
;;
1)
case $1 in
start)
@marineam
marineam / gist:9914debc25c8d7dc458f
Last active May 21, 2018 12:47
CoreOS dev container

Pending real documentation.... We do have a development container which includes the same toolchain version that was used to build CoreOS but it works under systemd-nspawn, not docker, and isn't documented. But here is a quick guide that may be a useful starting place.

# on coreos
wget http://alpha.release.core-os.net/amd64-usr/current/coreos_developer_container.bin.bz2
bunzip2 coreos_developer_container.bin.bz2
sudo systemd-nspawn -i coreos_developer_container.bin --share-system