Skip to content

Instantly share code, notes, and snippets.


aero aero

  • Seoul, Republic of Korea
View GitHub Profile
lizrice / Vagrantfile
Last active Sep 28, 2020
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 Oct 23, 2020
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 Nov 22, 2020
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 Nov 28, 2020
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:

sebble /
Last active Nov 17, 2020
List all starred repositories of a GitHub user.
STARS=$(curl -sI$USER/starred?per_page=1|egrep '^Link'|egrep -o 'page=[0-9]+'|tail -1|cut -c6-)
echo You have $STARS starred repositories.

FWIW: I'm not the author of the content presented here (which is an outline from Edmond Lau's book). I've just copy-pasted it from somewhere over the Internet, but I cannot remember what exactly the original source is. I was also not able to find the author's name, so I cannot give him/her the proper credits.

Effective Engineer - Notes

What's an Effective Engineer?

natefoo /
Last active Nov 21, 2020
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 Nov 2, 2020
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 Nov 15, 2020
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');
You can’t perform that action at this time.