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
// javascript word cut | |
function cut(n) { | |
return function textCutter(i, text) { | |
var short = text.substr(0, n); | |
if (/^\S/.test(text.substr(n))) | |
return short.replace(/\s+\S*$/, ""); | |
return short; | |
}; | |
} |
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
function formatParamsObjectToURL( params ){ | |
return "?" + Object | |
.keys(params) | |
.map(function(key){ | |
return key+"="+encodeURIComponent(params[key]) | |
}) | |
.join("&") | |
} |
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
function scrollToDiv(target) { | |
var loc = $(target).offset(); | |
jQuery("html,body").animate({ | |
scrollTop: loc.top-150//, | |
//scrollLeft: loc.left | |
}); | |
return false; | |
} |
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
Default: | |
find * -type d -exec chmod 755 {} \; | |
find * -type f -exec chmod 644 {} \; | |
For Groups: | |
find * -type d -exec chmod 775 {} \; | |
find * -type f -exec chmod 664 {} \; |
NewerOlder