Syntax check php files in folders:
find ./foo ./bar \( -name "*.php" -or -name "*.phtml" \) -print0 | xargs -0 -n 1 php -lSyntax check php files in folders:
find ./foo ./bar \( -name "*.php" -or -name "*.phtml" \) -print0 | xargs -0 -n 1 php -l| #!/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" |
Place me.mailcatcher.plist into ~/Library/LaunchAgents, then run launchctl load ~/Library/LaunchAgents/me.mailcatcher.plist.
If you use pow, echo 1080 > ~/.pow/mailcatcher and go to http://mailcatcher.dev, otherwise use http://localhost:1080.
Currently pow doesn't seem to pass websockets through correctly. Looking into this.
| <?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 |
| #!/usr/bin/env sh | |
| # Download lists, unpack and filter, write to stdout | |
| curl -s https://www.iblocklist.com/lists.php \ | |
| | sed -n "s/.*value='\(http:.*=bt_.*\)'.*/\1/p" \ | |
| | xargs wget -O - \ | |
| | gunzip \ | |
| | egrep -v '^#' |
| <?php if (!defined('BASEPATH')) exit('No direct script access allowed'); | |
| /** | |
| * @file application/libraries/Image_autorotate.php | |
| */ | |
| class Image_autorotate | |
| { | |
| function __construct($params = NULL) { | |
| if (!is_array($params) || empty($params)) return FALSE; |
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
| from lxml import etree, objectify | |
| import datetime | |
| import time | |
| import os | |
| import random | |
| PAIN_IDENTIFIER = 'IA' | |
| XSD_PATH = 'xsd' | |
| class PainError(Exception): |