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 | |
/* | |
* ベーシック認証設置ツール | |
* 1)ベーシック認証掛けたいフォルダにこのファイルを設置してアクセス! | |
* 2)ユーザ・パスワードを設定後、認証確認出来たら完了です。 | |
* | |
* バリデーション、ファイルパーミションなど、対応甘いので、改善したい! | |
*/ | |
?> | |
<?php |
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 | |
# epub3生成スクリプト | |
# epub3ファイルを展開して修正後、再度epub3にパッケージングするためのスクリプト | |
# | |
# 対象のフォルダがある階層に移動して、スクリプト配置して実行 | |
# epub作成するフォルダ名を引数に指定 | |
# | |
# ex) | |
# ./make_epub.sh target_folder_name | |
# 結果、target_folder_name.epubが生成 |
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 | |
/** | |
* for development env | |
*/ | |
class DATABASE_CONFIG { | |
public $default = array( | |
'driver' => 'mysql', | |
'persistent' => false, |
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
// $mobile_ip_list にサブネット形式でガラケーIP一覧がセット | |
include("mobile_ip_list.php"); | |
// 判定したいIP | |
$this_ip= $_SERVER["SERVER_ADDR"]; | |
// $is_mobile 許可されたモバイルか否か | |
$is_mobile = false; | |
foreach($mobile_ip_list as $permit_ip){ |
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 | |
exec_file='/full/path/to/exec_file_name.php' | |
pid=`pgrep -f $exec_file` | |
#if not running | |
if [ -z $pid ] ; then | |
echo "Done!!" | |
php $exec_file | |
#don't exec | |
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 | |
youbi=`date +%w` | |
dmpfile="db_"${youbi}".dmp.gz" | |
mysqldump -u user -ppassword --databases databasename | gzip > ${dmpfile} | |
exec ssh-agent scp ${dmpfile}.gz user@backup_server:/backup/dir/path & |