Skip to content

Instantly share code, notes, and snippets.

View caasi's full-sized avatar
🐫
Learning OCaml

Isaac Huang caasi

🐫
Learning OCaml
View GitHub Profile
const actions = [
() => Promise.resolve(0),
() => Promise.resolve(1),
() => Promise.resolve(2),
() => Promise.resolve(3),
() => Promise.reject(new Error('4')),
() => Promise.resolve(5),
() => Promise.reject(new Error('6')),
() => Promise.reject(new Error('7'))
]
@caasi
caasi / fact.js
Created January 5, 2017 07:28 — forked from lancetw/fact.js
var fact = (function (fact) {
return (function (f) {
return f(function (f) {
return fact(function (n) {
return f(f)(n)
})
})
})(function (f) {
return f(f)
})
@caasi
caasi / g0v-rainbow.svg
Last active November 27, 2016 17:43 — forked from clkao/g0v-rainbow.svg
g0v-rainbow.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@caasi
caasi / javascript_resources.md
Last active August 29, 2015 14:19 — forked from jookyboi/javascript_resources.md
Here are a set of libraries, plugins and guides which may be useful to your Javascript coding.

Libraries

  • jQuery - The de-facto library for the modern age. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.
  • Backbone - Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.
  • AngularJS - Conventions based MVC framework for HTML5 apps.
  • Underscore - Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects.
  • lawnchair - Key/value store adapter for indexdb, localStorage
@caasi
caasi / 0_reuse_code.js
Last active August 29, 2015 14:19
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@caasi
caasi / post-ld25.md
Last active December 9, 2015 19:49 — forked from anonymous/post-ld25

Curse You! - Postmortem

雖然鼓起勇氣參加 Ludum Dare,考慮到要是給自己太大的壓力,會影響到活動結束後的生活,決定抱著輕鬆的態度參加。

剛看到題目「You are the Villain」其實很困擾,本來以為題目會更抽象一點。單純當壞人搞破壞的主題滿常見的,所以打算給自己多一點時間想想,卻滿腦子都是鴨嘴獸派瑞與杜芬舒斯這一對XD。

前幾個小時都在塗鴉。那時候的想法其實比較長,希望我的怪盜紳士與警探至少追逐了三段才逃脫,包含更多不同的動作與特效。但動手後才發現這樣以畫面為基礎的發想,對不熟悉點繪的我來說,很要命,經過幾次試畫後,才變成現在這個樣子。

之所以選擇 80x60然後放大到 640x480,也是因為不擅長點繪。低解析度可以不用那麼具象,但怎麼樣在這樣的解析度畫出看得懂的東西又是一個難題。從這次的結果看來,也許使用多一點顏色效果會更好。

@caasi
caasi / rounded_box_gist.css
Created June 16, 2012 11:35 — forked from cowboycoded/rounded_box_gist.css
styles for rounded box gist
.gist{
margin: 15px 0 !important;
}
.gist-file{
border: none !important;
}
.gist-meta{
background-color: #1D1D1D !important;