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 | |
// Functions to fetch public tweets of any user | |
// Let's update this | |
function get_tweets($screen_name = 'vinnizworld'){ | |
$api_url = "https://api.twitter.com/1/statuses/user_timeline.json"; | |
$feed = $api_url."?screen_name=".$screen_name."&limit=20"; | |
$headers = get_headers($feed); |
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 | |
//Check the availability of Domain Name | |
function check_domain_availability($domain) | |
{ | |
$recordexists = checkdnsrr($domain, "ANY"); | |
if ($recordexists) echo "The domain name has been taken. Sorry!"; | |
else echo "The domain name is available!"; | |
} |
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
.grid-overlay:before { | |
content: ""; | |
position: fixed; | |
background-color: rgba(34,102,153,0.5); | |
background: -webkit-linear-gradient(skyblue 2px, transparent 2px), -webkit-linear-gradient(0, skyblue 2px, transparent 2px), -webkit-linear-gradient(skyblue 1px, transparent 1px), -webkit-linear-gradient(0, skyblue 1px, transparent 1px); | |
background: -moz-linear-gradient(skyblue 2px, transparent 2px), -moz-linear-gradient(0, skyblue 2px, transparent 2px), -moz-linear-gradient(skyblue 1px, transparent 1px), -moz-linear-gradient(0, skyblue 1px, transparent 1px); | |
background: -o-linear-gradient(skyblue 2px, transparent 2px), -o-linear-gradient(0, skyblue 2px, transparent 2px), -o-linear-gradient(skyblue 1px, transparent 1px), -o-linear-gradient(0, skyblue 1px, transparent 1px); | |
background: -ms-linear-gradient(skyblue 2px, transparent 2px), -ms-linear-gradient(0, skyblue 2px, transparent 2px), -ms-linear-gradient(skyblue 1px, transparent 1px), -ms-linear-gradient(0, skyblue 1px, transparent 1px); | |
background |
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
// Event listener for all browsers | |
// Including some comments | |
var addEvent = (function () { | |
var filter = function(el, type, fn) { | |
for ( var i = 0, len = el.length; i < len; i++ ) { | |
addEvent(el[i], type, fn); | |
} | |
}; | |
if ( document.addEventListener ) { |
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
AddType text/cache-manifest manifest | |
RewriteEngine On | |
# Put your installation directory here: | |
# If your URL is www.example.com/, use / | |
# If your URL is www.example.com/site_folder/, use /site_folder/ | |
RewriteBase / | |
# Do not enable rewriting for files or directories that exist |
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
.grid-overlay:before { | |
content: ""; | |
position: fixed; | |
background-color: rgba(34,102,153,0.5); | |
background: -webkit-linear-gradient(skyblue 2px, transparent 2px), -webkit-linear-gradient(0, skyblue 2px, transparent 2px), -webkit-linear-gradient(skyblue 1px, transparent 1px), -webkit-linear-gradient(0, skyblue 1px, transparent 1px); | |
background: -moz-linear-gradient(skyblue 2px, transparent 2px), -moz-linear-gradient(0, skyblue 2px, transparent 2px), -moz-linear-gradient(skyblue 1px, transparent 1px), -moz-linear-gradient(0, skyblue 1px, transparent 1px); | |
background: -o-linear-gradient(skyblue 2px, transparent 2px), -o-linear-gradient(0, skyblue 2px, transparent 2px), -o-linear-gradient(skyblue 1px, transparent 1px), -o-linear-gradient(0, skyblue 1px, transparent 1px); | |
background: -ms-linear-gradient(skyblue 2px, transparent 2px), -ms-linear-gradient(0, skyblue 2px, transparent 2px), -ms-linear-gradient(skyblue 1px, transparent 1px), -ms-linear-gradient(0, skyblue 1px, transparent 1px); | |
background |
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
// Menified Version of Smooth scrool Script given below: | |
(function(b){var c=window.location.hash;1<c.length&&(c=b(c),c.length&&b("html,body").animate({scrollTop:c.offset().top},400));b(document).on("click","a",function(c){var a=b(this).attr("href");if(a&&~a.indexOf("#")){var a=a.substr(a.indexOf("#")+1),d=b("a[name="+a+"]"),e=b("#"+a);console.log(a);d=d.length?d:e;d.length&&(c.preventDefault(),b("html,body").animate({scrollTop:d.offset().top},400))}})})(jQuery); |
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
// Placeholder Support for old browsers using JavaScript (without jQuery) | |
// Test on IE6+, Firefox, Chrome | |
if( 'placeholder' in document.createElement('input') == false ){ | |
var inputs = document.getElementsByTagName('input'); | |
for(var i = 0 ; i < inputs.length ; i++ ){ | |
var input = inputs[i], placeholder = input.getAttribute('placeholder'), | |
textColor = input.style.color; | |
if(placeholder){ | |
input.value = placeholder; | |
input.style.color = '#aaa'; |
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 | |
/* Copied from http://in2.php.net/manual/en/function.disk-free-space.php */ | |
// Calculate Disk space and Conversion without loops | |
// Output: 31.24 GB | |
$bytes = disk_free_space("."); | |
$si_prefix = array( 'B', 'KB', 'MB', 'GB', 'TB', 'EB', 'ZB', 'YB' ); | |
$base = 1024; | |
$class = min((int)log($bytes , $base) , count($si_prefix) - 1); | |
echo $bytes . '<br />'; |
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
var ajax = function(a,b,c){var d="",e=/fun/.test(typeof b)?"GET":"POST",c="GET"===e?b:c;xhr=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP");xhr.onreadystatechange=function(){4<=xhr.readyState&&200==xhr.status&&c(xhr.responseText)};if("POST"==e&&/obj/.test(typeof b)){for(var f in b)d+=f+"="+encodeURIComponent(b[f])+"&";d=d.slice(0,-1)}xhr.open(e,a,!0);xhr.setRequestHeader("Content-type","application/x-www-form-urlencoded");xhr.send(d); |
OlderNewer