Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env node
var threadCount = 4;
var threadPool = require('webworker-threads').createPool(threadCount);
threadPool.load('gistfile2.js');
threadPool.all.emit('init');
threadPool.on('message', function threadMessage(data) {
console.log(this.id + ': ' + data);
@GarconsdeCrystal
GarconsdeCrystal / private.ls
Created October 23, 2021 14:12 — forked from audreyt/private.ls
Private instance variable in LiveScript
class Container
->
secret = 3
@dec = ->
return false unless secret > 0
return secret--
x = new Container
console.log x.dec!
console.log x.dec!
/**
* Conway's Game of Life, in LiveScript
* ====================================
*
* Conway's Game of Life is a cellular automaton, published by John H Conway
* in 1970, fulfilling the design principles but greatly simplifying the
* research of von Neumann, into a hypothetical machine that could build
* copies of itself. It is a zero-player game, meaning there is no input, and
* the game will progress on its own with a 'seed', or configuration, to
* begin with.
@GarconsdeCrystal
GarconsdeCrystal / plv8.rb
Created October 23, 2021 14:12 — forked from audreyt/plv8.rb
PLV8 homebrew formula
require 'formula'
class Plv8 < Formula
homepage 'http://code.google.com/p/plv8js/wiki/PLV8'
version '1.4.1'
url 'https://plv8js.googlecode.com/files/plv8-1.4.1.zip'
sha1 'ceb7579b1fae1c1fe795c03a23471fdf9c7c469e'
head 'https://code.google.com/p/plv8js/', :using => :git
@GarconsdeCrystal
GarconsdeCrystal / postgresql-9.3.diff
Created October 23, 2021 14:12 — forked from audreyt/postgresql-9.3.diff
Pg93 for homebrew
diff --git a/Library/Formula/postgresql.rb b/Library/Formula/postgresql.rb
index d1a2e77..da1c030 100644
--- a/Library/Formula/postgresql.rb
+++ b/Library/Formula/postgresql.rb
@@ -2,9 +2,11 @@ require 'formula'
class Postgresql < Formula
homepage 'http://www.postgresql.org/'
- url 'http://ftp.postgresql.org/pub/source/v9.2.4/postgresql-9.2.4.tar.bz2'
- sha1 '75b53c884cb10ed9404747b51677358f12082152'

淡入 一群身著制服,表情嚴肅的軍官。)

會議桌的主位上,一位資深高階 將軍 正在說話。

將軍:報告已經證實了,紐約市已經…被殭屍占領了。

上校:又來了?明明 28 天前才發生過一次殭屍入侵!

將軍:這些僵屍…不一樣。它們是… 哲學 僵屍。

@GarconsdeCrystal
GarconsdeCrystal / mps.html
Created October 23, 2021 14:11 — forked from audreyt/mps.html
Experimental MPS layout
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html lang="zh-hant-TW" class="han-biaodian-pro han-la">
<head id="Head1"><meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>你敢有聽著咱的歌 Lí kám-ū thiann-tio̍h lán-ê kua</title>
<base target="moedict">
<link rel="stylesheet" href="han.css">
<link rel="stylesheet" href="style.css">
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>

Opening

Many of you, like me, have taken to the streets more than once this year.

At the end of last year, a series of events caused considerable concern over the deterioration in the state of democracy in Taiwan. As a result, a group of friends who work in the IT industry founded a movement called “g0v.tw” — “0” as in “007.”

The goal of g0v is to improve information transparency in the government. Using modern technology, we aim to transform society and ensure that its citizens are both heard and seen.

To have a voice, we organized a large amount of data, wrote many lines of code and built websites, so that the public can gain a deeper understanding about various issues and become more willing to participate in such matters. Why do we want to stay in front of the computer all day, instead of going out and having fun?

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
// Generated by CoffeeScript 1.6.2
(function() {
'use strict';
var cleanModuleName, coffeescript, commonJsWrapper, createJoinConfig, deepFreeze, exec, extend, fs, getConfigDeprecations, http, indent, install, logger, normalizeChecker, normalizeConfig, normalizeDefinition, normalizeWrapper, os, recursiveExtend, replaceSlashes, setConfigDefaults, sysPath;
exec = require('child_process').exec;
coffeescript = require('coffee-script');
http = require('http');