Skip to content

Instantly share code, notes, and snippets.

View StefanScherer's full-sized avatar
🌍

Stefan Scherer StefanScherer

🌍
View GitHub Profile
@AlexZeitler
AlexZeitler / command.sh
Last active September 15, 2016 19:55
Removing big files from Git repository history in a batch
# CREATE A BACKUP FIRST!
# Then find the oldest commit containing the unwanted files
# ./replace.sh <PathToFileContainingTheBigFilesToRemove> <OldestCommitSHA>
cd /path/to/your/git/repository
./replace.sh files.txt 9e5bc93
@ryanmaclean
ryanmaclean / promiscous_enable.sh
Last active July 18, 2024 14:58
Allow VMWare Fusion Promiscuous Mode on macOS Sierra
#!/bin/bash
sudo touch "/Library/Preferences/VMware Fusion/promiscAuthorized"
@DieterReuter
DieterReuter / compile-docker-1.12.0-on-arm.sh
Last active August 6, 2016 15:38
Upgrade HypriotOS 0.8.3 with Docker 1.12.0 and compile Docker 1.12.0 (plus ARM patch)
#!/bin/bash
set -e
set -x
if [ ! -f ~/docker-engine_1.12.0-0~jessie_armhf-armv6.deb ]; then
echo "...ERROR:"
echo " Package ~/docker-engine_1.12.0-0~jessie_armhf-armv6.deb missing"
exit 1
fi
@ericclemmons
ericclemmons / example.md
Last active September 20, 2024 12:46
HTML5 <details> in GitHub

Using <details> in GitHub

Suppose you're opening an issue and there's a lot noisey logs that may be useful.

Rather than wrecking readability, wrap it in a <details> tag!

<details>
 Summary Goes Here
Install-Module -Name xPSDesiredStateConfiguration -Force
[DscLocalConfigurationManager()]
configuration LCM {
Settings {
RebootNodeIfNeeded = $true
ActionAfterReboot = 'ContinueConfiguration'
}
}
@arun-gupta
arun-gupta / gist:c42cacfa3225727f5c71ff4a5dc547dc
Created April 20, 2016 21:46
Create Docker Swarm Cluster
# Docker Machine for Consul
docker-machine \
create \
-d virtualbox \
consul-machine
# Start Consul
docker $(docker-machine config consul-machine) run -d --restart=always \
-p "8500:8500" \
-h "consul" \
#!/bin/bash
set -e
# Send a private message to someone on slack
# from the command line.
# Print a usage message and exit.
usage(){
local name=$(basename "$0")
@dmansfield
dmansfield / http_client_spnego.js
Created August 7, 2015 13:27
Node.js HTTP client with kerberos/gssapi/negotiate/spnego authentication
//
// tested with kerberos 0.0.12 on linux against apache running mod_auth_kerb with Samba AD providing KDC
//
var Kerberos = require('kerberos').Kerberos;
var kerberos = new Kerberos();
var http = require('http');
function httpget(opts, callback) {
console.log('submitting to '+(opts.hostname||opts.host)+' with authorization header: '+(opts.headers||{}).authorization);
var req = http.get(opts, function(res) {
@oscarrenalias
oscarrenalias / README.md
Last active September 27, 2020 18:46
Docker service discovery with HAproxy, consul and registrator on Docker Machine and Docker Swarm