以下手順になります。
※ .....の箇所はhttps://github.com/makerbee/beebot を参考に
※ hipchatのbot用アカウント設定はhttps://hipchat.com/account/xmpp から
※ 補足の説明をhttp://honbin.hatenablog.com/entry/2014/06/20/064538 にも書いています
$ mkdir mybot
$ cd mybot
$ npm init以下手順になります。
※ .....の箇所はhttps://github.com/makerbee/beebot を参考に
※ hipchatのbot用アカウント設定はhttps://hipchat.com/account/xmpp から
※ 補足の説明をhttp://honbin.hatenablog.com/entry/2014/06/20/064538 にも書いています
$ mkdir mybot
$ cd mybot
$ npm init| #!/bin/bash | |
| PS=`pgrep -lf "${1:?引数に殺したいプロセス名を渡してね}"` | |
| echo $PS | |
| if [ -z "${PS}" ]; then | |
| echo "殺したいプロセス名は存在しないようですね、ウィー" | |
| exit 1 | |
| fi |
| (function($){ | |
| $(window).bind("beforeunload", function(e) { | |
| var params = {}; | |
| $(":input").each(function(){ | |
| params[this.name] = this.value; | |
| }); | |
| $.post("/hoge", params, function(result) { | |
| //success | |
| }); | |
| }); |
| (function($) { | |
| $(":input").change(function(e) { | |
| //e.target.type で入力タイプとれる(text, textarea, radio, select-one)ので | |
| //※それぞれの入力タイプで適用する場合は条件分岐で | |
| //変更があった場合にスタイルを適用する場合は $(this).removeClass("hogehgoe") etc.. | |
| } | |
| }(jQuery)); |
| var LocalStorage = LocalStorage || (function() { | |
| var LOCAL_STORAGE_KEY = "key"; | |
| var connect = function() { | |
| if (!localStorage.hasOwnProperty(LOCAL_STORAGE_KEY) ) { | |
| var item = {}; | |
| localStorage.setItem(LOCAL_STORAGE_KEY, JSON.stringify(item)); | |
| } | |
| }; |
| gem build hoge.gemspec | |
| rake install | |
| gem push pkg/hoge-0.0.1.gem |
| Dir.glob("controllers/*.rb").each { |r| require_relative r } |
| <?php | |
| trait Accessors | |
| { | |
| public function __get($property) | |
| { | |
| if(property_exists($this, $property)) { | |
| return $this->$property; | |
| } | |
| } |
| <?php | |
| class Test | |
| { | |
| private $hoge = "hoge"; | |
| public function __get($property) | |
| { | |
| if(property_exists($this, $property)) { | |
| return $this->$property; | |
| } |
#whats ElasticSearch Luceneベースの全文検索システム
#feature
##for example ###PUT
curl -XPUT http://localhost:9200/twitter/tweet/1 -d '{