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
delay: ( -> | |
timer = 0 | |
(callback, ms) -> | |
clearTimeout timer | |
timer = setTimeout(callback, ms) | |
)() |
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
key_word = "foo" | |
re = new RegExp(key_word, "i") | |
"Foo".match(re) |
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 scrollToTop = function() { | |
// Get link | |
var link = $('#scrollUp'); | |
$(window).scroll(function() { | |
// If the user scrolled a bit (150 pixels) show the link | |
if ($(this).scrollTop() > 150) { | |
link.fadeIn(100); | |
} else { |
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
<pre class="codepen" data-height="250" data-type="css" data-href="decHh" data-user="andymcfee" data-safe="true"> | |
<code> </code> | |
<a href="http://codepen.io/songjiayang/pen/decHh">Check out this Pen!</a> | |
</pre> | |
<script src="http://codepen.io/assets/embed/ei.js"> </script> | |
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='zh-CN'> | |
<head> | |
<meta charset='utf-8'> | |
<title>Title is here!</title> | |
<link rel="stylesheet" href="main.css"> | |
</head> | |
<body> | |
</body> | |
</html> |
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
upstream shellboard_production { | |
server unix:/var/www/shellboard/shared/tmp/sockets/puma.sock; | |
} | |
server { | |
listen 80; | |
set $public /var/www/shellboard/current; | |
server_name www.shellboard.com; | |
location / { |
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
#user nobody; | |
worker_processes 1; | |
#error_log logs/error.log; | |
#error_log logs/error.log notice; | |
#error_log logs/error.log info; | |
#pid logs/nginx.pid; | |
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
class FizzBuzzWhizz | |
def start_game | |
input_numbers | |
warp_numbers_with_bingo_message | |
play | |
end | |
private |
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
jQuery ($)-> | |
_.extend Backgrid.Command.prototype, { | |
save: () -> | |
!@shiftKey && @keyCode is 13 | |
moveUp: () -> | |
@shiftKey && @keyCode is 38 | |