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 | |
$ipthing = "192.168.1.201"; | |
$ipsubthing = "*.*.*.201"; | |
if(isipinsub ($ipthing, $ipsubthing)) {echo "It's in the subnet."; } else { echo "Nope."; } | |
#---------------------------------# | |
#------isipinsub function---------# |
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 uExtractNumberFromString(mobile) from customer_masterCREATE FUNCTION `uExtractNumberFromString`(in_string varchar(50)) RETURNS INT | |
NO SQL | |
BEGIN | |
DECLARE ctrNumber varchar(50); | |
DECLARE finNumber varchar(50) default ' '; | |
DECLARE sChar varchar(2); |
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
$.ajax({ | |
type: "POST", | |
url: "some.php", | |
data: {id : menuId}, | |
dataType: "json", | |
success: function(data){ | |
}, | |
error: function (xhr, ajaxOptions, thrownError) { | |
alert(xhr.status + ' ' + thrownError); | |
} |
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
mysqladmin -u root -p'oldpass' password 'newpass' |
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
curl -I -H 'Accept-Encoding: gzip,deflate' http://www.example.com/ |
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
var isInIFrame = (window.location != window.parent.location) ? true : false; |
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 | |
//this functin processes the server return codes and generates errors if needed | |
function server_parse($socket, $expected_response) | |
{ | |
$server_response = ''; | |
while (substr($server_response, 3, 1) != ' ') | |
{ | |
if (!($server_response = fgets($socket, 256))) | |
echo 'Couldn\'t get mail server response codes. Please contact the forum administrator.', __FILE__, __LINE__; |
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 | |
$spam = file_get_contents('http://www.stopforumspam.com/api?' . http_build_query(array('email' => pun_trim($_POST['req_email1']), 'f' => 'json'))); | |
$json = json_decode($spam); | |
if ($json->email->appears == 1) { | |
header("HTTP/1.1 403 Unauthorized", 403); | |
die("We don't like spammers. Clean up your name at http://www.stopforumspam.com/ "); | |
} |
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 | |
function xmlsafe($string) { | |
$replace = array( | |
'"'=> """, | |
"&" => "&", | |
"'"=> "'", | |
"<" => "<", | |
">"=> ">" | |
); | |
return strtr($string, $replace); |
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
@iterations: 30; | |
.loopingClass (@iterations); | |
// helper class, will never show up in resulting css | |
// will be called as long the index is above 0 | |
.loopingClass (@index) when (@index > 0) { | |
~.ico@{index} { | |
// your resulting css |