Skip to content

Instantly share code, notes, and snippets.

View tcnksm's full-sized avatar
☺️
Yo

Taichi Nakashima tcnksm

☺️
Yo
View GitHub Profile
@shrikrishnaholla
shrikrishnaholla / Dockerfile
Last active January 3, 2016 02:09
Dockerfile to set up octopress. Once you spin up the container, you need to continue from http://octopress.org/docs/deploying/. You can either attach to the container, or ssh into it
FROM ubuntu
MAINTAINER shrikrishna <shrikrishna.holla@gmail.com>
# update OS
RUN echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list
RUN apt-get update
RUN apt-get upgrade -y
# Install depndencies
RUN apt-get install -y ruby1.9.1-dev build-essential git openssh-server vim
@FiloSottile
FiloSottile / README.md
Last active July 20, 2016 20:15
Homebrew Formula for musl-based GCC cross-compilers.
@tcnksm
tcnksm / README.md
Last active December 26, 2016 02:15
Best Golang 記事/発表 2016
@felixbuenemann
felixbuenemann / docker.bash
Created May 18, 2013 21:35
docker bash completion
_docker_procs()
{
local procs
procs="$(docker ps -q)"
COMPREPLY=( $(compgen -W "${procs}" -- ${cur}) )
}
_docker_imgs()
{
local repos tags imgs
@nurse
nurse / gist:4324519
Last active February 28, 2018 11:53
ぼくの考えた最強のRuby新機能案

ぼくの考えた最強のRuby新機能案

野心的な新機能案や、互換性等の理由でおよそ採用されないであろう夢を書き連ねています。

Remove Fixnum and Bignum

Fixnum と Bignum を削除して、Integer クラスに統合する。両者は Flonum のように内部的に切り替えられる。

1 / 2 is Rational

Integer#/ の結果を Rational で返すようにする。 https://bugs.ruby-lang.org/issues/5512#change-37021

@defp
defp / avl.go
Created March 3, 2014 15:41
simple avl tree with golang
package main
import (
"fmt"
)
type avlNode struct {
Key int
Height int
Lchild, Rchild *avlNode
@joshuatalb
joshuatalb / ingress.yaml
Created May 16, 2017 16:57
Kubernetes Ingress for Spinnaker
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: spinnaker-ingress
namespace: spinnaker
labels:
k8s-addon: ingress-nginx.addons.k8s.io # change to your nginx controller
annotations:
kubernetes.io/tls-acme: "true" # tells the letsencrypt controller to watch this ingress
spec:
@mitchellh
mitchellh / setup_winrm.txt
Created June 14, 2015 19:31
Packer 0.8 Windows Example on AWS
<powershell>
winrm quickconfig -q
winrm set winrm/config/winrs '@{MaxMemoryPerShellMB="300"}'
winrm set winrm/config '@{MaxTimeoutms="1800000"}'
winrm set winrm/config/service '@{AllowUnencrypted="true"}'
winrm set winrm/config/service/auth '@{Basic="true"}'
netsh advfirewall firewall add rule name="WinRM 5985" protocol=TCP dir=in localport=5985 action=allow
netsh advfirewall firewall add rule name="WinRM 5986" protocol=TCP dir=in localport=5986 action=allow
@martinamps
martinamps / gist:c290bc01454d3c1b8c39
Created November 21, 2015 16:15
Google: The motivation for a monolithic codebase
Rachel Potvin - Engineering Manager
Started career in video game industry.
Company work on multiple games at once
One game per repo
One copy of game engine in each repo + diverge
Features would be wanted between diverged game engines, and the merge conflicts ensue.
@colrichie
colrichie / apalognorm
Last active February 23, 2020 01:56
APALOGNORM is a normalizer for logs of the Apache combined format.For example, the following command give you the referer field.$ apalognorm http-access.log | awk '{print $8}'
#! /bin/sh
######################################################################
#
# APALOGNORM : a normalizer for logs of the Apache combined format
#
# Written by Rich Mikan (richmikan[at]richlab.org) at 2014/01/04
#
# Usage : apalognorm [-s string] <logfile>
# <logfile> should be written with Apache combine format.