Skip to content

Instantly share code, notes, and snippets.

@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 / 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 / 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);
@ashikawa
ashikawa / README.md
Last active December 14, 2015 01:59
TwitterAPI の仕様変更への対策
@ashikawa
ashikawa / README.md
Last active December 12, 2015 03:09
Developer Roadmap 2013

The following changes can be enabled/disabled using the "April 2013 Breaking Changes" migration until April 3rd when they will go into effect permanently for everyone:

以下の変更は 4/6 までに "March 2013 Breaking Changes" migration の enabled/disabled を使い、恒久的に変更する事ができます。

Removing ability to POST to USER_ID/questions

USER_ID/questions への POST 機能を削除

@ashikawa
ashikawa / memcache.md
Created January 7, 2013 09:27
コンソールで memcache と戦う方法
@ashikawa
ashikawa / Memcached.php
Last active December 10, 2015 18:08
Memcached コード補完用のスケルトン 書きかけ
<?php
/**
* @see http://php.net/manual/en/class.memcached.php
*/
class Memcached
{
/**
* Enables or disables payload compression.
* When enabled, item values longer than a certain threshold (currently 100 bytes)
* will be compressed during storage and decompressed during retrieval transparently.