Skip to content

Instantly share code, notes, and snippets.

@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
@kaleksandrov
kaleksandrov / global-protect.sh
Last active July 15, 2024 11:57
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)
@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"
@stefanbuck
stefanbuck / upload-github-release-asset.sh
Last active November 26, 2023 12:40
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
#!/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
@abdennour
abdennour / README.md
Last active June 19, 2024 10:38
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