Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Yuki Matsukura matsubo

🏠
Working from home
View GitHub Profile
@matsubo
matsubo / Gemfile
Last active Mar 12, 2021 — forked from run26kimo/Gemfile
Ruby AWS cloudwatch put log event example
View Gemfile
gem 'aws-sdk-cloudwatchlogs'
@matsubo
matsubo / README.md
Last active Jan 28, 2021 — forked from gbraad/README.md
Buy me a coffee
View README.md

HTML tag

Buy Me A Coffee

MarkDown

Buy Me a Coffee

@matsubo
matsubo / group_date.rb
Last active Aug 29, 2015 — forked from leods92/group_date.rb
MySQL ONLY. Confirmed on Rails 4.0.x, MySQL 5.6.x
View group_date.rb
module ActiveRecord
module Querying
delegate :group_date, :to => :scoped
end
module QueryMethods
def group_date(column_name = nil)
return self if column_name.blank?
# Rails uses a non standard time zone naming.
View aitter.js
(function(){
var total = {};
var year = '2012';
var all = false;
function init(num) {
if(typeof num !== 'number') {
num = 0;
$('<div/>').css({
position: 'fixed',
left: 0,
@matsubo
matsubo / dirwatch.py
Last active Dec 13, 2015 — forked from narusemotoki/dirwatch.py
Improved detecting performance.
View dirwatch.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import datetime
import time
import os
from stat import *
import commands
import fnmatch
View OSXScreen.md

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 Terminal.app 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. Terminal.app won't remember where I was for me. I have to initialize ever tab.

GNU Screen

@matsubo
matsubo / gist:1964936
Created Mar 3, 2012 — forked from tanakahisateru/gist:1344162
PHP5.4 configure with MacPorts besides existing PHP
View gist:1964936
./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 \