Skip to content

Instantly share code, notes, and snippets.

<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">
(源: 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>它包括足夠的細節:
au pasted "for danb ":
var initialCoord = '__UP_initial_coord__';
var sview = new SocialCalc.SpreadsheetViewer();
if (initialCoord != 'A1' && /^[A-Z]+\d+$/.test(initialCoord)) {
sview.editor.StatusCallback.Socialtext = {
func: function (editor, status, arg) {
if (status == 'doneposcalc') {
var cr = SocialCalc.coordToCr(initialCoord);
editor.ScrollRelativeBoth(
@audreyt
audreyt / gist:834671
Created February 19, 2011 00:31 — forked from fujiwara/gist:732822
mt.psgi (for both Melody and MT5)
#!/usr/bin/env perl
use strict;
use warnings;
use File::Basename;
use Plack::Builder;
use Plack::App::CGIBin;
my $basedir = dirname(__FILE__);
@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);
DEBUG = false
class Parser
constructor:
( @receiver = new Receiver
, @throwOnError = true
, @partial = false
, @wrap = @receiver.wrap
, @input = ""
, @buffer = ""
mul_n_sum :: String -> Int
mul_n_sum str = result
where
result = sum value_of_lines
value_of_lines = [ field1 * field2 | [field1, field2] <- field_lines ]
field_lines = [ [read txt1, read txt2] | [txt1, txt2] <- txt_lines ]
txt_lines = [ words line | line <- lines str ]
@audreyt
audreyt / TableTools.coffee
Created January 9, 2012 14:35
CKEditor Row/Column Movement plugin
CKEDITOR.on 'instanceCreated', ({editor}) -> editor.on 'pluginsLoaded', ->
{TRISTATE_OFF: ENABLED, TRISTATE_DISABLED: DISABLED} = CKEDITOR
RedrawSubMenuName = null
OffsetsByLevel = []
row = editor.getMenuItem('tablerow')
rowItems = row.getItems()
row.getItems = ->
sel = editor.getSelection()
CKEDITOR.tools.extend {
@audreyt
audreyt / monkey-ministry-of-truth.pl
Created February 17, 2012 08:38
The "Monkey's Ministry of Truth" strategy for Iterated Prisoner Dilemma
au => -> :@theirs, *% {
use MONKEY_TYPING;
my role TRUE {};
augment class Bool {
method Stringy(Bool:D:) {
self.^does(TRUE) ?? 'True' !! 'False'
}
}
False but TRUE;
},