No. 5, Lane 8, Yongkang St, Da’an DistrictTaipei City, 台湾 106
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
<source> | |
type forward | |
</source> | |
<match data.**> | |
type copy | |
<store> | |
type norikra | |
norikra 127.0.0.1:26571 |
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
tls-client | |
key-direction 1 | |
remote YOURSERVER | |
comp-lzo | |
cipher BF-CBC | |
port 1194 | |
proto udp | |
redirect-gateway def1 | |
<ca> | |
-----BEGIN CERTIFICATE----- |
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 // デフォルトサイズのサムネイル表示 ?> | |
<?php FlickrPress::isExtractThumbnailByPostID( get_the_ID() ) ? the_post_thumbnail() : the_post_thumbnail('thumbnail') ?> | |
<?php // サイズ指定でサムネイル表示 ?> | |
<?php FlickrPress::isExtractThumbnailByPostID( get_the_ID() ) ? the_post_thumbnail('q') : the_post_thumbnail('thumbnail') ?> |
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
# | |
# fukata.org | |
# ansible v1.8.2 | |
# | |
- hosts: all | |
sudo: yes | |
vars: | |
swap_count: 1024 | |
nginx_version: 1.9.1 | |
ngx_cache_purge_version: 2.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
#!/bin/bash -x | |
DT=$(date +"%Y%m%d") | |
BACKUP_TMP_DIR=/tmp/backups-${DT} | |
BACKUP_DEST_PREFIX=services/blog.pg-applications.com/${DT} | |
BACKUP_BUCKET="BUCKET NAME" | |
BACKUP_NUM=10 | |
DB_NAME="WP DB NAME" | |
mkdir -p $BACKUP_TMP_DIR |
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
diff -Nru /home/tatsuya/DOWNLOAD/php/CodeIgniter_1.7.3/system/libraries/Cache/Cache.php ./system/libraries/Cache/Cache.php | |
--- /home/tatsuya/DOWNLOAD/php/CodeIgniter_1.7.3/system/libraries/Cache/Cache.php 1970-01-01 08:00:00.000000000 +0800 | |
+++ ./system/libraries/Cache/Cache.php 2011-03-20 06:22:57.267999183 +0800 | |
@@ -0,0 +1,216 @@ | |
+<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); | |
+/** | |
+ * CodeIgniter | |
+ * | |
+ * An open source application development framework for PHP 4.3.2 or newer | |
+ * |
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
diff -Nru /home/tatsuya/DOWNLOAD/php/CodeIgniter_1.7.3/system/application/libraries/Cache/Cache.php ./system/application/libraries/Cache/Cache.php | |
--- /home/tatsuya/DOWNLOAD/php/CodeIgniter_1.7.3/system/application/libraries/Cache/Cache.php 1970-01-01 08:00:00.000000000 +0800 | |
+++ ./system/application/libraries/Cache/Cache.php 2011-03-20 07:28:52.003705893 +0800 | |
@@ -0,0 +1,216 @@ | |
+<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); | |
+/** | |
+ * CodeIgniter | |
+ * | |
+ * An open source application development framework for PHP 4.3.2 or newer | |
+ * |
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 | |
function pretty_date($time) { | |
$diff = time() - $time; | |
$day_diff = floor($diff / 86400); | |
if(is_nan($day_diff)) return ''; | |
if ($day_diff == 0) { | |
if ($diff < 60) { | |
return $diff . "second ago"; |
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 | |
// bad example | |
$v = '0'; | |
if ( empty($v) ) { | |
echo '$v is blank.'; | |
} | |
// good example | |
$v = '0'; | |
if ( strlen($v)==0 ) { |
OlderNewer