Skip to content

Instantly share code, notes, and snippets.

-- testing with a table "foo" like following
--
-- start_ymd |end_ymd |val
-- ----------+----------+---
-- 2019-12-01|2020-02-29|bar
-- 2020-03-01|2020-05-31|qux
--
-- to convert it like
--
-- 201912|bar
@tatsushid
tatsushid / mkimage-yum.sh
Created September 30, 2014 11:27
Script for building CentOS 3 i386 docker image
#!/usr/bin/env bash
#
# Create a base CentOS 3 Docker image.
#
# This script is useful on systems with yum installed (e.g., building
# a CentOS 3 image on CentOS 3). It is taken from
# https://github.com/docker/docker/blob/master/contrib/mkimage-yum.sh
# and modified for CentOS 3
usage() {
@tatsushid
tatsushid / gist:6780346
Created October 1, 2013 15:33
Amon2 BBS example (http://amon.64p.org/bbs_tutorial.html) Teng schema
package MyApp::DB::Schema;
use strict;
use warnings;
use utf8;
use Teng::Schema::Declare;
base_row_class 'MyApp::DB::Row';
table {