Skip to content

Instantly share code, notes, and snippets.

View shigeya's full-sized avatar

Shigeya Suzuki shigeya

View GitHub Profile
@shigeya
shigeya / gist:3052177
Created July 5, 2012 08:01
OpenSSL speed bench on iMac11,1 - Intel Core i5 750 (@2.66Ghz)
Model Name: iMac
Model Identifier: iMac11,1
Processor Name: Intel Core i5
Processor Speed: 2.66 GHz
Number of Processors: 1
Total Number of Cores: 4
L2 Cache (per Core): 256 KB
L3 Cache: 8 MB
Memory: 12 GB
Type: DDR3
@shigeya
shigeya / gist:3057167
Created July 5, 2012 23:46
OpenSSL speed bench on MacBookAir5,1 - Intel Core i5-3317U (@1.7Ghz)
Model Name: MacBook Air
Model Identifier: MacBookAir5,1
Processor Name: Intel Core i5
Processor Speed: 1.7 GHz
Number of Processors: 1
Total Number of Cores: 2
L2 Cache (per Core): 256 KB
L3 Cache: 3 MB
Memory: 8 GB
Type: DDR3
@shigeya
shigeya / Makefile
Created August 6, 2012 03:54 — forked from anonymous/Makefile
Makefile
INCLUDEPATH = /opt/local/include
CXXFLAGS = -I${INCLUDEPATH}
LIBS += -lopencv_core -lopencv_imgproc -lopencv_highgui
slic: main.cpp slic.cpp
g++ ${CXXFLAGS} main.cpp slic.cpp -o slic
@shigeya
shigeya / ckdl.rb
Created August 8, 2012 13:03
script to show list of days suitable for choseisan.com input
#!/usr/bin/env ruby
# -*- coding: utf-8 -*-
#
# Create list of lines of days with day of week
# suitable for http://chouseisan.com input
#
require 'date'
day = Date.today
@shigeya
shigeya / ftp-sites.list
Created September 9, 2012 00:27
List of FTP sites, November 21, 1993
a.cs.uiuc.edu
accuvax.nwu.edu
acm.acm.rpi.edu
acsc.com
adder.maths.su.oz.au
aelred-3.ie.org
aeneas.mit.edu
agate.berkeley.edu
ahkcus.org
aisun1.ai.uga.edu
@shigeya
shigeya / postgresql8.rb
Created September 14, 2012 10:01
brew's postgresql8.rb locally patched
require 'formula'
require 'hardware'
class Postgresql8 < Formula
homepage 'http://www.postgresql.org/'
url 'http://ftp.postgresql.org/pub/source/v8.4.12/postgresql-8.4.12.tar.gz'
sha1 '53a17cd0f104bcad112925d3c6fc2e29e1f89c8e'
depends_on 'readline'
depends_on 'libxml2' if MACOS_VERSION < 10.6 # Leopard libxml is too old
@shigeya
shigeya / gist:3925285
Created October 20, 2012 23:53
Rails3: patch to scan spec directory for rake notes
You don't need this patch if you're on Rails 4 (set environment variable instead)
*** /Users/shigeya/.rvm/gems/ruby-1.9.3-p286@aimm3/gems/railties-3.2.8/lib/rails/source_annotation_extractor.rb.FCS Sun Oct 21 08:52:47 2012
--- /Users/shigeya/.rvm/gems/ruby-1.9.3-p286@aimm3/gems/railties-3.2.8/lib/rails/source_annotation_extractor.rb Sun Oct 21 08:53:12 2012
***************
*** 47,53 ****
# Returns a hash that maps filenames under +dirs+ (recursively) to arrays
# with their annotations.
! def find(dirs=%w(app config lib script test))
@shigeya
shigeya / gist:3942901
Created October 24, 2012 00:17
patch webrick's httpresponse.rb
#
# httpresponse.rb -- HTTPResponse Class
#
# Author: IPR -- Internet Programming with Ruby -- writers
# Copyright (c) 2000, 2001 TAKAHASHI Masayoshi, GOTOU Yuuzou
# Copyright (c) 2002 Internet Programming with Ruby writers. All rights
# reserved.
#
# $IPR: httpresponse.rb,v 1.45 2003/07/11 11:02:25 gotoyuzo Exp $
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><a href="http://railscasts.com/episodes/391-testing-javascript-with-phantomjs">http://railscasts.com/episodes/391-testing-javascript-with-phantomjs</a></body></html>%
% rvm install 1.9.3-p392
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.8/x86_64/ruby-1.9.3-p392.
Continuing with compilation. Please read 'rvm mount' to get more information on binary rubies.
Building 'ruby-1.9.3-p392' using clang - but it's not (fully) supported, expect errors.
Installing Ruby from source to: /Users/shigeya/.rvm/rubies/ruby-1.9.3-p392, this may take a while depending on your cpu(s)...
ruby-1.9.3-p392 - #downloading ruby-1.9.3-p392, this may take a while depending on your connection...
######################################################################## 100.0%
ruby-1.9.3-p392 - #extracting ruby-1.9.3-p392 to /Users/shigeya/.rvm/src/ruby-1.9.3-p392
ruby-1.9.3-p392 - #extracted to /Users/shigeya/.rvm/src/ruby-1.9.3-p392