Skip to content

Instantly share code, notes, and snippets.

ack
android-sdk
asciidoc
atk
autoconf
automake
awscli
bash
bash-completion
bdw-gc
@digitalbot
digitalbot / file.html
Created August 5, 2014 15:26
csv file calc
<!doctype html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>file opener</title>
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0" />
<meta name="format-detection" content="telephone=no" />
<script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script>
@digitalbot
digitalbot / DBD-mysql-log
Created February 6, 2014 12:53
perl5 DBD::mysql install log
[digitalbot@PC-0111:~]$ cpanm DBD::mysql -v
cpanm (App::cpanminus) 1.7001 on perl 5.018001 built for darwin-thread-multi-2level
Work directory is /Users/digitalbot/.cpanm/work/1391579356.37018
You have make /usr/bin/make
You have LWP 6.05
You have /usr/bin/tar: bsdtar 2.8.3 - libarchive 2.8.3
You have /usr/bin/unzip
Searching DBD::mysql on cpanmetadb ...
--> Working on DBD::mysql
Fetching http://www.cpan.org/authors/id/C/CA/CAPTTOFU/DBD-mysql-4.026.tar.gz ... OK
;;;----------------------------------------
;;; init
;;;----------------------------------------
;; language
(set-language-environment 'japanese)
;; char-code
(prefer-coding-system 'utf-8)
window.onload = function() {
var e = document.getElementById('play');
var audioBufferLoader = new AudioBufferLoader('something.wav');
audioBufferLoader.onload = function(buffer) {
var context = this.context;
var source = context.createBufferSource();
source.buffer = buffer;
source.connect(context.destination);
e.removeAttribute("disabled");
@digitalbot
digitalbot / auido-stream.html
Created December 10, 2013 17:15
sample of web audio api + web rtc
<!doctype html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>SAMPLE</title>
</head>
<body>
<audio id="audio">ok?</audio>
<script>
navigator.getUserMedia = navigator.getUserMedia
@digitalbot
digitalbot / sizeof_array.c
Created November 6, 2013 08:57
sizeof...
#include <stdio.h>
void func_a(int (*ref_array)[10]) {
printf("[func called]\n");
printf("sizeof *ref_array: %lu\n", sizeof *ref_array);
printf("sizeof (*ref_array)[0]: %lu\n", sizeof (*ref_array)[0]);
printf("sizeof *ref_array / sizeof (*ref_array)[0]: %lu\n", sizeof *ref_array / sizeof (*ref_array)[0]);
for (int i=0; i<sizeof *ref_array / sizeof (*ref_array)[0]; i++) {
printf("%d: %d\n", i, (*ref_array)[i]);
}
@digitalbot
digitalbot / json-cmp.pl
Last active December 27, 2015 04:18
about using JSON and JSON::Syck
#!/usr/bin/env perl
use strict;
use warnings;
use feature qw/say/;
use Encode qw//;
use Encode::JavaScript::UCS;
use JSON qw//;
use JSON::Syck qw//;
use Test::More;
@digitalbot
digitalbot / DBD::musql error log
Last active December 27, 2015 03:39
dbd::mysql error
$ cpanm DBD::mysql -v
cpanm (App::cpanminus) 1.7001 on perl 5.018001 built for darwin-thread-multi-2level
Work directory is /Users/digitalbot/.cpanm/work/1383286511.59902
You have make /usr/bin/make
You have LWP 6.05
You have /usr/bin/tar: bsdtar 2.8.3 - libarchive 2.8.3
You have /usr/bin/unzip
Searching DBD::mysql on cpanmetadb ...
--> Working on DBD::mysql
Fetching http://www.cpan.org/authors/id/C/CA/CAPTTOFU/DBD-mysql-4.024.tar.gz ... OK
@digitalbot
digitalbot / web-query.log
Created October 28, 2013 16:41
This is error_log of installing Web::Query.
# cpanm Web::Query -v
cpanm (App::cpanminus) 1.5007 on perl 5.008008 built for x86_64-linux
Work directory is /root/.cpanm/work/1382082093.19684
You have make /usr/bin/make
You have LWP 6.05
You have /bin/tar: tar (GNU tar) 1.15.1
You have /usr/bin/unzip
Searching Web::Query on cpanmetadb ...
--> Working on Web::Query
Fetching http://search.cpan.org/CPAN/authors/id/C/CA/CAFEGRATZ/Web-Query-0.23.tar.gz ... OK