This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Customize contact fields on Profile admin panel | |
* | |
* @package WordPress | |
*/ | |
/** | |
* WordPressのプロフィール画面に追加するコンタクトメソッド | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* functionsフォルダにあるファイルをすべて読み込む | |
*/ | |
foreach(glob(TEMPLATEPATH."/functions/*.php") as $file){ | |
require_once $file; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* 画像のURLからattachemnt_idを取得する | |
* | |
* | |
* @param string $url 画像のURL | |
* @return int attachment_id | |
*/ | |
function ri_detect_attachment_id($url){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 自分の担当しているチケットを表示する Window > User Scriptで貼りつける | |
* | |
* @return void | |
*/ | |
function getTicketCount(){ | |
new Ajax.Request("http://tech.hametuha.org/issues.xml", { | |
method: "get", | |
parameters: { | |
key: "Here_comes_your_api_key", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Macportsでnmapをインストールすること | |
nmap -sT 192.168.0.0-255 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# http://hatomugi.sakura.ne.jp/forum/topic.php?id=76 | |
#メールキュー確認 | |
mailq | |
#メールキューのIDで中身を見る | |
sudo postcat -q [キューID] | nkf -m |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
the_post(); | |
/** | |
* Get color function. | |
* | |
* Get term meta on loop is little bit annoying. | |
* You should define some wrapper function. | |
*/ | |
function get_color($tag){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* A template loader which accepts arguments. | |
* | |
* @param string $slug | |
* @param string|array $name | |
* @param array $args Arguments to pass. | |
* @param bool $echo If false, return string. | |
* @param string $glue Default is '-'. You can specify '/' which means directory separator. | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* WordPressで全文検索を試みる | |
* | |
* initフックなどでインスタンス化してください。 | |
* あんまり遅いタイミングだとエラーを吐きます。 | |
* Singleton実装です。 | |
* | |
* <code> | |
* // functions.phpなどに記載 |