npm install forever -g
forever --help
forever start app.js
| <?php | |
| $file = new Core\File\RemoteFile('http://bestclipartblog.com/clipart-pics/food-clip-art-6.png'); | |
| // Check if exists: | |
| var_dump($file->exists());// bool(true) | |
| // Get HTTP Status Code | |
| var_dump($file->getHttpStatus()); // int(200) |
| #!/bin/sh | |
| # FuelPHP Install Script | |
| # | |
| # @author Kenji Suzuki https://github.com/kenjis | |
| # @copyright 2011 Kenji Suzuki | |
| # @license MIT License http://www.opensource.org/licenses/mit-license.php | |
| if [ $# -lt 2 ]; then | |
| echo "Install FuelPHP and Create Application Repository" |
| from lxml import etree, objectify | |
| import datetime | |
| import time | |
| import os | |
| import random | |
| PAIN_IDENTIFIER = 'IA' | |
| XSD_PATH = 'xsd' | |
| class PainError(Exception): |
| <?php | |
| namespace App\Redis; | |
| use Redis; | |
| use Illuminate\Redis\Database as RedisDatabase; | |
| use Illuminate\Contracts\Redis\Database as DatabaseContract; | |
| class Database extends RedisDatabase implements DatabaseContract | |
| { |
Before the rest of this gist is useful, you've got to get your Raspberry Pi on the network. I followed the information from the Adafruint Learning System Raspberry Pi tutorials, which can be found at http://learn.adafruit.com/adafruits-raspberry-pi-lesson-3-network-setup.
The two files that are most important are
| <?php | |
| # create our client object | |
| $gmclient= new GearmanClient(); | |
| # add the default server (localhost) | |
| $gmclient->addServer(); | |
| # run email client in the background | |
| $arr = array($_GET['id'],$_GET['msg']); | |
| $data = serialize($arr); //serialize to send data |
| ### No longer needed as of nginx-1.13.6-1.el7_4.ngx.x86_64.rpm from nginx.org | |
| ### it was compiled against OpenSSL 1.0.2 from CentoOS 7.4 so it supports ALPN (HTTP2 works) | |
| yum -y groupinstall 'Development Tools' | |
| yum -y install wget openssl-devel libxml2-devel libxslt-devel gd-devel perl-ExtUtils-Embed GeoIP-devel rpmdevtools | |
| OPENSSL="openssl-1.0.2l" | |
| NGINX_VERSION="1.13.5-1" | |
| NJS_VERSION="1.13.5.0.1.13-1" |
Syntax check php files in folders:
find ./foo ./bar \( -name "*.php" -or -name "*.phtml" \) -print0 | xargs -0 -n 1 php -l