Skip to content

Instantly share code, notes, and snippets.

View matsubo's full-sized avatar

Yuki Matsukura matsubo

View GitHub Profile
matsubo / commit-msg
Created January 17, 2024 13:01 — forked from iberianpig/commit-msg
#!/usr/bin/env ruby
message_file = ARGV[0]
message =, :encoding => Encoding::UTF_8)
# remove prefix issue number like [#1234] from COMMIT_EDITMSG
message = message.sub(/^\[#[0-9A-Za-z_].*\]/, "")
# remove comment
message = message.gsub(/^#(?! ------------------------ >8 ------------------------).*\n|^\n/, "")
matsubo / Gemfile
Last active March 12, 2021 06:37 — forked from run26kimo/Gemfile
Ruby AWS cloudwatch put log event example
gem 'aws-sdk-cloudwatchlogs'
matsubo /
Last active February 25, 2022 01:11 — forked from gbraad/
Buy me a coffee

HTML tag

Buy Me A Coffee


Buy Me a Coffee

matsubo / group_date.rb
Last active August 29, 2015 14:02 — forked from leods92/group_date.rb
MySQL ONLY. Confirmed on Rails 4.0.x, MySQL 5.6.x
module ActiveRecord
module Querying
delegate :group_date, :to => :scoped
module QueryMethods
def group_date(column_name = nil)
return self if column_name.blank?
# Rails uses a non standard time zone naming.
var total = {};
var year = '2012';
var all = false;
function init(num) {
if(typeof num !== 'number') {
num = 0;
position: 'fixed',
left: 0,
matsubo /
Last active December 13, 2015 23:39 — forked from narusemotoki/
Improved detecting performance.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import datetime
import time
import os
from stat import *
import commands
import fnmatch
matsubo /
Last active December 10, 2015 01:18 — forked from bigeasy/

Installing GNU Screen on OS X in Homebrew

I want to edit in one tab, run what I edit in the other. Typical multi-view stuff. I've used for the last few years. Lately, however, after not long enough, Terminal gets laggy when I switch between tabs.

The stutter between edit and run is annoying, an unnacceptable. One of the major reason I've chosen to work with character based UI is because it is snappy. There shouldn't be a lag while a screen of UTF-8 is rendered in a monospace font.

The lag gets progressively longer, chipping at my productivity with irritation. The only solution is to kill all my Terminals, which essentially kills my flow. won't remember where I was for me. I have to initialize ever tab.

GNU Screen

matsubo / gist:1964936
Created March 3, 2012 08:07 — forked from tanakahisateru/gist:1344162
PHP5.4 configure with MacPorts besides existing PHP
./configure \
--prefix=/opt/local/php/5.4 \
--bindir=/opt/local/bin \
--with-config-file-path=/opt/local/php/5.4/etc \
--with-config-file-scan-dir=/opt/local/php/5.4/var/db \
--mandir=/opt/local/php/5.4/share/man \
--infodir=/opt/local/php/5.4/share/info \
--program-suffix=-5.4 \
--with-apxs2=/opt/local/apache2/bin/apxs \
--enable-pdo \