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
for i in {1..10}; do haml -f html5 -q haml/test.haml test/test_${i}.html; done |
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
arr = [1,2,3,4,55] | |
Math.max.apply(null, arr) |
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
ls -l dir/ | grep -v ^l | wc -l |
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
//this solution is much better | |
function typewriter(text, name){ | |
var input = form.find('input[name="'+ name + '"]').val('')[0], | |
s = text.split('').reverse(), | |
len = s.length-1, | |
var initInterval = setInterval(function(){ | |
if( s.length ){ | |
var c = s.pop(); | |
input.value += c; |
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 salary = employees.reduce(function (result, employee) { | |
return result + (employee.sex === 'female') ? employee.salary : false /*or 0*/; | |
}, 0); | |
console.log(salary); |
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
.pages | |
.page | |
&.develop.anim | |
background darken($green, 10%) | |
backTrans() | |
.inner |
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 transparency | |
background-transparency(color, alpha = 1) | |
ms-color = argb(color, alpha) | |
background rgb(color) | |
background rgba(color, alpha) | |
.lt-ie8 & | |
zoom 1 | |
.lt-ie9 & | |
background transparent | |
filter s('progid:DXImageTransform.Microsoft.gradient(startColorstr=%s,endColorstr=%s)', ms-color, ms-color) |
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
/* | |
. .-. | |
| `-. | |
`-' `-' | |
*/ | |
[] + {} | |
// "[object Object]" | |
{} + [] | |
// 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
var Increment = function() { | |
this.int = 0; | |
}; | |
Increment.prototype.toString = function() { | |
return ++this.int; | |
}; | |
var increment = new Increment(); |
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
#without cut | |
link='[email protected]:lvlv/photographer-site.git' && git clone ${link} && _git=${link#*/} && cd $(echo ${_git%.*}) | |
# with "cut" if https - cut -d/ -f5 | cut -d. -f1 | |
link='[email protected]:lvlv/photographer-site.git' && git clone ${link} && name=$( echo $_ | cut -d/ -f2 | cut -d. -f1) && cd ${name} |
OlderNewer