Skip to content

Instantly share code, notes, and snippets.

View audreyt's full-sized avatar

唐鳳 audreyt

View GitHub Profile

開源之道

Original transcript: http://allisonrandal.com/2012/04/15/open-source-enlightenment/

這幾年來,我慢慢覺得,我們參與開源社群,就像是在一條道路上並肩而行:這不僅讓我們成為更好的程式設計者,也讓我們通過與人合作,而成為更好的人。

您可以將它想成一條修行之道,讓身而為人的我們能夠不斷成長。接下來,我想談談我對開源世界的個人觀點,希望能與您分享。

首先,人是一切開源專案的核心。程式碼是很重要,但最核心的永遠是人。

@audreyt
audreyt / posa.mkdn
Last active November 28, 2022 21:24
EtherCalc.tw

從 SocialCalc 到 EtherCalc

先前在《開源應用程式架構》 一書中,我介紹了 SocialCalc 這個在瀏覽器中運行的試算表編輯器,以取代伺服器為中心的 WikiCalc 架構。SocialCalc 在瀏覽器中執行所有的運算,只有在載入和儲存試算表時才會使用伺服器。

追求效能是 Socialtext 團隊在 2006 年時設計 SocialCalc 的主要目的。重點在於:在 JavaScript 環境下執行客戶端運算,儘管在當年的速度僅有伺服器端 Perl 運算的十分之一,但仍然勝過 AJAX 來回傳輸資料造成的網路延遲:


WikiCalc 與 SocialCalc 架構比較

******
(源: http://gist.github.com/479846)
(譯: translate.google.com)
在這個日子正是10年前,喬恩Orwant咖啡杯扔在牆上在會議中。
維基百科方志公佈的Perl 6正就7月19日十年前...而投擲水杯18日,可以說是火花誕生的Perl 6。
為什麼他扔杯子?"拉里牆上的自己的解釋"
<http://www.spidereyeballs.com/os5/set1/small_os5_r06_9705.html>它包括足夠的細節:
@audreyt
audreyt / colorpicker.click.diff
Created April 9, 2011 11:33
Patch to allow ColorPicker work on mobile browsers by handling the "click" event. Repository is here: https://github.com/audreyt/jquery-colorpicker---fixed-for-ie6
diff -dur foo/js/colorpicker.js tmp/js/colorpicker.js
--- foo/js/colorpicker.js 2009-05-23 13:32:36.000000000 +0800
+++ tmp/js/colorpicker.js 2011-04-07 21:05:18.000000000 +0800
@@ -370,6 +370,7 @@
setSelector(col, cal.get(0));
setHue(col, cal.get(0));
setNewColor(col, cal.get(0));
+ cal.data('colorpicker').onChange.apply(cal, [col, HSBToHex(col), HSBToRGB(col)]);
};
return {
@audreyt
audreyt / jedi-daemon
Created August 15, 2011 15:11
「狂賀《簡報原力》登上銷售冠軍」活動機器人
#!/usr/bin/env perl
use 5.10.0;
use utf8;
use LWP::Simple;
use Encode 'encode';
use Encode::MIME::Header;
use File::Slurp 'slurp';
use Email::MIME;
use Email::Sender::Simple qw(sendmail);
<mx:Accordion id="Accordion" left="10" top="10" bottom="10" right="10" visible="true">
<mx:Canvas label="Activities" visible="true" id="PersonActivitiesCanvas"
width="100%" height="100%">
<mx:HTML fontSize="12 location="Loading.html" cornerRadius="5" left="0" top="0" bottom="0" right="0"/>
</mx:Canvas>
<mx:Canvas label="Network" width="100%" height="100%" id="PersonNetworkCanvas">
<mx:Panel id="NetworkPanelLeft" width="47%" left="10" top="3" bottom="27" title="Following {PersonWatchlist.length} people" fontSize="15" cornerRadius="10" fontFamily="Arial">
<mx:List dataProvider="{PersonWatchlist}" itemRenderer="Person"></mx:List>
</mx:Panel>
<mx:Panel id="NetworkPanelRight" top="3" right="10" bottom="27" width="47%" cornerRadius="10" title="{PersonWatchers.length} Followers" fontSize="15">
@audreyt
audreyt / allison-osdctw-2012.md
Created April 15, 2012 12:55
IRC transcript of Allison's OSDC.tw talk

Good collaboration in open source projects

Video recording: https://www.youtube.com/watch?v=E5_tL62mUbc

Over the years, I've started thinking that participating in the open source community is like traveling on a path, toward becoming not only better programmers, but also becoming better people by working together.

You might think of it as a path toward enlightenment, growing ourselves as human beings. So what follows is really my personal philosophy which I'd like to share with you.

The first thing is this: The most important part of every open source project is the people. While code is important, the center is always the people.

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

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

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

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

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

#!/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);
@audreyt
audreyt / private.ls
Created April 30, 2013 16:14
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!