Skip to content

Instantly share code, notes, and snippets.

View timdream's full-sized avatar
🏃‍♂️
I may be slow to respond.

Timothy Guan-tin Chien timdream

🏃‍♂️
I may be slow to respond.
View GitHub Profile
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations]
"AllowFontAntiAlias"=dword:00000001
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp]
"AllowFontAntiAlias"=dword:00000001
"ColorDepth"=dword:00000004
<!--
GFX API 懶惰測試頁 -
用 Firebug 看資料結構吧。
-->
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script>
var c;
$(function() {
$.getJSON(
default menu.c32
prompt 0
menu title Ubuntu Live USB
#timeout 100
timeout 30
label unetbootindefault
menu label Ubuntu (^Persistent Mode)
kernel /ubnkern
append initrd=/ubninit file=/cdrom/preseed/ubuntu.seed boot=casper persistent noprompt quiet splash --
make wget-en-US EN_US_BINARY_URL=http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-trunk/
make unpack
hg -R ../../../repo/mozilla-central pull
make ident
make ident | awk '{print $2}' | head -n 1 | xargs hg -R ../../../repo/mozilla-central update -r
. $topsrcdir/browser/config/mozconfig
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../../firefox-build
ac_add_options --disable-compile-environment
ac_add_options --with-l10n-base=/home/timdream/repo/l10n-central
mk_add_options MOZ_MAKE_FLAGS="-j4"
@timdream
timdream / gist:668645
Created November 9, 2010 03:22
Anyone knows how to check values in a loop w/o that flag variable? Would label statement help?
function doSomethingWithArray(arr) {
// check the array
var flag = false;
for (var i; i < arr.length; i++) {
if (arr[i] === 0) {
console.log('item at ' + i.toString(10) + 'is zero.');
flag = true;
break;
@timdream
timdream / gist:668656
Created November 9, 2010 03:35
One of the possible yet ugly answer to get rid of flag variable
function doSomethingWithArray(arr) {
doArray : {
// check the array
for (var i; i < arr.length; i++) {
if (arr[i] === 0) {
console.log('item at ' + i.toString(10) + 'is zero.');
flag = true;
<?php
header('Content-Type: text/plain');
/* Keep the location of this file secret so we won't overload the sharehosting */
$CONF = array(
'path' => '../2011',
'user' => 'timdream',
'repo' => 'coscup-landingpage',
@timdream
timdream / sponsors.js
Created March 30, 2011 16:09
贊助商列表 JSON
{
gold: [
{
name : '測試廠商',
url: 'http://...../',
logoURL: 'http://..../...png',
desc: '<p>dsfasdfsdaf</p><p>dfasdfd<a href="dsafsad">asdfdsaf </a>sfsaf.</p>', /* 轉好的 HTML */
enName: 'Test Corp.',
enDesc: '<p>dsfasdfsdaf</p><p>dfasdfd<a href="dsafsad">asdfdsaf </a>sfsaf.</p>'
}
@timdream
timdream / sessions.js
Created March 30, 2011 16:23
議程 JSON
[
{
name: '測是',
from: 1234456788, /* Unix timestamp */
to: 123456778,
type: 1,
room: 0,
language: 'zh', /* 'zh' or 'en', 我們應該不會有日文議程 */
speaker: '陳愛講', /* 名字 (頭銜)*/
speakerTitle: '測試大學愛講系教授',