Skip to content

Instantly share code, notes, and snippets.

@am0c
am0c / gist:962371
Created May 9, 2011 11:22
ubuntu 10.04 lucid daum.net /etc/apt/sources.list
# deb cdrom:[Ubuntu 10.04 LTS _Lucid Lynx_ - Release i386 (20100429)]/ lucid main restricted
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://ftp.daum.net/ubuntu/ lucid main restricted
deb-src http://ftp.daum.net/ubuntu/ lucid main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb http://ftp.daum.net/ubuntu/ lucid-updates main restricted
@am0c
am0c / gist:3979793
Created October 30, 2012 11:59 — forked from aanoaa/gist:3979758
bugzilla-install.sh
#!/bin/sh
BZ_ADMIN_EMAIL='<user>@gmail.com'
BZ_ADMIN_PASSWORD='****'
BZ_ADMIN_REALNAME='realname'
BZ_SERVER_NAME='bz4.localhost'
BZ_URLBASE='http://bz4.localhost/'
BZ_APACHE_GROUP='www-data'
BZ_INSTALL_PATH='/home/bugzilla/public_html/bugzilla'
@am0c
am0c / gist:962378
Created May 9, 2011 11:35
simulating android af_local
#include <stdio.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <netinet/in.h>
#include <unistd.h>
#include <stddef.h>
#include <errno.h>
#include <fcntl.h>
@am0c
am0c / gist:960214
Created May 7, 2011 04:51
perlbrew on eshell
;; eshell init script which let
;; perlbrew to be enabled in emacs eshell environment
;; it is translated from $HOME/perl5/perlbrew/etc/bashrc
;; to elisp script
;;
;; am0c <am0c@perl.kr> http://twitter.com/am0c
;;
(require 'cl)
(defmacro get-home-path () '(getenv "HOME"))

Title: 펄의 구문은 분석될 수 없다: 형식적인 증명 Package: Seoul.pm Category: perl Category: Seoul.pm Author: Jeffrey Kegler

저자

@am0c
am0c / posa.mkdn
Created November 1, 2012 15:15 — forked from audreyt/posa.mkdn
EtherCalc Chapter for POSA

From SocialCalc to EtherCalc

Previously, in The Architecture of Open Source Applications, I described SocialCalc, an in-browser spreadsheet system that replaced the server-centric WikiCalc architecture. SocialCalc performs all of its computations in the browser; it uses the server only for loading and saving spreadsheets.

...diagram on SocialCalc's scalability model...

For the Socialtext team, performance was the primary goal behind SocialCalc's design. The key observation was this: Client-side computation in JavaScript, while an order of magnitude slower than server-side computation in Perl, was much faster than the network latency incurred during AJAX roundtrips.

Toward the end of the AOSA chapter, we introduced simultaneous collaboration on spreadsheets, using a simple, chatroom-like architecture:

@am0c
am0c / gist:3992960
Created November 1, 2012 10:28
copy-region-as-fill in Emacs 24
;; copy region as `fill-region`ed even
;; in longlines-mode or visual-line-mode.
;;
;; thanks to @y0ngbin for this idea.
(global-set-key [?\C-x ?\M-w] 'copy-region-as-fill)
(defun copy-region-as-fill (beg end)
(interactive "r")
(when (region-active-p)
@am0c
am0c / gist:3916541
Created October 19, 2012 06:30
Perl6 bug or not?
am0c@amolap:~/local/pt$ cat MainWindow.pm
use Listener;
class MainWindow {
has Listener $.listener;
}
am0c@amolap:~/local/pt$ cat Listener.pm
use MainWindow;
@am0c
am0c / Hubot::Listener.pm
Created October 19, 2012 05:05
Hubot::Listener.pm6
use v6;
class Hubot::Listener {
has Code $.match is rw;
has Code $.callback is rw; # handles cb => postcircum:<( )>
# .. does not work
method call ($message --> Bool) {
my @matching = $.match.($message);
$ traceroute 64.111.29.139
traceroute to 64.111.29.139 (64.111.29.139), 30 hops max, 60 byte packets
1 192.168.219.1 (192.168.219.1) 29.574 ms 40.702 ms 52.115 ms
2 * * *
3 * * *
4 * * *
5 * * *
6 * * *
7 * * *
8 * * *