Skip to content

Instantly share code, notes, and snippets.

aero aero

  • Seoul, Republic of Korea
Block or report user

Report or block aero

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
lizrice / Vagrantfile
Last active Oct 14, 2019
Vagrant file for setting up a single-node Kubernetes cluster that I can access from my desktop. Read more:
View Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
# This script to install Kubernetes will get executed after we have provisioned the box
$script = <<-SCRIPT
# Install kubernetes
apt-get update && apt-get install -y apt-transport-https
curl -s | apt-key add -
cat <<EOF >/etc/apt/sources.list.d/kubernetes.list
bagder /
Last active Jul 31, 2019
This once held TRR prefs. Now it has moved.


This content has moved.

Please go to bagder/TRRprefs for the current incarnation of the docs, and please help us out polish and maintain this documentation!

posener /
Last active Oct 11, 2019
Story: Writing Scripts with Go

Story: Writing Scripts with Go

This is a story about how I tried to use Go for scripting. In this story, I’ll discuss the need for a Go script, how we would expect it to behave and the possible implementations; During the discussion I’ll deep dive to scripts, shells, and shebangs. Finally, we’ll discuss solutions that will make Go scripts work.

Why Go is good for scripting?

While python and bash are popular scripting languages, C, C++ and Java are not used for scripts at all, and some languages are somewhere in between.

BretFisher /
Last active Oct 13, 2019
Getting a Shell in the Docker for Mac Moby VM

2018 Update: Easiest option is Justin's repo and image

Just run this from your Mac terminal and it'll drop you in a container with full permissions on the Moby VM. This also works for Docker for Windows for getting in Moby Linux VM (doesn't work for Windows Containers).

docker run -it --rm --privileged --pid=host justincormack/nsenter1

more info:

natefoo /
Last active Sep 3, 2019
Linux Distribution Detection

Distribution Detection

I am working on adding support for building and distributing (via PyPI) Python Wheels with C Extensions to the Python wheel and pip packages. The discussion on Distutils-SIG continues, but I believe it is fairly certain that some effort to correctly identify Linux distributions will need to be made. I've begun efforts to add this support to wheel.

How you can help

If you have a Linux distribution or version of a listed distribution not in this gist, or one of the ones I have not directly verified, I could use the following:

  • The contents of /etc/os-release, if it exists
kamermans /
Last active Oct 15, 2019
Change the IP subnet of Docker's docker0 interface
#!/bin/sh -e
# NOTE: Since Docker 1.10 (February 4, 2016), it has been possible to configure the
# Docker daemon using a JSON config file. On Linux, this file is normally located at
# /etc/docker/daemon.json. You should use this JSON config method if you are running
# a version of Docker that is at least 1.10!
# Here is an example configuration that sets the docker0 bridge IP to
# {
# "bip": ""
# }
msoap / script.go
Last active Sep 18, 2018
Run Go program as script
View script.go
//usr/bin/env go run $0 "$@"; exit
package main
import (
func main() {
fmt.Println("Hello world!")
kfly8 /
Created Feb 28, 2015
Perl入学式 #6 の掲示板の練習問題で、DBに記事を格納する形にしてみる
#!/usr/bin/env perl
use Mojolicious::Lite;
use DBIx::Sunny;
app->attr(dbh => sub { DBIx::Sunny->connect('dbi:mysql:dbname=bbs', 'root','') });
get '/' => sub {
my $c = shift;
my $entries = app->dbh->select_all('SELECT * FROM entry');
View activate
export GOPATH="$(builtin cd "$(dirname "${BASH_SOURCE[0]:-$_}" )" && pwd)"
export OLDPS1=$PS1
export PS1="[go:$(basename $GOPATH)] $PS1"
alias gcd="cd $GOPATH"
deactivate() {
export PS1=$OLDPS1
unset GOPATH
unset OLDPS1
unalias gcd
unset deactivate
dixson3 /
Created Jan 10, 2014
Create and manage a case-sensitive disk-image on OSX. This is great when you have a need to work with case-sensitive repos on a mac.
# where to store the sparse-image
create() {
hdiutil create -type SPARSE -fs 'Case-sensitive Journaled HFS+' -size 60g -volname workspace ${WORKSPACE}
detach() {
You can’t perform that action at this time.