Skip to content

Instantly share code, notes, and snippets.

View matsubo's full-sized avatar

Yuki Matsukura matsubo

View GitHub Profile
@matsubo
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 \
@matsubo
matsubo / router_restart.sh
Last active September 12, 2023 06:10
Restart NEC router when NAT buffer pool is overflow.
#!/bin/bash
# Reboot NEC router if NAT errors are saved in router status page.
# - Checks VoIP status.
# - Run as daemon.
# - Encoding have to be Shift-JIS.
#
# @copytright Yuki Matsukura
# @contact https://matsu.teraren.com/blog/
#
@matsubo
matsubo / gist:2543898
Created April 29, 2012 08:10
Import all the text file into evernote.
set listOfNames to {}
set theFolder to choose folder "Select the source folder"
tell application "Finder"
set filelist to every file of the folder theFolder
repeat with currentFile in filelist
set currentFileName to (the name of currentFile)
set nom to currentFileName
if text -4 of nom is "." then
set currentFileName to (text 1 thru -5 of nom)
@matsubo
matsubo / gist:2544706
Created April 29, 2012 08:18
IX2015 setting dump
! NEC Portable Internetwork Core Operating System Software
! IX Series IX2010 (magellan-sec) Software, Version 8.3.44, RELEASE SOFTWARE
! Compiled Oct 20-Tue-2009 13:28:55 JST #1
! Current time Jan 05-Tue-2010 14:53:33 JST
!
!
timezone +09 00
!
!
!
@matsubo
matsubo / gist:2773009
Created May 23, 2012 02:57
Disabling local timemachine cache
sudo tmutil disablelocal
@matsubo
matsubo / gist:3128217
Created July 17, 2012 09:05
Host alive checker
<?php
/**
* Send mail with response if the target host is up
*
* @author Yuki Matsukura
* @date 2011-09-24
*/
/** @var string target URL */
$url = 'https://buy.itunes.apple.com/verifyReceipt';
rvm version
rvm get latest
rvm reload
gem update
@matsubo
matsubo / OSXScreen.md
Last active December 10, 2015 01:18 — forked from bigeasy/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

git clone https://github.com/matsubo/multi-thread-image-downloader.git
cd multi-thread-image-downloader
bundle install
ruby main.rb
@matsubo
matsubo / libevent20_install.sh
Created February 9, 2013 11:13
How to install the newest libevent 2.0.x
wget https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz
tar xf libevent-2.0.21-stable.tar.gz
cd libevent-2.0.21-stable
./configure
make
sudo make install