Skip to content

Instantly share code, notes, and snippets.

View xatier's full-sized avatar
🍰
吃點心

xatier xatier

🍰
吃點心
  • ド田舎
View GitHub Profile
1.
a) \f.\a.\b.\c.c (f a) (f b)
f = t1
a = t2
f a = t3
=> t1 = t2 -> t3
b = t4
f b = t5
1.
a) \f.\a.\b.\c.c (f a) (f b)
f = t1
a = t2
f a = t3
=> t1 = t2 -> t3
b = t4
f b = t5
@xatier
xatier / gist:4469819
Created January 6, 2013 20:06
my rc.lua diff to the default rc.lua
14,17d13
< -- vicious widgets library
< local vicious = require("vicious")
<
<
45c41
< beautiful.init("/home/xatierlike/.config/awesome/themes/default/theme.lua")
---
> beautiful.init("/usr/share/awesome/themes/default/theme.lua")
47,49c43,45
13a14,17
> -- vicious widgets library
> local vicious = require("vicious")
>
>
41c45
< beautiful.init("/usr/share/awesome/themes/default/theme.lua")
---
> beautiful.init("/home/xatierlike/.config/awesome/themes/default/theme.lua")
43,45c47,49
======================================================
孤獨者
======================================================
小说开头第一句就很特别——
“我和魏连殳相识一场,回想起来倒也别致,竟是以送殓始,以送殓终”。
这是一个暗示:“死亡的轮回”的沉重阴影将笼罩小说人物的命运,以及整篇小说。
-- Empty module to serve as the default current module.
module Hugs where
-- 3 -----------------------------------------------------------------
-- (a
-- 先前算過的 value 會記憶起來,後面要用的時候可以直接 reference 到他
-- 8 + 0 = 8
-- (b
-- 不會先記憶算過的 value,所以每次用到都要重新算過
@xatier
xatier / gist:4692417
Last active December 12, 2015 01:38
$p 是 plurk 的 API ,請參考其他機器人的 code Usage: 給定一個 plurk link ,http://www.plurk.com/p/i3dryq 看 source 可以拿到該噗的 plurk_id => data-pid="1094072786"> 傳給這個 function 即可得到統計資料 原理:爬回應的好友交集,假若交集愈大的話愈可能是匿名噗的主人
sub guess_anon_by_pid {
my $pid = shift;
my %pool;
my @rank = ();
my $response = $p->callAPI('/APP/Responses/get', plurk_id => $pid);
for my $f_list (keys $response->{friends}) {
my $fri = $p->callAPI('/APP/FriendsFans/getFriendsByOffset', user_id => $f_list, limit => 300);
for (@$fri) {
$pool{$_->{display_name}}++ if ($_->{display_name});
@xatier
xatier / gist:4714257
Last active December 12, 2015 04:28
brianfuck on iPad mini
anyasu:~ root# uname -a
Darwin anyasu 13.0.0 Darwin Kernel Version 13.0.0: Wed Oct 10 23:30:00 PDT 2012; root:xnu-2107.2.34~2/RELEASE_ARM_S5L8942X iPad2,5 arm P105AP Darwin
anyasu:~ root# cat hw.b
+++++ +++++ initialize counter (cell #0) to 10
[ use loop to set the next four cells to 70/100/30/10
> +++++ ++ add 7 to cell #1
> +++++ +++++ add 10 to cell #2
> +++ add 3 to cell #3
> + add 1 to cell #4
<<<< - decrement counter (cell #0)
anyasu:~ root# hugs
__ __ __ __ ____ ___ _________________________________________
|| || || || || || ||__ Hugs 98: Based on the Haskell 98 standard
||___|| ||__|| ||__|| __|| Copyright (c) 1994-2005
||---|| ___|| World Wide Web: http://haskell.org/hugs
|| || Bugs: http://hackage.haskell.org/trac/hugs
|| || Version: September 2006 _________________________________________
Haskell 98 mode: Restart with command line option -98 to enable extensions
@xatier
xatier / gist:4942457
Created February 13, 2013 05:15
suck apple builtin tools ...
$ /bin/bash --version
GNU bash, version 3.2.48(1)-release (x86_64-apple-darwin12)
Copyright (C) 2007 Free Software Foundation, Inc.
$ /usr/bin/emacs__ --version
GNU Emacs 22.1.1
Copyright (C) 2007 Free Software Foundation, Inc.
GNU Emacs comes with ABSOLUTELY NO WARRANTY.
You may redistribute copies of Emacs
under the terms of the GNU General Public License.