Skip to content

Instantly share code, notes, and snippets.

View kubosho's full-sized avatar
🎯
Focusing

KUBOTA Shota kubosho

🎯
Focusing
View GitHub Profile
@kubosho
kubosho / emacs.rb
Created March 3, 2012 14:43
Cocoa Emacs 23.3b formula with patches(Lion fullscreen, Emacs fullscreen, IME inline).
require 'formula'
class Emacs < Formula
url 'http://ftp.gnu.org/pub/gnu/emacs/emacs-23.3b.tar.bz2'
md5 '917ce0054ef63773078a6e99b55df1ee'
homepage 'http://www.gnu.org/software/emacs/'
if ARGV.include? "--use-git-head"
head 'git://repo.or.cz/emacs.git'
else
@kubosho
kubosho / svn-up-st.sh
Created April 15, 2012 10:47
svn up && st
#!/bin/sh
echo '--- svn update ---'
svn up
echo '--- svn status ---'
svn st
@kubosho
kubosho / reclog.sh
Created April 15, 2012 10:48
rec command log.
#!/bin/sh
NOW_TIME=`date +%Y%m%d-%H%M%S`
REC_SAVE_DIR="/path/to/"
REC=${REC_SAVE_DIR}/${NOW_TIME}_commandlog.txt
script ${REC}
user www-data;
worker_processes 3;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
worker_processes 2
listen '/tmp/redmine.sock'
stderr_path File.expand_path('log/unicorn.log', ENV['RAILS_ROOT'])
stdout_path File.expand_path('log/unicorn.log', ENV['RAILS_ROOT'])
preload_app true
before_fork do |server, worker|
upstream unicorn {
server unix:/tmp/unicorn.sock;
}
server {
listen 80;
server_name example.com;
root /var/www/redmine/public;
error_log /var/www/redmine/log/error.log;
location / {
@kubosho
kubosho / README
Created September 15, 2012 15:11
WordPressのコメントフォームやコメント欄周りのstyleをまとめてみた
- php wp_list_comments();
- php comment_form();
とテンプレートに書いて、出力されるHTMLのclassとidをまとめてみた。
@kubosho
kubosho / EventDispatcher.js
Created October 8, 2012 15:12
Event dispatcher
(function (window) {
function EventDispatcher() {
}
EventDispatcher.prototype = {
hasEvent: function () {
},
add: function () {
},
@kubosho
kubosho / README
Created October 12, 2012 07:38
underscore.js template test
underscore.js初挑戦。
多次元配列化。
@kubosho
kubosho / README
Created October 13, 2012 12:57
一回しか実行されない関数のテスト
以下のURLで紹介されている関数を自作ライブラリで使ってみた。
最初の一回だけ実行される関数を生成する関数 #JavaScript - Qiita http://qiita.com/items/631bb3ef2a34064b0d86