Skip to content

Instantly share code, notes, and snippets.

View yudai's full-sized avatar

Iwasaki Yudai yudai

View GitHub Profile
@yudai
yudai / gist:4591856
Created January 22, 2013 03:37
Extract highlights from kindle
$(".highlight").each(function(){console.log($(this).text().replace(/["';,.]/g, ""))})
@yudai
yudai / ngn.path
Created May 5, 2012 15:54
patch for wide_mkduid.pl to generate NGN-compatible DUIDs
--- wide_mkduid.pl.orig 2007-12-04 05:18:51.000000000 +0900
+++ wide_mkduid.pl 2012-05-06 00:56:25.207991279 +0900
@@ -79,8 +79,9 @@
# form the first two words of the DUID data: DUID type and link type.
# link-type is assumed to be ethernet(6)!
+# but for NGN, link-type is always 1!
-$duid_data = chr(0) . chr($duidtype) . chr(0) . chr(6);
+$duid_data = chr(0) . chr($duidtype) . chr(0) . chr(1);