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
#!/bin/sh | |
# 別ファイルの設定値を読み込む。${HOME} からの相対パス。 | |
source ./sample-tools/config.conf | |
#### - - - - - - - - - - - - - - | |
#### DB バックアップの設定値 | |
# 入力値の数判定、4 より少ない場合はエラー終了 | |
if [ $# -lt 4 ] |
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
#!/usr/local/bin/php5 | |
<?php | |
$file_path = $argv[1]; | |
if ( file_exists($file_path) ) { | |
unlink($file_path); | |
} else { | |
echo "No File : {$file_path}\n"; | |
} |
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
<span onpaste="alert('パスワード(確認)項目は貼り付けできません'); return false;"> | |
<input type="password" name="password_confirm" value=""> | |
</span> |
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 | |
$posts = get_posts('numberposts=20&order=desc&cat=-37'); // 特定のカテゴリーを除外 | |
foreach($posts as $post): | |
?> | |
<div> | |
<span class="meta"><?php echo date("Y/m/d", strtotime($post->post_date)); ?></span><br> | |
<a href="<?php the_permalink(); ?>" id="post-<?php the_ID(); ?>"><?php the_title(); ?></a> | |
</div> | |
<?php endforeach; ?> |
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 | |
query_posts(''); // 特定のカテゴリーを除外 | |
if (have_posts()) : | |
while (have_posts()) : | |
the_post(); | |
?> | |
<h1><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h1> | |
<div class="meta"><?php the_time('Y/ m/ d') ?> by <?php the_author() ?> in <?php the_category(', '); ?></div> | |
<div class="detail"> | |
<?php the_content(); ?> |
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 | |
// 初日と終了日が同じ場合に日べつ種類を「単日」にする | |
// first_date 初日 | |
// last_date 終了日 | |
// single_day 単日 | |
// multi_day 複数日 | |
// の場合 | |
if ( !empty($this->data['Notice']['first_date']) && $this->data['Notice']['first_date']==$this->data['Notice']['last_date'] ) { | |
$last_date_kind = 'single_day'; | |
} else { |
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
#!/bin/sh | |
echo "Hello World ! Try72" |
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
# 文字コードを調べる | |
nkf -g try/layout/index.html | |
Shift_JIS | |
ISO-2022-JP | |
# EUC-JP から UTF-8 に変換する | |
nkf -Ew --overwrite try/layout/index.html |
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
# 改行コードを調べる (ファイルの先頭3行が表示) | |
cat -e try/layout/index.html | head -3 | |
# 結果。 | |
# 行末が $ であれば LF | |
# 行末が ^M$ であれば CRLF | |
# 行末が ^M であれば CR | |
# 改行コードを LF に変換する |
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 | |
$options = array( | |
'nonuse' => '使用しない' | |
, 'use' => '使用する' | |
); | |
echo $this->Form->input("sample-input-name", array('type' => 'radio', 'before' => 'サービスShop', 'options' => $options)); | |
?> | |
<!-- DTDL版 --> |