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
http://whois.domaintools.com/IP.ADD.RE.SS |
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
DROP TABLE IF EXISTS agro_produce_prices_histories; | |
CREATE TABLE agro_produce_prices_histories ( | |
agro_produce_prices_history_id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'Price History ID', | |
price_date DATE NOT NULL DEFAULT '0000-00-00' COMMENT 'Date of produce price change', | |
produce_id INT(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT 'Produce ID', | |
produce_price FLOAT(6,2) UNSIGNED NOT NULL DEFAULT '0.00' COMMENT 'Last Price', | |
PRIMARY KEY (agro_produce_prices_history_id) | |
) ENGINE=INNODB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8; | |
DROP TABLE IF EXISTS agro_produces; |
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/sh | |
REPOS="$1" | |
TXN="$2" | |
# Make sure that the log message contains some text. | |
SVNLOOK=/usr/bin/svnlook | |
SVNLOOKOK=1 | |
$SVNLOOK log -t "$TXN" "$REPOS" | \ | |
grep "[a-zA-Z0-9]" > /dev/null || SVNLOOKOK=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
yum upgrade yum |
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 trigger_name FROM information_schema.triggers WHERE trigger_schema = DATABASE(); | |
-- Issues with NULL fields - accept NULLs | |
DROP TABLE IF EXISTS system_triggers_all; | |
CREATE TABLE `system_triggers_all` ( | |
`trigger_name` VARCHAR(255) DEFAULT '', | |
`event_object_schema` VARCHAR(255) DEFAULT '', | |
`event_object_table` VARCHAR(255) DEFAULT '', | |
`event_manipulation` VARCHAR(255) DEFAULT '', |
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
# http://www.cyberciti.biz/faq/howto-linux-unix-change-setup-timezone-tz-variable/ | |
ln -sf /usr/share/zoneinfo/EST localtime |
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 `PRIVILEGE_TYPE` FROM `INFORMATION_SCHEMA`.`USER_PRIVILEGES` WHERE GRANTEE='''root''@''localhost''' AND PRIVILEGE_TYPE='TRIGGER'; |
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 | |
$ip_address = '127.0.0.1'; | |
if (!empty($_SERVER["HTTP_CLIENT_IP"])) | |
{ | |
$ip_address = $_SERVER["HTTP_CLIENT_IP"]; | |
} | |
else if(!empty($_SERVER["HTTP_X_FORWARDED_FOR"])) | |
{ | |
$ip_address = $_SERVER["HTTP_X_FORWARDED_FOR"]; | |
} |
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
# Week Day in capitals | |
DATE=`date '+%a'|tr '[:lower:]' '[:upper:]'`; | |
echo $DATE |
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 | |
$friend = 'John Doe'; | |
$relation = 'friend'; | |
echo $relation, ': ', $$relation; |