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 | |
/** | |
* Script to test session data sharing in http and https versions | |
* Theme: session initiated by HTTP should be accessible to HTTPS and vice-versa | |
* http://localhost/https/session.php | |
* https://localhost/https/session.php | |
*/ | |
session_start(); | |
header('Content-Type: text/plain'); |
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
if(emtpy($_SERVER['REMOTE_ADDR'])) | |
{ | |
$_SERVER['REMOTE_ADDR'] = '127.0.0.1'; | |
} | |
if(emtpy($_SERVER['SERVER_NAME'])) | |
{ | |
$_SERVER['SERVER_NAME'] = 'localhost'; | |
} |
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
UPDATE mantis_user_table SET PASSWORD=MD5('PASSWORD'), enabled=1, protected=0, access_level=90 WHERE username='USERNAME'; |
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
mysqldump --routines --no-data --no-create-info -hHOSTNAME -uUSERNAME -pPASSWORD DATABASE> ROUTINES.dmp |
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
-- http://www.sqlexamples.info/SPAT/mysql_distance.htm | |
DROP FUNCTION IF EXISTS fn_distance; | |
DELIMITER $$ | |
CREATE FUNCTION fn_distance( | |
p_x1 FLOAT, p_y1 FLOAT, | |
p_x2 FLOAT, p_y2 FLOAT | |
) | |
RETURNS FLOAT | |
DETERMINISTIC | |
BEGIN |
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 | |
/** | |
* Finds out any missing ID in an auto-increment column of a table | |
*/ | |
error_reporting(E_ALL | E_STRICT); | |
$auto_increment_column = 'id'; | |
$table = '_sample_table'; | |
mysql_connect('HOSTNAME', 'USERNAME', 'PASSWORD') or die('Error connecting the database'); |
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
SELECT SUBSTR(RAND(), -1, 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
!defined('CONSTANT_NAME') || define('CONSTANT_NAME', 'CONSTANT_VALUE'); |
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
CREATE TABLE `random_numbers` ( | |
`random_number` VARCHAR(20) NOT NULL COMMENT 'Random Number', | |
PRIMARY KEY (`random_number`), | |
KEY `random_number_key` (`random_number`) | |
); | |
SELECT LENGTH(RAND()); # Length varies | |
DROP PROCEDURE IF EXISTS p_generate_random_numbers; | |
DELIMITER $$ |
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
No Machine | |
Teamviwer | |
AmmyAdmin | |
CrossLoop | |
imPcRemote | |
Shareme | |
Log Me In | |
Join.me | |
WebEx Free | |
Real VNC |