This file contains hidden or 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 | |
| // エクセルファイルを zip として処理 | |
| $zip = new ZipArchive(); | |
| $zip->open( 'test.xlsx' ); | |
| // 1シート目のxml取得 | |
| $xml_sheet = simplexml_load_string( $zip->getFromName( 'xl/worksheets/sheet1.xml' ) ); | |
| // sharedStrings.xml を取得 |
This file contains hidden or 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 | |
| $host = '127.0.0.1'; | |
| $port = '27017'; | |
| $dbname = 'mgng'; | |
| $username = 'dbuser'; | |
| $password = 'password'; | |
| $timeout = 5000; | |
| try { | |
| $options = array( |
This file contains hidden or 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 | |
| $prefix = 'TEST:'; | |
| $redis = new Redis(); | |
| $redis->connect( '127.0.0.1', 6379 ); | |
| $redis->setOption( Redis::OPT_PREFIX, $prefix ); | |
| // set | |
| $redis->set( 'key1', 'val1' ); | |
| $redis->set( 'key2', 'val2' ); | |
| $redis->set( 'key3', 'val3' ); |
This file contains hidden or 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
| application: yourappname | |
| version: 1 | |
| runtime: python | |
| api_version: 1 | |
| threadsafe: false | |
| handlers: | |
| - url: /webcron | |
| script: webcron.py | |
| login: admin |
This file contains hidden or 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
| Cache-Control no-store, no-cache, must-revalidate, post-check=0, pre-check=0 | |
| Expires Thu, 19 Nov 1981 08:52:00 GMT | |
| Pragma no-cache |
This file contains hidden or 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 | |
| /** | |
| * fetch_multi_url | |
| * | |
| * @param array $urls URLの配列 | |
| * @param integer $timeout タイムアウト秒数、default0秒(タイムアウトなし) | |
| * @return array 結果レスポンス一覧 | |
| */ | |
| function fetch_multi_url( $urls, $timeout = 0 ){ | |
| $mh = curl_multi_init(); |
This file contains hidden or 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
| フォローしてる user_id 一覧 | |
| フォローされてる user_id 一覧 | |
| ブロックしてる user_id 一覧 |
This file contains hidden or 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 | |
| $vcap_services = json_decode( getenv( "VCAP_SERVICES" ) ); | |
| $credentials = $vcap_services->{"redis-2.2"}[0]->credentials; | |
| $host = $credentials->host; | |
| $port = $credentials->port; | |
| $pass = $credentials->password; | |
| ini_set( 'session.save_handler', 'redis' ); | |
| ini_set( 'session.save_path', "tcp://{$host}:{$port}?auth={$pass}" ); |
This file contains hidden or 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
| <script type="text/javascript" src="chimpo.js"></script> | |
| <button onclick="chimpo()">「ちんぽ」表示</button> |
This file contains hidden or 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
| stdClass Object | |
| ( | |
| [id] => 3163465 | |
| [kind] => user | |
| [permalink] => mgng | |
| [username] => mgng | |
| [uri] => https://api.soundcloud.com/users/3163465 | |
| [permalink_url] => http://soundcloud.com/mgng | |
| [avatar_url] => https://i1.sndcdn.com/avatars-000013936604-9iswyu-large.jpg?afed582 | |
| [country] => Japan |