@peccul is peccu

(love peccu '(emacs lisp cat outdoor bicycle mac linux coffee))

Vue.js+VueRouterを使っているときに#idでページ内を移動する

vue routerを使っているとページを示すために #/route が利用されているので、aタグやrouter-linkでidへスクロールするリンクが作成できない。 (そのidに対応するページをvue routerが探してしまう)

そこでvue routerの持つルーティング情報を監視してJSでスクロールさせる方法を取り入れてみると ページ内の指定したidのついた要素までスクロールさせることがでた。

続きを読む

macの辞書を引くコマンドをswiftで書くと速かった

macの辞書をターミナルで引ければ楽で速いかなと思い調べたが、Dictionary.appが起動するものとPythonスクリプトしか見当たらなかった。 しかもPythonスクリプトはちょっともたつく。

中身はObjective-Cバインディングを使っているようなので、Swiftで書いてみたらバイナリも生成できるし速かった。という話。

続きを読む

macのデスクトップアプリの標準出力と標準エラー出力をコンソールで確認できるアプリを作ってみた

macのデスクトップアプリ(Mountain Lionより新しいもの)ではfprintf(stdout, ...)fprintf(stderr, ...)が捨てられているようで、これを確認する手段を調べた。

続きを読む

Install elasticsearch plugins and kibana plugins behind the proxy.

elasticsearch

Set proxy configurations to env $ES_JAVA_OPTS like below.

ex: installing x-pack

ES_JAVA_OPTS="-Dhttp.proxyHost=proxy.example.com -Dhttp.proxyPort=8888 -Dhttps.proxyHost=proxy.example.com -Dhttps.proxyPort=8888" ./bin/elasticsearch-plugin install x-pack

kibana

Kibana doesn't support proxy yet...

You need to download plugins directory by curl, wget, etc. and run bin/kibana-plugin.

curl -LO https://artifacts.elastic.co/downloads/packs/x-pack/x-pack-5.4.1.zip
./bin/kibana-plugin install file://$(pwd)/x-pack-5.4.1.zip

github.com

www.elastic.co