Skip to content

Instantly share code, notes, and snippets.

View morikat's full-sized avatar

Takeshi Morikawa morikat

View GitHub Profile
@morikat
morikat / _docker-migrate-aufs.md
Created February 12, 2023 08:40 — forked from marcelrv/_docker-migrate-aufs.md
Docker migrate to overlay2 from aufs script

Docker migrate to overlay2 from aufs script

Crazy that this is pretty much forced change without proper transition script

note. Based on https://www.sylvaincoudeville.fr/2019/12/docker-migrer-le-stockage-aufs-vers-overlay2/ NOT WORKING!!!! IF FOLLOWING THE ABOVE.. SOMEHOW THE CONTAINERS DO NOT RE-APPEAR!

The only way I found that is somewhat automated is the the docker-compose way..

Which is still not 100% and require manual fixing of stupid errors of the docker-compose tool (mainly things that ere not interpreted right, like dates & userIds that need to manually surrounded by quotes etc)

@morikat
morikat / twitch_past_broadcast_downloader.py
Created January 4, 2018 23:38 — forked from baderj/twitch_past_broadcast_downloader.py
script to download past broadcasts from twitch.tv
import requests
import sys
import json
import re
import os
import string
import argparse
BASE_URL = 'https://api.twitch.tv'
@morikat
morikat / babun-install.rst
Created December 16, 2016 11:35 — forked from jhermann/babun-install.rst
Babun install

Babun Setup for Python Developers

Babun is “A Windows shell you will love!”

It's a turn-key CygWin distribution for developers and is very easy to install and maintain. For a Python developer, Babun allows working in an almost-POSIX environment – with some limitation, of course. This causes less friction when handling FOSS projects that are often biased towards a standard Linux environment, e.g. by using shell scripts for boot-strapping and things like that.

@morikat
morikat / bosh-lite-pptp.md
Last active August 29, 2015 14:26
An example of how to access the websocket app running on another host bosh-lite

An example of how to access the websocket app running on another host bosh-lite

Setting bosh-lite machine

Install pptpd

$ sudo apt-get install pptpd
@morikat
morikat / file0.txt
Last active August 29, 2015 14:18
Cloudn PaaS v2(CloudFoundry)の Service(PostgreSQL & MySQL)に接続 ref: http://qiita.com/morikat/items/5c777708de4f4b272435
cf create-service postgresql default pg-instance
or
cf create-service mysql default mysql-instance
@morikat
morikat / decrypt.rb
Last active October 7, 2017 01:08 — forked from refractalize/decrypt.rb
def read_m3u8(m3u8)
File.open(m3u8, 'r') do |file|
keyfile = nil
iv = 0
file.each_line do |line|
line.chomp!
if line =~ /^#EXT-X-KEY:METHOD=AES-128,URI="(.*?)"(,IV=0x(.*))?/
keyfile = $1
if $2
iv = $3

Docker 虎の巻

何故Dockerを使うべきか

Why Should I Care (For Developers)

"Dockerが面白いのはシンプルな環境に隔離性と再現性をもたらしてくれることだ.ランタイムの環境を一度作れば、パッケージにして別のマシンでも再利用することできる.さらに,すべてはホスト内の隔離された環境で行われる(VMのように).最も素晴らしい点は,シンプルかつ高速であることだ."