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
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: https://medium.com/@lizrice/kubernetes-in-vagrant-with-kubeadm-21979ded6c63
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 https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -
cat <<EOF >/etc/apt/sources.list.d/kubernetes.list
@bagder
bagder / trrprefs.md
Last active Jul 31, 2019
This once held TRR prefs. Now it has moved.
View trrprefs.md

NOTE

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
posener / go-shebang-story.md
Last active Oct 11, 2019
Story: Writing Scripts with Go
View go-shebang-story.md

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
BretFisher / docker-for-mac.md
Last active Oct 13, 2019
Getting a Shell in the Docker for Mac Moby VM
View docker-for-mac.md

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: https://github.com/justincormack/nsenter1


@natefoo
natefoo / 00README.md
Last active Sep 3, 2019
Linux Distribution Detection
View 00README.md

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
kamermans / configure_docker0.sh
Last active Oct 15, 2019
Change the IP subnet of Docker's docker0 interface
View configure_docker0.sh
#!/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 192.168.254.1/24:
# {
# "bip": "192.168.254.1/24"
# }
@msoap
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 (
"fmt"
"os"
)
func main() {
fmt.Println("Hello world!")
@kfly8
kfly8 / bbs.pl
Created Feb 28, 2015
Perl入学式 #6 の掲示板の練習問題で、DBに記事を格納する形にしてみる
View bbs.pl
#!/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
dixson3 / workspace.sh
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.
View workspace.sh
#!/bin/bash
# where to store the sparse-image
WORKSPACE=~/Documents/workspace.dmg.sparseimage
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.