Skip to content

Instantly share code, notes, and snippets.

View superbrothers's full-sized avatar
🌏
Working from the earth

Kazuki Suda superbrothers

🌏
Working from the earth
View GitHub Profile
@superbrothers
superbrothers / assign-priority-attendees.js
Last active October 3, 2017 06:31
Assign priority attendees on connpass
var ids = "ian,superbrothers"; // comma-separated list of connpass ids
ids.split(",").forEach(function (id) {
var href = "/user/" + id + "/";
var node = document.querySelector('td.name a[href="' + href + '"]');
if (node === null) {
console.error(id);
return;
};
#!/usr/bin/env bash
set -e
function minikube_dnsmasq_macos() {
local ip
case $1 in
start)
command minikube "$@"
@media (min-width: 1200px) {
.sharedHeader_inner,
.teamSubHeader_inner,
.teamMain_inner {
width: 100% !important;
}
.teamSidebarContainer_main {
width: 75% !important;
}
.teamSidebarContainer_sub {
#!/usr/bin/env bash
set -e
tempfile="$(mktemp)"
trap "rm -rf $tempfile" EXIT
dd if=/dev/zero of=$tempfile bs=1M count=1
start="$(date +%s%N)"
apiVersion: v1
kind: Service
metadata:
name: default-http-backend
namespace: kube-system
labels:
k8s-app: default-http-backend
spec:
selector:
k8s-app: default-http-backend
setopt prompt_subst
FOUND_KUBECTL=0
if which kubectl >/dev/null 2>&1; then
FOUND_KUBECTL=1
fi
function kubernetes_current_context() {
local context="$(kubectl config current-context)"
[ $? -eq 0 ] && echo "$context" || echo "no context"
let g:lightline = {
\ 'colorscheme': 'jellybeans',
\ 'mode_map': { 'c': 'NORMAL' },
\ 'active': {
\ 'left': [ [ 'mode', 'paste' ], [ 'fugitive', 'gitgutter', 'filename' ], [ 'go' ] ]
\ },
\ 'component': {
\ 'go': '%#goStatuslineColor#%{LightLineGo()}%*',
\ },
\ 'component_function': {
#!/usr/bin/env bash
set -e
ruby -rjson -ryaml -e "puts JSON.dump YAML.load STDIN" | jq $@
# vim: set ft=sh :
@superbrothers
superbrothers / main.go
Created September 8, 2016 02:42
http request with context in Go
package main
import (
"context"
"fmt"
"log"
"net/http"
"time"
)
@superbrothers
superbrothers / dockertoolbox.rb
Last active April 14, 2016 02:25
Caskfile for dockertoolbox 1.11.0
cask 'dockertoolbox' do
version '1.11.0'
sha256 'be1629bfec6854cf170f0e635858661105d8e0bb1f7656ac510676f5fcc82897'
# github.com/docker/toolbox was verified as official when first introduced to the cask
url "https://github.com/docker/toolbox/releases/download/v#{version}/DockerToolbox-#{version}.pkg"
appcast 'https://github.com/docker/toolbox/releases.atom',
checkpoint: '12d86cd293f7dba682b15ead4d2529cc5fe159ba8e751386559795e5efa88efd'
name 'Docker Toolbox'
homepage 'https://www.docker.com/toolbox'