Skip to content

Instantly share code, notes, and snippets.

View krt's full-sized avatar

Masato Yamaguchi krt

  • Tokyo, JPN
View GitHub Profile
@plentz
plentz / nginx.conf
Last active November 16, 2024 14:10
Best nginx configuration for improved security(and performance)
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@sunaot
sunaot / exception.md
Created August 2, 2013 09:13
例外設計の話

例外設計の話。

こんな指針がいいのかなー 2013 夏 ver.

例外の目的とは?

.NET の「例外のデザインのガイドライン」にもこう書いてある。

@iZRIdJJ53S
iZRIdJJ53S / デプロイ、構成管理ツールまとめ
Created July 28, 2013 06:26
デプロイツール、構成管理ツールと呼ばれているツール群のまとめ。2013年7月
Ruby製
Puppet
http://puppetlabs.com/
http://gihyo.jp/admin/serial/01/puppet
Capistrano
https://github.com/capistrano/capistrano/wiki
http://ja.wikipedia.org/wiki/Capistrano
Chef
@mattn
mattn / .classpath
Created August 8, 2012 04:51
業務プログラマがFizzBuzz書いたらどうなるか ( ref: http://d.hatena.ne.jp/irof/20120808/p1 )
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src/main/java"/>
<classpathentry kind="src" path="src/test/java"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="lib" path="/usr/share/java/commons-logging-1.1.1.jar"/>
<classpathentry kind="lib" path="/usr/share/java/junit4.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
import bisect
class NFA(object):
EPSILON = object()
ANY = object()
def __init__(self, start_state):
self.transitions = {}
self.final_states = set()
self._start_state = start_state
@carlhoerberg
carlhoerberg / multi-em-http.rb
Created April 17, 2012 15:00
Concurrent HTTP requests with EventMachine
require 'eventmachine'
require 'em-http-request'
# Reference:
# https://github.com/igrigorik/em-http-request/wiki/Parallel-Requests
# http://rdoc.info/github/eventmachine/eventmachine/master/EventMachine/Iterator
urls = ['http://www.google.com', 'http://www.cloudamqp.com']
@juno
juno / README.md
Created November 1, 2011 08:40
Install rbenv and ruby-build to Amazon Linux (cloud-init).

Install rbenv and ruby-build to Amazon Linux (cloud-init).

  1. Copy & paste content of user-data.sh to EC2 RunInstances user-data
  2. Then, logging in to EC2 instance as ec2-user and run install-ruby.sh.
@fundon
fundon / vim_centos.sh
Created August 17, 2011 03:52
install vim 7.3 on centos, debian, arch etc.
#!/bin/bash
# on centos minimal
yum install gcc
yum install make
yum install ncurses-devel
yum install lua lua-devel
yum install ruby ruby-devel
yum install python python-devel
yum install perl perl-devel