Skip to content

Instantly share code, notes, and snippets.

View tyabu12's full-sized avatar

Tomohito YABU tyabu12

  • Tokyo, Japan
View GitHub Profile
@tyabu12
tyabu12 / Vagrantfile
Last active November 28, 2018 05:47
A Vagrantfile to create Debian stretch with Docker.
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
@tyabu12
tyabu12 / cloudSettings
Last active March 5, 2022 13:56
Visual Studio Code Settings Sync Gist
{"lastUpload":"2022-03-05T13:56:10.268Z","extensionVersion":"v3.4.3"}
@tyabu12
tyabu12 / vlc_gen_thumbnails.sh
Last active December 21, 2018 15:10
Thumbnails generator script using VLC.
#!/bin/bash
VLC="vlc -I dummy"
TARGET_DIR="movies"
THUMBNAIL_DIR="movies/thumbnails"
THUMBNAIL_FMT="jpg"
set -eux
gen_options() {
@tyabu12
tyabu12 / isucon8-qualifier-bench.sh
Last active July 27, 2019 05:21
ISUCON 8予選の vagrant からベンチ投げるスクリプト
#!/bin/bash
# 初回のみ
git clone --depth 1 https://github.com/matsuu/vagrant-isucon
cd vagrant-isucon/isucon8-qualifier
vagrant up bench
# ホストアドレスをカンマ区切りで指定
IMAGE_HOST_IP="XXX.XXX.XXX.XXX,XXX.XXX.XXX.XXX"
import readline
import sqlite3
def print_row(row):
print('(' + ', '.join(str(_) for _ in row) + ')')
conn = sqlite3.connect(':memory:')
c = conn.cursor()
while True: