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
gulp = require 'gulp' | |
coffee = require 'gulp-coffee' | |
stylus = require 'gulp-stylus' | |
jade = require 'gulp-jade' | |
paths = | |
app: './', | |
core: './core/*.coffee', | |
coffee: './assets/coffee/*.coffee', | |
stylus: './assets/stylus/*.styl', |
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
#lang racket | |
(define (我是 x n) | |
(cond | |
[(zero? n) '()] | |
[else | |
(cons x (我是 x (- n 1)))])) | |
(define 猪头 .) |
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
<form class="contact-form" action="http://iambition.coding.io/contact/3be865fa-7297-46ff-82c0-46f30085aede" method="POST"> | |
<input type="email" name="from" placeholder="Your email"> | |
<textarea class="content" placeholder="What would you like to say?" rows="5"></textarea> | |
<button type="submit">Submit</button> | |
</form> |
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
$.post('http://iambition.coding.io/contact/3be865fa-7297-46ff-82c0-46f30085aede', { | |
from: 'from@example.com', | |
content: 'hello there!' | |
}, function(data) { | |
if (data.status == 'good') { | |
// do something... | |
} | |
}) |
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
// for big rounded dots | |
<div class="loading-dots big-dots"><i></i><i></i><i></i></div> | |
// for small square dots | |
<div class="loading-dots"><i></i><i></i><i></i></div> | |
<style> | |
.loading-dots i { | |
background-color: $COLOR; // set dots color |
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
{ | |
"name": "kevin" | |
} |
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
$('body') | |
.on('click', '.js-toggler-target', function() { | |
if($(this).attr('aria-label') == 'Star this repository') { | |
console.log('good'); | |
} | |
}) |
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
var y, words, unspaced, split$ = ''.split, replace$ = ''.replace; | |
['a', 'b', 'a', 'b']; | |
['foo', 'bar'].join(', '); | |
y = 2; | |
repeatString$('z', y); | |
words = split$.call(text, ' '); | |
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
# when the left one is an array literal | |
['a' 'b'] * 2 # array repetition | |
# when the right one is a string literal | |
<[ foo bar ]> * ', ' # array joining | |
# or when the left one is a string | |
y = 2 | |
'z' * y # string repetition | |
words = text / ' ' # string division |
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
// | |
my? | |
#normal | |
#{[interpolation]} | |
#flag | |
//? |