Skip to content

Instantly share code, notes, and snippets.

View satoruk's full-sized avatar
:octocat:
ランチ難民

Koyanagi Satoru satoruk

:octocat:
ランチ難民
View GitHub Profile
(function($, undefined) {
var lockKey = 'clickLockedId';
$.fn.releaseClickLocked = function(){
var tid = this.data(lockKey);
if(tid!==undefined){
clearTimeout(tid);
}
$(this).removeData(lockKey);
};
$.fn.singleClick = function(handler, timeout) {
@satoruk
satoruk / auto_search_link.bookmarklet.js
Created July 12, 2010 10:43
MMORPGのIMO for iPhone のまとめwiki の自動で検索リンクを作るbookmarklet.
@satoruk
satoruk / solo.rb
Created June 16, 2011 08:18
Chef Solo Configuration File
file_cache_path "/tmp/chef-solo"
cookbook_path "/tmp/chef-solo/cookbooks"
cache_options({ :path => "/tmp/chef-solo/checksums", :skip_expires => true })
@satoruk
satoruk / unicornd
Created April 9, 2012 05:39
Run Script of unicorn that using RVM gemset.
#!/bin/bash
### BEGIN INIT INFO
# Provides: unicorn
# Required-Start:
# Required-Stop:
# Should-Start;
# Should-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start the unicorns at boot
vim/.netrwhist
vim/bundle/*
!vim/bundle/vundle
@satoruk
satoruk / README.md
Created October 22, 2012 01:50
MongoUtil

MongoUtil

MongoDBの便利なサーバー関数等をまとめたものです.

使い方

パラメータの解説

struct backend {
unsigned magic;
#define BACKEND_MAGIC 0x64c4c7c6
VTAILQ_ENTRY(backend) list;
int refcount;
struct lock mtx;
@satoruk
satoruk / file0.txt
Last active August 29, 2015 13:57
MySQL CLIクライアントをカラー表示 ref: http://qiita.com/satoruk/items/c649e4869601ad56f49f
brew install grc
curl -o ~/.grcat https://raw.github.com/nitso/colour-mysql-console/master/.grcat
curl -o ~/.my.cnf https://raw.githubusercontent.com/nitso/colour-mysql-console/master/.my.cnf
mysql
git clone --bare git@ghe1:foo/bar.git
cd web.git/
git remote add ghe2 git@ghe2:foo/bar.git
@satoruk
satoruk / text_field.js
Created November 27, 2015 07:22
React Text Field Component
import React, { Component, PropTypes } from 'react';
const ENTER = 13;
export default class TextField extends Component {
static get displayName() {
return 'TextField';
}
static get propTypes() {