Skip to content

Instantly share code, notes, and snippets.

View pinebright's full-sized avatar

Kosuke MATSUOKA pinebright

View GitHub Profile
@pinebright
pinebright / mkdebian.sh
Last active September 16, 2019 16:43
debian化
#!/bin/sh
device=/dev/$(lsblk -lno NAME | sed '/2/!d')
targetdir=/mnt/sdcard
# mirror=http://ftp.uni-stuttgrat.de/debian
distro=jessie
rootfsdir=/tmp/rootfs
hostname=debian
@pinebright
pinebright / dd-info.sh
Last active November 13, 2017 12:32
定期的にddに進捗を表示させる
# ddとは別ターミナルで
sudo watch -n 60 "pkill -USR1 dd"
@pinebright
pinebright / Vagrantfile
Last active May 29, 2017 23:43
docker & docker-compose always new version
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
# Every Vagrant development environment requires a box. You can search for
# boxes at https://atlas.hashicorp.com/search.
config.vm.box = "ubuntu/trusty64"
# Create a forwarded port mapping which allows access to a specific port
# within the machine from a port on the host machine. In the example below,
@pinebright
pinebright / Vagrantfile
Created May 26, 2017 09:58
Simple Vagrantfile for Node.js app
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
# Every Vagrant development environment requires a box. You can search for
# boxes at https://atlas.hashicorp.com/search.
config.vm.box = "ubuntu/trusty64"
# Create a private network, which allows host-only access to the machine
# using a specific IP.
@pinebright
pinebright / .editorconfig
Created December 2, 2016 06:03
よく使うEditorConfig
# EditorConfig is awesome: http://EditorConfig.org
# top-most EditorConfig file
root = true
# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
trim_trailing_whitespace = true
insert_final_newline = true
@pinebright
pinebright / elapsed_time.py
Created November 8, 2016 04:41
measuring elapsed time in Python
#!/usr/bin/env python
# -*- coding: utf-8 -*-
__author__ = 'Kosuke MATSUOKA <pine.for.works@outlook.com>'
def elapsed_time(func):
def wrapper(*args, **kwargs):
import time