Skip to content

Instantly share code, notes, and snippets.

View caasi's full-sized avatar
🏝️
Spiritual Homeland

Isaac Huang caasi

🏝️
Spiritual Homeland
View GitHub Profile
type Entry = {
  h: {
    d: {
      f: string,
      s?: string[],
      e?: string[],
      type?: string
    }[]
 }[],
@caasi
caasi / make-doc.md
Created September 26, 2018 02:15
make MMIX doc in macOS
brew cask install basictex
brew cask install cweb
tlmgr conf texmf TEXMFHOME "~/Library/texmf:/usr/local/Cellar/cweb/<version>/share/texmf"
sudo tlmgr install epsf
make doc

The `` in the third line should currently be 3.64b.

function func0() { throw new Error('oops'); }
function func1() { return console.log('foo') || Promise.resolve('bar'); }
async function main() {
try {
await func0();
await func1();
} catch (e) {
console.error(e);
@caasi
caasi / tmp.js
Last active August 18, 2018 16:31
verfyRecap()
    .then((response) => {
      console.log(response.data);
      if (....) {
        doSomeThingSync();
      }
    })
    .catch((error) => {
      .....
      console.log(error);
module Main where
import Data.Functor.Constant
import Data.Bifunctor
data Riap b a = Riap a b
-- data PreList a b
-- = Nil
-- | PreList a b
// lib types
interface A {
type: string;
}
function isA(a: any): a is A {
return !!a.type;
}
interface B {
@caasi
caasi / h.js
Last active May 14, 2018 02:59
hypothesis annotation row
{
// 群組
"group":"__world__",
// 定位文字用的資訊
"target":[
{
// URL
"source":"https://cindylinz.github.io/Article/2018.1.27-legal-low-paid-job.html",
// 以三組 selector 定位文字
"selector":[
type Dispatch = any;
type Action<T> = (dispatch: Dispatch) => Promise<T>;
const actionA: (string) => Action<string> =
(foo) => async (dispatch) => {
dispatch('tell redux to do something');
return 'foo';
}
反黑箱服貿協議・守護民主日與夜 直播人 更新人 g0v.today 每 3 分鐘更新, hackfoldr.org 每分鐘更新
https://web.archive.org/web/20140327051942/newday.tw 讓晨曦照亮民主 守護民主手環:important even
https://inlivetw.github.io/chrome inLiveTW 直播 最新資訊:important au
http://ecfa.speaking.tw/ 服貿跑馬燈 {"expand":false}
http://fact.g0v.tw/tisa.html 服貿跑馬燈-時間軸
http://ecfa.speaking.tw/imho.php 服貿東西軍 更新前請 *務必* 先刷新整頁試算表再改,感謝!
https://sites.google.com/site/twdstreet/ 公民審服貿 街頭民主審議:info
行動
http://123.g0v.today/ 三動作護台灣 致電立委:important ipa
http://appy.tw/ 割闌尾計畫 {"target": "_blank"} 罷免連署:important lee
import QtQuick 2.0
Rectangle {
width: 360
height: 360
Text {
text: qsTr("Hello World")
anchors.centerIn: parent
}