MongoDBの便利なサーバー関数等をまとめたものです.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:%28function%28%29%7bvar%20d%3dfunction%28k%2cj%29%7bvar%20b%3dk%2echildNodes%2elength%3bfor%28var%20g%3db%2d1%3bg%3e%3d0%3bg%2d%2d%29%7bvar%20h%3dk%2echildNodes%5bg%5d%2cf%3dh%2enodeType%2cl%3dh%2enodeName%3bif%28f%3d%3d3%29%7bj%28h%29%7delse%7bif%28f%3d%3d1%29%7bif%28%21%28l%3d%3d%22A%22%7c%7cl%3d%3d%22IMG%22%7c%7cl%3d%3d%22INPUT%22%29%29%7bd%28h%2cj%29%7d%7d%7d%7d%7d%3bvar%20c%3dwindow%2elocation%2ce%3dc%2ehref%2esubstring%280%2cc%2ehref%2elength%2dc%2esearch%2elength%29%3be%2b%3d%22%3fencode_hint%3d%e3%81%b7%26cmd%3dsearch%26type%3dAND%26word%3d%22%3bvar%20a%3ddocument%2egetElementById%28%22body%22%29%3bd%28a%2cfunction%28f%29%7bif%28f%2enodeValue%2esearch%28%2f%5cS%2b%2fi%29%3d%3d%2d1%29%7breturn%7dvar%20b%3ddocument%2ecreateElement%28%22span%22%29%3bb%2einnerHTML%3df%2enodeValue%2ereplace%28%2f%28%5b%5e%5cs%ef%bd%a4%e3%80%81%2c%e3%80%9c%c3%97%5c%28%5c%29%5d%7b2%2c%7d%28%20%5b%5e%5cs%ef%bd%a4%e3%80%81%2c%e3%80%9c%c3%97%5c%28%5c%29%5d%7b2%2c%7d%29%2a%29%2fg%2cfunction%28h%2cg%29%7bif%28g%2esearc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
file_cache_path "/tmp/chef-solo" | |
cookbook_path "/tmp/chef-solo/cookbooks" | |
cache_options({ :path => "/tmp/chef-solo/checksums", :skip_expires => true }) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vim/.netrwhist | |
vim/bundle/* | |
!vim/bundle/vundle | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct backend { | |
unsigned magic; | |
#define BACKEND_MAGIC 0x64c4c7c6 | |
VTAILQ_ENTRY(backend) list; | |
int refcount; | |
struct lock mtx; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git clone --bare git@ghe1:foo/bar.git | |
cd web.git/ | |
git remote add ghe2 git@ghe2:foo/bar.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component, PropTypes } from 'react'; | |
const ENTER = 13; | |
export default class TextField extends Component { | |
static get displayName() { | |
return 'TextField'; | |
} | |
static get propTypes() { |
OlderNewer