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
// This command line program helps to install 4k or 2k textures in the Zibo's B738 | |
// Author: Alexander Garzon | |
// Multi-platform. It should work with WIN, OS and Linux. Just be sure the file has execution permisstions. | |
// Tested with Zibo 3.31 | |
package main | |
import ( | |
"fmt" | |
"io" |
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
SELECT tblhosting.domain, tblservers.name, tblhosting.domainstatus, tblproducts.name , CONCAT(tblclients.firstname, ' ', tblclients.lastname) AS Client, tblclients.status AS Clientstatus | |
FROM tblhosting | |
LEFT JOIN tblproducts ON tblhosting.packageid = tblproducts.id | |
LEFT JOIN tblservers ON tblhosting.server = tblservers.id | |
LEFT JOIN tblclients ON tblhosting.userid = tblclients.id | |
WHERE tblhosting.domainstatus IN ('Active', 'Suspended') | |
ORDER BY tblservers.id ASC | |
INTO OUTFILE '/tmp/whmcs.csv'; |
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 | |
/* Run this script every 5 minutes (or 1 hour, is up to you) using a cron task */ | |
/* Edit this data*/ | |
$domain = "mydomain.com"; | |
$pass = "xxxxxx"; | |
$host = ""; // Optional, for additional hosts names like: ftp., mail. or any sub-domains. | |
/* DO NOT EDIT FROM HERE */ | |
file_get_contents("http://dynamic.name-services.com/interface.asp?command=SetDNSHost&Zone=@.$domain&DomainPassword=$pass"); |
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 | |
if [ -z "$1" ] | |
then | |
echo "Please provide a domain name as argument" | |
exit 1 | |
fi | |
DOMAIN=$1 | |
IP=`dig +short A $DOMAIN` |
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
find . -name "*.php" -print0 | xargs -0 -n1 -P $(nproc) php -l | grep -v '^No' |
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 | |
#If you want more "passes" change vzun0 for vzun1 or any other number (process will be slower!) | |
find /mnt/backup -type f -print0 | xargs -0 shred -vzun0 |
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 build_calendar($month, $year) { | |
$daysOfWeek = array('S','M','T','W','T','F','S'); | |
$firstDayOfMonth = mktime(0,0,0,$month,1,$year); | |
$numberDays = date('t',$firstDayOfMonth); | |
$dateComponents = getdate($firstDayOfMonth); | |
$monthName = $dateComponents['month']; | |
$dayOfWeek = $dateComponents['wday']; | |
$calendar = "<table class='calendar'>"; | |
$calendar .= "<caption>$monthName $year</caption>"; |
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 | |
/** | |
* Wordpress shell script | |
* Explore Upload folder to remove unused files and save disk space | |
* | |
* @category Wordpress | |
* @package Wordpress.shell | |
* | |
* @author Alexander Garzon <agarzon@php.net> | |
* @license http://www.gnu.org/copyleft/gpl.html GNU General Public License |
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 | |
// Get nameserver from a domain name. | |
function getNameservers($hostname) { | |
$result = dns_get_record($hostname, DNS_NS); | |
foreach($result as $record) { | |
$return[] = $record['target']; | |
} | |
return $return; | |
} |
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
dig +short myip.opendns.com @resolver1.opendns.com |