Skip to content

Instantly share code, notes, and snippets.

View algas's full-sized avatar

Masahiro Yamauchi algas

View GitHub Profile
@algas
algas / whalebrew.md
Last active March 9, 2017 02:25
My whalebrew packages
@algas
algas / docker-clean.sh
Created October 19, 2016 01:05
Remove docker images named <none>
#!/bin/bash
docker images | awk '$1 ~ "<none>" {print $3}' | while read f; do docker rmi $f; done
@algas
algas / .tmux.conf
Created October 3, 2016 02:56
tmux
## Keybind
unbind-key C-b
set-option -g prefix C-t
bind-key C-t send-prefix
## Window
set-window-option -g mode-keys vi
## Terminal
set-option -g default-terminal "screen-256color"
set-option -g history-limit 10000
set-option -g base-index 1
@algas
algas / SublimeHaskell.sublime-settings
Created February 29, 2016 10:28
SublimeHaskell User Setting
{
"enable_ghc_mod": true,
"auto_complete_imports": true,
"auto_complete_language_pragmas": true,
"enable_auto_build": true,
"auto_run_tests": true,
"enable_auto_check": true,
"enable_auto_lint": true,
"auto_build_mode": "normal",
"show_output_window": true,
@algas
algas / stack.yaml
Last active February 29, 2016 10:09
Stack yaml for SublimeHaskell 20160228
# /Users/YourName/.stack/global-project/stack.yaml
#
# This is the implicit global project's config file, which is only used when
# 'stack' is run outside of a real project. Settings here do _not_ act as
# defaults for all projects. To change stack's default settings, edit
# '/Users/YourName/.stack/config.yaml' instead.
#
# For more information about stack's configuration, see
# https://github.com/commercialhaskell/stack/blob/release/doc/yaml_configuration.md
#
@algas
algas / README.md
Last active August 29, 2015 14:16
Ubuntu 14.04 vagrant configuration

Usage

全面的に書き直した。

  1. git clone git@github.com:dokku-alt/dokku-alt.git
  2. cd dokku-alt
  3. vagrant up
  4. vagrant ssh default
  5. wget https://github.com/(yourname).keys
  6. cat (yourname).keys | while read f; do echo $f | dokku access:add; done
@algas
algas / schema.py
Last active January 21, 2017 21:34
MySQL to BigQuery
#!/usr/bin/env python
import sys
import json
class ColumnInfo(object):
data_types = {
# 'string'
'char':'string',
'character':'string',
@algas
algas / packages.txt
Created October 1, 2014 09:10
pyenv python dependencies for ubuntu/debian
build-essential
zlib1g-dev
libssl-dev
libbz2-dev
libreadline-dev
libsqlite3-dev
llvm
@algas
algas / command.py
Last active August 29, 2015 14:06
Python Subprocess Example
import subprocess
import collections
CommandResponse = collections.namedtuple('CommandResponse', ['code', 'out', 'err'])
def run_command(cmd):
p = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
sout, serr = p.communicate()
return CommandResponse(p.returncode, sout, serr)