#スライドショー作るときの不満
- スライドショー作成といったらパワーポイント
- ちょっとした発表を、パワーポイントで作るのが大変
<?php | |
class get_csv{ | |
public $file; | |
public $from_encoding; | |
/* | |
* @param string filepath ファイルパス | |
* @param string from_encoding CSVファイルの文字コード | |
*/ | |
public function __construct($filepath, $from_encoding = "SJIS"){ |
<?php | |
class cache{ | |
public static $config = [ | |
'filepath' => '.cache', | |
'expire_min' => '60' | |
]; | |
private $modified_datetime; | |
private $expiration_time_flg; | |
<?php | |
$options = array( | |
'http'=>array( | |
'method' => 'GET', | |
'header' => array( | |
'Authorization: token [API_TOKEN]', | |
'User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.106 Safari/537.36', | |
) | |
) | |
); |
<?php | |
//Template Methodパターン | |
abstract class test { | |
//継承先で必ず実装が必要なメソッド | |
abstract function main(); | |
private $num = 0; | |
protected function plus($a, $b){ | |
return $this->num = $a + $b; |
<?php | |
ini_set("display_errors", 1); | |
error_reporting(-1); | |
ini_set("max_execution_time", 0); | |
require 'vendor/autoload.php'; | |
$app = new \Slim\Slim(array( | |
'debug' => true | |
)); |
<?php | |
function imglist($path){ | |
$img = array(); | |
$imglist = array(); | |
if ($handle = opendir($path)) { | |
while (false !== ($file = readdir($handle))) { | |
if (preg_match("{\d+_.*?\.jpg}", $file)){ | |
$imglist[] = $file; | |
} |
#!/bin/bash | |
output_path="/var/www/html/m/" | |
nsurl="http://purl.org/rss/1.0/modules/content/" | |
rssurl="http://minkch.com/feed" | |
# 昨日 (UNIXTIME) | |
yesterday=`date -d '1 days ago' +'%s'` |