Skip to content

Instantly share code, notes, and snippets.

@phortx
phortx / gist:9204330
Created February 25, 2014 07:21
Ruby 2.1.1 benchmark
@muddydixon
muddydixon / README.md
Last active August 29, 2015 13:56
iris.csvの棒グラフを作ってみよう

サーバの立ち上げ方

  • python: python -m SimpleHTTPServer 5000
  • perl: plackup -MPlack::App::Directory -e 'Plack::App::Directory->new(root => ".")->to_app
  • ruby: ruby -rwebrick -e 'WEBrick::HTTPServer.new(:Port => 5000, :DocumentRoot => ".").start'
  • php: php -S 0.0.0.0:5000
@daiksy
daiksy / kadokawa.scala
Last active August 29, 2015 14:22
カドカワ
import scala.util.Random
val r = new Random()
r.shuffle(List("カ", "ド" ,"カ" ,"ワ", "ン", "ゴ")).take(4).mkString
#!/bin/sh
set -u
set -e
# Example init script, this can be used with nginx, too,
# since nginx and unicorn accept the same signals
# Feel free to change any of the following variables for your app:
APP_ROOT=/home/deploy/public_html/rm/current
PID=$APP_ROOT/tmp/pids/unicorn.pid
ENV=production
@yuroyoro
yuroyoro / have_same_attributes.rb
Created January 28, 2012 12:14
have_same_attributes : RSpec用Custom Machter。ActiveRecord/ActiverResrouce/Hashなどをゆるふわくmatchさせる
# Rspec用のCustom Matcher
#
# attributesメソッドを持つオブジェクト同士やHashを再帰的にmatchさせる
#
# ActiveRecord/ActiveModel/ActiveResrouce/Hashなどをゆるふわく
# 一致するか調べる。例えば、StringとSymbolは区別しないし、[]や{}やnilは同一視する。
#
# it { should have_same_attributes(hash) }
# it { should have_same_attributes(:foo => 1,:bar => 2) }
#
@ayumin
ayumin / git-dojo.md
Created March 2, 2012 10:59
Git道場実行委員募集

Git道場実行委員募集

3月下旬~4月くらいにGit道場を開催したいと思います。

講義メインではなくてなるべく手を動かす時間をたくさんとり、参加者全員が”怖がらずにmerge/rebaseをできるようになる”というのが目標です。

このイベントに実行委員として参加してくれる方は、下記の形式のメールを送信してください。

To: git-dojo_at_qwik.jp

Cc: ayumu.aizawa_at_gmail.com

@mike-neck
mike-neck / AppengineExternalResource.java
Created April 8, 2012 02:11
@ruleアノテーションを利用したAppengineTestCase
package org.mikeneck.gae.slim3.sample.util;
import org.junit.rules.ExternalResource;
import org.slim3.tester.AppEngineTester;
/**
* @author : mike
* @since : 12/04/08
*/
public class AppengineExternalResource extends ExternalResource {
@uasi
uasi / brew-install-version.sh
Created June 25, 2012 07:30
brew install-version (a Homebrew command that install a specific version of a formula with ease)
#!/usr/bin/env zsh
if [[ $# -lt 2 ]]; then
print -P "%UUsage%u: brew install-version [install options] FORMULA VERSION"
exit 1
fi
formula=
version=
install_opts=()
@todesking
todesking / svn-cherry-pick.rb
Created August 3, 2012 11:26
svn-cherry-pick
#!/usr/bin/env ruby
# -*- coding:utf-8 -*-
raise <<EOS
MOVED: https://github.com/todesking/svn-cherry-pick
EOS
@mazgi
mazgi / zusaar_users_to_csv.rb
Created August 14, 2012 04:57
https://gist.github.com/2787140 とほぼ一緒。あとで整理する
#!/usr/bin/env ruby
require 'pp'
require 'optparse'
require 'net/http'
require 'json'
Version=0.5
class User
attr_accessor :atnd_name, :is_regular