View goodparts.js
if (typeof Object.inherit === 'undefined') {
Object.inherit = function(o) {
var F = function() {};
F.prototype = o;
return new F();
}
} else {
throw {'name' : 'Method Duplication', 'message' : 'Object.create already defined'};
}
View slide.md
View bsearch.js
(function() {
Array.prototype['insertPos'] = function(val, cmp) {
var lower = 0;
var upper = this.length - 1;
var idx = Math.floor((lower + upper) / 2);
var ret;
if (this.length === 0) {
return 0;
View gist:c8f45809a1cab7d44a27
name:OMX.qcom.video.encoder.mpeg4 isEncoder:true type:video/mp4v-es
name:OMX.qcom.video.encoder.h263 isEncoder:true type:video/3gpp
name:OMX.qcom.video.encoder.avc isEncoder:true type:video/avc
name:OMX.qcom.video.encoder.vp8 isEncoder:true type:video/x-vnd.on2.vp8
name:OMX.google.amrnb.encoder isEncoder:true type:audio/3gpp
name:OMX.google.aac.encoder isEncoder:true type:audio/mp4a-latm
name:OMX.google.amrwb.encoder isEncoder:true type:audio/amr-wb
name:OMX.google.flac.encoder isEncoder:true type:audio/flac
name:OMX.google.vp8.encoder isEncoder:true type:video/x-vnd.on2.vp8
name:OMX.google.vorbis.decoder isEncoder:false type:audio/vorbis
View countdown.py
#!/usr/bin/env python
import sys
import time
import re
import subprocess
if __name__ == '__main__':
period = sys.argv[1]
m = re.match('(.*)([smh])', period)
View gist:989b41fa011a14d1431a
Mac OSX 10.9.4
tizen-sdk-mac64-v2.2.71.dmg バイナリが壊れてると言われた
tizen-sdk-mac64-cli-v2.2.71.bin 途中までいって失敗する
./tizen-sdk-mac64-v2.2.71.bin -install -f ./tizen-sdk-image-2.2.1-macos64.zip -p TYPICAL -l ~/Library/Developer/ -accept_license SDK image file does not have a package list file. Fatal error occurred.
Ubuntu 12.4
http://www.duinsoft.nl/packages.php?t=en の手順を実行 → エラー(メモってなかった)
sudo apt-get install oracle-java6-installer → エラー(メモってなかった)
sudo apt-get install oracle-java7-installer → エラー(メモってなかった)
View sendpacket.py
#!/usr/bin/python
import socket
import sys
if __name__ == '__main__':
if len(sys.argv) < 3:
sys.stderr.write('require arguments. host port filename')
sys.exit(1)
host = sys.argv[1]
View qsort.py
import random
import timeit
import itertools
def is_sorted(a):
return all(a[i] <= a[i+1] for i in xrange(len(a)-1))
def qsort(a):
def impl(a, left, right):
if left >= right:
View helloworld.c
// gcc -o helloworld helloworld.c `pkg-config --cflags --libs appcore-efl`
#include <stdio.h>
#include <stdlib.h>
#include <appcore-efl.h>
#include <Ecore.h>
#include <Ecore_Evas.h>
#define WIDTH 1920
#define HEIGHT 1080