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
// extend.js | |
// Written by Andrew Dupont, optimized by Addy Osmani | |
function extend( destination, source ) { | |
var toString = Object.prototype.toString, | |
objTest = toString.call({}); | |
for ( var property in source ) { | |
if ( source[property] && objTest === toString.call(source[property]) ) { |
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 src = document.querySelector("video"); | |
src.addEventListener("click", function() { | |
this.paused === true ? this.play() : this.pause(); | |
}); |
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
Show hidden characters
{ | |
"preset": "google", | |
//"preset": "airbnb", | |
"validateIndentation": 4, | |
"requireLineBreakAfterVariableAssignment": true, | |
"requireLineFeedAtFileEnd": true, | |
"requireNewlineBeforeSingleStatementsInIf": true, | |
"requireObjectKeysOnNewLine": true, | |
"requireOperatorBeforeLineBreak": [ | |
"?", |
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
root = true | |
[*] | |
indent_style = tab | |
indent_size = 4 | |
end_of_line = lf | |
charset = utf-8 | |
trim_trailing_whitespace = true | |
insert_final_newline = true |
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 listFolderFiles($dir){ | |
$foldersAndFiles = scandir($dir); | |
foreach($foldersAndFiles as $item){ | |
if (!in_array($item,array(".",".."))){ // scandir() adds . and .. to the array | |
// Write it out if its an image |
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
/** | |
* | |
* Author: Anton Furuholm | |
* An Easy and lightweight library for writing faster JavaScript | |
* | |
*/ | |
/** | |
* | |
* Functions: |
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 gallery = { | |
container: null, | |
containerPadding:0, | |
containerWidth:0, | |
itemsArray:[], | |
itemMargin:0, | |
items:[], // Array of all the <img> | |
count:[], | |
maxWidth:0, |
NewerOlder