Skip to content

Instantly share code, notes, and snippets.

View Shinpeim's full-sized avatar

Shinpei Maruyama Shinpeim

View GitHub Profile
@Shinpeim
Shinpeim / gist:7701608
Last active December 29, 2015 17:08 — forked from civic/gist:7701433
  • ボールみたいなソファ
  • 椅子(アーロン、オカムラ...etc)
  • パーティション有無
  • マルチモニタ数
  • キーボード提供
  • OS選択の自由
  • 服装の自由
  • フレックスタイム実態の自由度
  • フリードリンク
  • フリーお菓子
class Nyan
def replace_method(a, b)
(class << self; self end).module_exec do
alias_method "#{a}_backup", a
alias_method "#{b}_backup", b
alias_method b, "#{a}_backup"
alias_method a, "#{b}_backup"
end
end
@Shinpeim
Shinpeim / Jewelve.rb
Created February 16, 2013 04:26 — forked from jewel12/Jewelve.rb
# -*- coding: utf-8 -*-
module StringsOfJewelve
COLOR_NUMBERS = (0..7).to_a
def to_jewelve
return self.split('').map(&:to_random_colored).shuffle.join
end
def to_random_colored
@Shinpeim
Shinpeim / embed.css
Created December 12, 2012 17:37 — forked from kkosuge/embed.css
.gist {
color: #000;
}
.gist div {
padding: 0;
margin: 0;
}
.gist .gist-file {
@Shinpeim
Shinpeim / github.txt
Created July 20, 2012 02:33 — forked from rummelonp/github.txt
Fork me!!
 (\ (\
(,, 0 ω 0) < Github
(/ (/ \) \)
@Shinpeim
Shinpeim / nginx-conf.rb
Created July 12, 2012 05:14
rails + unicorn + nginx の立ちあげちょっと簡単にするやつ
#!/usr/bin/env ruby
require 'thor'
class NginxConf < Thor
desc 'register PORT', 'install new config file'
option :prefix, type: :string, default: "/usr/local"
def register(port)
root = Dir::pwd
project = root.split(/\//).last
use strict;
use warnings;
use Compress::Raw::Zlib;
my $file_name = shift;
my $opt_name = "glitched_".$file_name;
open (FH, $file_name) or die "$!";
binmode FH;
my $hoge = *FH;
@Shinpeim
Shinpeim / Imager
Created April 13, 2012 03:23 — forked from kkosuge/Imager
sudo apt-get install libjpeg-dev libtiff-dev libpng-dev giflib-dev libttf-dev libfreetype6-dev
sudo cpan -i Imager
package Acme::UuuuNyaaa;
use strict;
use warnings;
sub new{
my $class = shift;
my $self = bless {}, $class;
return $self;
@Shinpeim
Shinpeim / god.md
Created January 17, 2012 17:16 — forked from kkosuge/god.md
Godのかんたんなつかいかた

godのインストール

sudo gem install god

godの起動

$ god -c god.rb