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
-- ======================================== | |
-- アーティスト名をトラック名に加える | |
-- トラック名を "AC/DC - Back In Black" のようにできる | |
-- 参考:slowly but surely (http://d.hatena.ne.jp/hrc/20080620/1214096524) | |
-- ======================================== | |
tell application "iTunes" | |
set theTracks to selection of front browser window | |
set theTracksRef to a reference to theTracks | |
repeat with i from 1 to count of theTracksRef |
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
/* | |
イラレでウェブサイトのデザインをしていて、PSD に書き出すとレイヤーが保持されず、困る事が稀にあります。 | |
どうやら、オーバープリントが有効になったオブジェクトがドキュメント内にあると、書き出し時に統合されてしまうようです。 | |
「RGBでオーバープリントっているか?」と思うのですが、禁止するオプションも無いし、全選択してサクッと | |
解除する事もできないので MG ☂. さんの記事『[Illustrator]黒以外のオーバープリントを解除』 | |
(http://www.milligramme.cc/wp/archives/572)を読みJSでコントロールする事にしました。 | |
ただ、自分の場合は黒だろうと何だろうと、問答無用で解除して良いので少しだけ処理が簡単になっています。 | |
チクチク探して解除してたのがアホらしくなる程簡単。素晴らしい。ありがとうございました。 | |
*/ |
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
-- ============================== | |
-- Hip Hop のアーティスト名についた feat. を曲名に移すのが面倒くさい。 | |
-- というツイートを見て、そういえばいつも自分もそう思っていたな… | |
-- という事で、以前書いた一括処理の AppleScript を少しいじってみた。 | |
-- | |
-- つまり Run-D.M.C. feat. Aerosmith の Walk This Way を | |
-- Run-D.M.C. の Walk This Way [ feat. Aerosmith ] にする為の | |
-- AppleScriptです。 | |
-- | |
-- アーティスト名の "feat" 以降の文字列を抜き出して曲名の末尾に追加します。 |
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
【1】まず ~/Sites フォルダを作成 | |
mkdir -p ~/Sites | |
【2】動作確認用に~/Sites/index.htmlも追加 | |
echo Now Web Sharing! ]] > ~/Sites/index.html | |
【3】apacheの設定ファイルを追加 | |
$ sudo vi /etc/apache2/users/hogehoge.conf |
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
【スープ】 | |
・水 | |
・日本酒 | |
・昆布(なくてもOK) | |
・しょうが(なくてもOK) | |
・にんにく(なくてもOK) | |
*水:日本酒は、5:5や、7:3と諸説あり。お好みで。 | |
【具】 |
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 if(post_custom('hoge')) : $hoge=post_custom('hoge'); ?> | |
<?php echo $hoge ?> | |
<?php endif; ?> |
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
echo '<script type="text/javascript">alert("' . $hoge . '");</script>'; | |
echo '<script type="text/javascript">console.log("' . $hoge . '");</script>'; |
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
1. MAMP から phpMyAdmin を開き DB を作る。 | |
2. データベース名を入力 | |
3. 照合順序は “utf8_general_ci” を選択 | |
4. WP をインストール | |
5. ユーザ名とパスワードは “root” | |
6. データベースのホスト名は “localhost” | |
7. テーブル接頭語はデフォルトのまま “wp_” |
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
var q = location.search.substring(1).split("&"); | |
for(var l=0;l<q.length;l++){ | |
if(q[l].indexOf("=")>-1){ | |
q[l] = q[l].split("="); | |
}else{ | |
q[l] = [q[l],"default"]; | |
} | |
q[q[l][0]] = q[l][1]; | |
} | |
alert(q.hoge); |
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
function require_login() { | |
if ( ! is_user_logged_in() && ! preg_match( '/^(wp-login\.php|async-upload\.php)/', basename( $_SERVER['REQUEST_URI'] ) ) && ! ( defined( 'DOING_AJAX' ) && DOING_AJAX ) && ! ( defined( 'DOING_CRON' ) && DOING_CRON ) ) { | |
auth_redirect(); | |
} | |
} | |
add_action( 'init', 'require_login' ); |
OlderNewer