Skip to content

Instantly share code, notes, and snippets.

@msng
msng / .gitignore
Last active December 27, 2015 18:09
.DS_Store
Thumbs.db
.svn
.buildpath
.project
.settings
*.swp
.idea
.vagrant
@msng
msng / README.md
Last active December 28, 2015 02:08
Mac の PhpStorm で Control+C をエスケープに強制割り当てするための、KeyRemap4MacBook の設定。

これはなに

Mac の PhpStorm で Control + Cesc に強制割り当てするための、KeyRemap4MacBook の設定。 PhpStorm のキーマップ指定でエスケープに割り当ててもエディタに戻る動作をしなかったので、Mac の方のキーマップを変更してみた。

使い方

  1. KeyRemap4MacBook の設定画面の Misc & Uninstall タブにある Custom Setting 欄の Open private.xml ボタンを押す。
  2. private.xml を何かエディタで開く。
  3. ここにある private.xml の内容を書く。もう何か書いてあったら適当にマージ。
<?php
$code = '<?php
$array = [
';
for ($i = 0; $i <= 7; $i++) {
$code .= " 'key" . chr($i) . "' => 'value_" . $i . "',\n";
}
$code .= '];
@msng
msng / clearfix.css
Created December 12, 2013 03:58
コンパクトな clearfix のサンプル。ここ参照: http://nicolasgallagher.com/micro-clearfix-hack/
.cf:before,
.cf:after {
content: " ";
display: table;
}
.cf:after {
clear: both;
}
@msng
msng / private.xml
Last active January 30, 2016 23:27
Mac 版 PhpStorm のファイルツリーでファイルを選択して開く操作を楽にするための設定 ref: http://qiita.com/msng/items/89d8f1a37c65336c4dec
<?xml version="1.0"?>
<root>
<appdef>
<appname>PHPSTORM</appname>
<equal>com.jetbrains.PhpStorm</equal>
</appdef>
<list>
<item>
<name>Control+P/N to Arrow Up/Down (on PhpStorm)</name>
[alias]
delete-merged-branches = !git branch --merged master | grep -v -e \\* -e master -e develop | xargs git branch -d
delete-merged-remote-branches = !git fetch --all --prune && git branch -r --merged master | grep -v -e master -e develop | sed -e 's%/% %' | xargs -n 2 git push --delete