Skip to content

Instantly share code, notes, and snippets.

@ashikawa
ashikawa / memcache.md
Created January 7, 2013 09:27
コンソールで memcache と戦う方法
@ashikawa
ashikawa / commands.sh
Last active October 29, 2018 12:07
wp-cli sample
# db export
wp db export ../wp_db.sql
# update all
wp core update && wp core update-db && wp plugin update-all && wp theme update --all
# list all plugins
wp plugin list --format=csv | \
fgrep -v inactive | \
fgrep active | \
@ashikawa
ashikawa / README.md
Created November 14, 2012 12:45
jQuery Deferred マニュアルの日本語翻訳

PHP Fatalerror: Cannot use string offset as an array in ... popular-posts.php on line 282

Word Press で下書きのプレビューが出来ない(画面が真っ白になる)バグ。

環境は

  • WordPress 3.7.1
  • Custom Field Template 2.1.8
  • Popular Posts 2.6.2.0
@ashikawa
ashikawa / Ruby.sublime-build
Last active December 22, 2015 21:19
Mac に rubyenv インストールしたメモ。
{
"cmd": ["/Users/foo/.rbenv/shims/ruby", "$file"]
}
@ashikawa
ashikawa / REAME.md
Last active December 20, 2015 20:29
Apache で自動デプロイ

ディレクトリ構成

  • /var/www/$PROJECTS/
    • .git/
    • public/
      • html など
    • scripts/
      • gitpull.sh

chown -R apache:apache - /var/www/$PROJECTS

@ashikawa
ashikawa / README.md
Last active December 19, 2015 11:19
Copy on Write メモリを調べるコマンド @see http://d.hatena.ne.jp/naoya/20080212/1202830671
cpan local::lib
cpan Linux::Smaps
shared_memory_size.pl `pgrep httpd`
@ashikawa
ashikawa / memo.md
Last active December 19, 2015 09:19
memo
@ashikawa
ashikawa / gist:5489138
Last active December 16, 2015 19:59
Facebook July 2013 Breaking Changes の翻訳。 https://developers.facebook.com/roadmap/ より。

Developer Roadmap

In the spirit of openness and transparency and to adhere to our Breaking Change Policy, we publish this roadmap to help developers plan for changes that may require code modifications.

公共性とオープン性と、Breaking Change Policy に従い、コードの変更が必要になるかもしれない開発者へ向けてこのロードマップを公開します。

Like all roadmaps, it may shift slightly, but we will share insight into what is happening as details become available.

他のロードマップ同様、多少の変更はあるかもしれませんが、今後の方向性を知る上で必要な情報を共有します。

@ashikawa
ashikawa / main.js
Created February 25, 2013 03:04
JS console についてメモ。
/*global $, setTimeout, console*/
/**
* なんか重たい処理
*/
function fib(num) {
if (num === 0 || num === 1) {
return 1;
}
return fib(num - 1) + fib(num - 2);