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
::-webkit-scrollbar { | |
width: 15px; | |
} | |
::-webkit-scrollbar-track { | |
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3); | |
background-color: #fff; | |
} | |
::-webkit-scrollbar-thumb { |
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
background: url('../image/site/bg.jpg') no-repeat center center fixed; | |
-webkit-background-size: cover; | |
-moz-background-size: cover; | |
-o-background-size: cover; | |
background-size: cover; |
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
function gets(storage) | |
{ | |
var array; | |
if(!localStorage[storage]) array = []; | |
else array = JSON.parse(localStorage[storage]); | |
return array; | |
} | |
function get(storage, id) | |
{ |
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 | |
// Turn off all error reporting | |
error_reporting(0); | |
// Report simple running errors | |
error_reporting(E_ERROR | E_WARNING | E_PARSE); | |
// Reporting E_NOTICE can be good too (to report uninitialized | |
// variables or catch variable name misspellings ...) |
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
/** | |
* Returns a random number between min and max | |
*/ | |
function getRandomArbitary (min, max) { | |
return Math.random() * (max - min) + min; | |
} | |
/** | |
* Returns a random integer between min and max | |
* Using Math.round() will give you a non-uniform distribution! |
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 (!Modernizr.svg) { | |
$('img[src$=".svg"]').each(function() | |
{ | |
$(this).attr('src', $(this).attr('src').replace('.svg', '.png')); | |
}); | |
} |
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
$.getJSON("http://twitter.com/statuses/user_timeline/username.json?callback=?", function(data) { | |
$("#twitter").html(data[0].text); | |
}); |
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
function array_flip (trans) { | |
// http://kevin.vanzonneveld.net | |
// + original by: Kevin van Zonneveld (http://kevin.vanzonneveld.net) | |
// + improved by: Pier Paolo Ramon (http://www.mastersoup.com/) | |
// + improved by: Brett Zamir (http://brett-zamir.me) | |
// * example 1: array_flip( {a: 1, b: 1, c: 2} ); | |
// * returns 1: {1: 'b', 2: 'c'} | |
// * example 2: ini_set('phpjs.return_phpjs_arrays', 'on'); | |
// * example 2: array_flip(array({a: 0}, {b: 1}, {c: 2}))[1]; | |
// * returns 2: 'b' |
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
Check the web site programming language you know: | |
<form action="script.php" method="post"> | |
<input type="checkbox" name="chb[]" value="html" />HTML<br/> | |
<input type="checkbox" name="chb[]" value="css" />CSS<br/> | |
<input type="checkbox" name="chb[]" value="javascript" />JavaScript<br/> | |
<input type="checkbox" name="chb[]" value="php" />php<br/> | |
<input type="checkbox" name="chb[]" value="python" />Python<br/> | |
<input type="checkbox" name="chb[]" value="net" />Net<br/> | |
<input type="button" value="Click" id="btntest" /> | |
</form> |