This file contains 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 | |
namespace Codeception\Module; | |
class CakePHPHelper extends \Codeception\Module | |
{ | |
public function __construct() | |
{ | |
define('APP_DIR', 'app'); | |
define('DS', DIRECTORY_SEPARATOR); | |
define('ROOT', getcwd()); |
This file contains 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 | |
/** | |
* Twitter API search images | |
* | |
* @author Alexander Garzon <http://about.me/agarzon> | |
* @license MIT License | |
* @require http://github.com/j7mbo/twitter-api-php | |
*/ | |
//header('Access-Control-Allow-Origin: *'); |
This file contains 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 | |
#ioncube php 5.4 64bit for ubuntu | |
wget http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz | |
tar xvfz ioncube_loaders_lin_x86-64.tar.gz | |
sudo mkdir /usr/lib/php5/modules/ | |
sudo cp ioncube/ioncube_loader_lin_5.4.so /usr/lib/php5/modules/ | |
sudo touch /etc/php5/mods-available/ioncube.ini | |
echo "zend_extension=/usr/lib/php5/modules/ioncube_loader_lin_5.4.so" | sudo tee /etc/php5/mods-available/ioncube.ini | |
sudo php5enmod ioncube |
This file contains 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 perl | |
# This program is part of Percona Toolkit: http://www.percona.com/software/ | |
# See "COPYRIGHT, LICENSE, AND WARRANTY" at the end of this file for legal | |
# notices and disclaimers. | |
use strict; | |
use warnings FATAL => 'all'; | |
use constant MKDEBUG => $ENV{MKDEBUG} || 0; |
This file contains 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 | |
function whois($domain) { | |
// fix the domain name: | |
$domain = strtolower(trim($domain)); | |
$domain = preg_replace('/^http:\/\//i', '', $domain); | |
$domain = preg_replace('/^https:\/\//i', '', $domain); | |
$domain = preg_replace('/^www\./i', '', $domain); | |
$domain = explode('/', $domain); | |
$domain = trim($domain[0]); |
This file contains 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
Options +FollowSymlinks | |
RewriteEngine On | |
RewriteCond %{REQUEST_URI} !/mantenimiento.html$ | |
RewriteCond %{REMOTE_HOST} !^999\.999\.999\.999 | |
RewriteRule $ /mantenimiento.html [R=302,L] |
This file contains 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>CHMOD ONLINE EMULATOR</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta name="description" content="CHMOD ONLINE EMULATOR"> | |
<!-- Twitter Bootstrap --> | |
<link href="http://twitter.github.com/bootstrap/assets/css/bootstrap.css" rel="stylesheet"> |
This file contains 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 | |
function secondsToTime($seconds) { | |
// Extract days | |
$days = floor($seconds / 86400); | |
// Extract hours | |
$divisorHours = $seconds % 86400; | |
$hours = floor($divisorHours / 3600); | |
// Extract minutes |
This file contains 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 | |
#Require root SSH access by authentication file | |
TEMPFILE=`mktemp -p /tmp` | |
HOSTNAME=`hostname` | |
MASTERS=`hostname -i` | |
REMOTE_URI="root@xxx.xxx.xxx.xxx" | |
SLAVE_PATH="/var/named/chroot/etc/" | |
for domain in `egrep '^zone' /etc/named.conf | egrep -iv "arpa|\"\." | egrep -iv "domain.com" | awk -F\" '{print $2}'` | |
do printf "zone \"${domain}\" {\n\t type slave;\n\t file \"/var/named/slaves/${domain}.db\";\n\t masters { ${MASTERS}; };\n};\n\n" |
This file contains 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 | |
/** | |
* Generador de palabras o nombres aleatorios | |
* | |
* @param integer $min longitud mínima de la palabra | |
* @param integer $max longitud máxima de la palabra | |
* @return string palabra generada | |
*/ | |
function nombreAleatorio($min = 3, $max = 10) { |
OlderNewer