Skip to content

Instantly share code, notes, and snippets.

View tsub's full-sized avatar

Tsubasa Takayama tsub

View GitHub Profile
@tsub
tsub / sVimrc
Last active September 18, 2015 02:19
map "ctrl+d" scrollPageDown
map "ctrl+b" scrollPageUp
map "h" goBack
map "l" goForward

ccn-router getting started

Host Machine Required

  • Vagrant
  • Virtualbox

VMs

  • of-controller
  • of-switch
    • NODE1-1
#!/bin/bash
set_ovs_settings() {
echo "set ovs settings"
sudo ovs-vsctl set-controller br0 tcp:127.0.0.1:6653
sudo ovs-vsctl set-fail-mode br0 secure
sudo ovs-vsctl set bridge br0 protocols=OpenFlow10
}
@tsub
tsub / 0_reuse_code.js
Created January 26, 2016 07:13
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
function ghq-fzf() {
local selected_dir=$(ghq list | fzf --query="$LBUFFER")
if [ -n "$selected_dir" ]; then
BUFFER="cd $(ghq root)/${selected_dir}"
zle accept-line
fi
zle reset-prompt
}
function history-fzf() {
local tac
if which tac > /dev/null; then
tac="tac"
else
tac="tail -r"
fi
BUFFER=$(history -n 1 | eval $tac | fzf --query "$LBUFFER")
@tsub
tsub / remove-untagged-images-for-ecr
Created August 16, 2017 08:10
Remove untagged images for ECR
#!/bin/sh
set -eu
type aws > /dev/null 2>&1 && type jq > /dev/null 2>&1 || {
echo 'Required aws-cli and jq'
exit 1
}
repositories=$(aws ecr describe-repositories --query 'repositories[*].repositoryName' | tr -d "[\",\t\n\r\"]")
@tsub
tsub / ticker-signal-demo.go
Created September 30, 2017 12:01
demo for using time.Ticker and os.Signal
package main
import (
"fmt"
"os"
"os/signal"
"syscall"
"time"
)
@tsub
tsub / settings.yml
Last active October 11, 2022 08:28
github-nippou settings
format:
subject: ':github: **%{subject}**'
line: '* %{status} [%{title}](%{url}) by :@%{user}:'
dictionary:
status:
merged: ':git-merge:'
closed: ':issue-closed:'

Keybase proof

I hereby claim:

  • I am tsub on github.
  • I am tsub (https://keybase.io/tsub) on keybase.
  • I have a public key ASDvCT32kIM-W-kIJCn5ePMlvGNbd2DASrioCqY5dXQtaQo

To claim this, I am signing this object: