Skip to content

Instantly share code, notes, and snippets.

View koron's full-sized avatar
🐱
meow

MURAOKA Taro koron

🐱
meow
View GitHub Profile
@koron
koron / audio.html
Created March 15, 2014 14:56
Web Auido APIで矩形波
<!doctype html>
<body onload="load();">
<button onclick="play();">Play</button>
<button onclick="stop();">Stop</button>
<script>
var Player = function() {
if (window.webkitAudioContext) {
this.context = new webkitAudioContext();
@koron
koron / README.mkd
Last active August 29, 2015 13:57
JDK selector on Windows

使い方

  1. 必要に応じて JDKDIR, JDK17, JDK18 を書き換える
  2. JDK_HOME, JAVA_HOME を %JDKDIR%\jdk に設定しておく
  3. あとは jdk 17 で JDK7 が、jdk 8 で JDK8 が %JDKDIR%\jdk へジャンクションで接続され JDKが切り替わる
@koron
koron / trt.go
Last active August 29, 2015 13:58
port of tiny_raytracer for golang
// port of tiny_raytrace: http://www.gabrielgambetta.com/tiny_raytracer.html
package main
import (
"fmt"
"image"
"image/png"
"log"
"math"
@koron
koron / less_css_js.rb
Created April 20, 2014 14:43
Jekyll plugin to compile *.less to *.css by using Less.js
require 'open3'
module LessCssJS
class LessCssGenerator < Jekyll::Generator
def generate(site)
site.static_files.clone.each { |f|
if f.kind_of?(Jekyll::StaticFile) and File.extname(f.path) == '.less'
css = LessCssFile.new(site, f)
site.static_files.delete(f)
site.static_files << css
@koron
koron / いつも何度でもVim.txt
Last active August 29, 2015 14:00
いつも何度でも(千と千尋の神隠し 主題歌) の改変 Vim ver.
呼んでいる Vimのどこか奥で
いつも心躍る 技を見たい
プラギンは 数えきれないけれど
その向こうできっと あなた(=暗黒美夢王)に会える
繰り返すドットの そのたび ひとは
ただ黒いコンソールの 黒さ知る
果てしなく テキストは続いて見えるけれど
この両手は キーを叩ける
@koron
koron / nicoenc-kanhq.sh
Last active August 29, 2015 14:00
艦これ司令部室 が出力したWMVをffmpegを用いてニコニコ動画に上げるのに適したMP4へ変換するスクリプト。
#!/bin/sh
infile=$1 ; shift
passlog=${infile%.wmv}.passlog
outfile1=${infile%.wmv}-1.mp4
outfile=${infile%.wmv}.mp4
echo infile=$infile
echo outfile=$outfile
{% tabcontrol %}
{% tabpage C言語 %}
{% highlight c %}
#include <stdio.h>
int main(int argc, char **argv) {
printf("Hello World\n");
@koron
koron / 001.js
Last active August 29, 2015 14:01
function x(y) {
return y == 0 ? 0 : y + x(y - 1);
}
console.log(x(10000));
#!/bin/sh
usage () {
echo "usage:" $@
exit 127
}
die () {
echo $@
exit 128
Boolean.prototype.toString = function() { return 'foo'; }
console.log(false);
console.log(false.toString());
console.log('' + false)
function Bar() {}
Bar.prototype.toString = function() { return 'bar'; }
var b = new Bar();
console.log(b);
console.log(b.toString());