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
<target name="checkshorttags"> | |
<!-- Run in parallel to speed up process. --> | |
<exec | |
escape="false" | |
command='GREPOUT=`find . -not -ipath "*vendor*" -type "f" -name "*.php" -print0 | xargs -0 -n1 -P$(nproc) pcregrep -nrHMe "<\?\s"`; | |
echo "$GREPOUT"; | |
if [ -z "$GREPOUT" ]; | |
then exit 0; | |
else exit 1; | |
fi; |
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
#!/usr/bin/perl -w | |
# | |
# $Id$ | |
# | |
# Logwatch service for php error logs | |
# To be placed in | |
# /etc/logwatch/scripts/php | |
# | |
# Processes all messages and summarizes them | |
# Each message is given with a timestamp and RMS |
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 | |
/* Emulate register_globals behavior: | |
* | |
* @see http://php.net/manual/en/ini.core.php#ini.variables-order | |
* | |
* If variables_order is set to "EGPCS", and both $_GET['action'] and | |
* $_POST['action'] are set, then $action will contain the value of | |
* $_POST['action'] as P comes after G in our example directive value. | |
* | |
* @param bool $include_session Whether to register session variables or not. |
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
The opcache for PHP (previously Zend Optimizer+) depends on the filemtime to identify when to reinterpret the opcode for a file. If a file is changed, the system's clock is changed back (through NTP or other means), any changes to the file up until the previously set date/time will not be caught by the opcache. |
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
#!/usr/bin/env php | |
<?php | |
class Person | |
{ | |
public $first_name; | |
public $last_name; | |
public function getFullName() | |
{ |
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
{ | |
"minimum-stability": "stable", | |
"require": { | |
"cakephp/cakephp": "2.6.8" | |
}, | |
"config": { | |
"vendor-dir": "Vendor" | |
}, | |
"require-dev": { | |
"cakephp/debug_kit": "2.2.x-dev" |
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
<!-- /etc/firewalld/zones/docker.xml --> | |
<zone> | |
<short>Docker</short> | |
<description>Permits docker containers to access eachother.</description> | |
<interface name="docker0" /> | |
<rule family="ipv4"> | |
<source address="172.17.0.0/16" /> | |
<accept/> | |
</rule> | |
</zone> |
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
#!/bin/sh | |
if test $# -lt 1 ; then | |
echo "Usage: download_apk.sh <target-dir>" | |
exit 1 | |
fi | |
for LINE in $(adb shell pm list packages -f -3|sed 's/package://g'); do | |
APK_PATH=$(echo "$LINE" | cut -d'=' -f1) | |
FILE=$1/$(echo "${LINE}" | cut -d'=' -f2 | sed 's/\r$//').apk |
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
#!/bin/bash | |
SOURCED=0 | |
CD=0 | |
if [[ "${BASH_SOURCE[0]}" != "${0}" ]]; then | |
SOURCED=1 | |
fi | |
if [[ $1 =~ ^(cd|apps|notes|trunk|repos|docker)?$ ]]; then |
OlderNewer