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
#!/bin/bash | |
brew_command=/usr/local/bin/brew | |
brew_cask_command="$brew_command cask" | |
echo '#!/bin/bash' | |
echo '' | |
echo 'trap ctrl_c INT' | |
echo 'function ctrl_c() {' | |
echo 'echo "** Trapped CTRL-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
//<a href="#home" class="scroll">Home</a> | |
$(".scroll").click(function(event){ | |
event.preventDefault(); | |
var full_url = this.href | |
, parts = full_url.split("#") | |
, trgt = parts[1] | |
, target_offset = $("#"+trgt).offset() | |
, target_top = target_offset.top; |
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> | |
<head> | |
<style> | |
.main { | |
overflow:hidden; | |
border:#000 1px solid; | |
width:450px; | |
position: relative; | |
min-height: 50px; |
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 debouncer = function (func, pTimeout) { | |
var timeoutID, timeout = pTimeout || 200; | |
return function() { | |
var scope = this, args = arguments; | |
clearTimeout(timeoutID); | |
timeoutID = setTimeout(function() { | |
func.apply(scope, Array.prototype.slice.call(args)); | |
}, timeout); | |
}; | |
}; |