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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>droppable demo</title> | |
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.0/themes/base/jquery-ui.css"> | |
<style> | |
.draggable { | |
width: 100px; | |
height: 20px; |
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
<html> | |
<head> | |
<title>photobooth</title> | |
<link href="bootstrap/css/bootstrap.min.css" rel="stylesheet" media="screen"> | |
</head> | |
<body> | |
<div class="container"> | |
<div class="row-fluid"> | |
<span>Step 1</span> | |
<img src='http://placehold.it/125x125&text=lomo' onClick='setFilter("lomo")'> |
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 sedReplace () { | |
if [ -z "$1" ] || [ -z "$2" ] | |
then | |
echo "\nUsage: sedReplace <path> <sed_string>\nsedString example: \"s/replace_this/with_that/g\"\n" | |
return 1 | |
fi | |
eval "find $1 -type f -exec sed -i '' '$2' {} \;" | |
return 0 | |
} |
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
minified: | |
var n=9;for(var i=1;i<n*2;i++){for(var s=n-(Math.abs(i-n)),k=s-1;k>0;k--){s=[k,s,k].join("");}console.log(new Array(Math.abs(i-n)+2).join(" ")+s);} | |
146 characters | |
Clean: | |
var num = 9; | |
for(var i = 1; i < num*2; i++ ) { | |
var seq = num-(Math.abs(i-num)); |
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
module.js | |
``` | |
module.exports = function () { | |
return { | |
name: 'default', | |
set: function (name) { | |
this.name = name; | |
}, | |
... | |
}; |