Skip to content

Instantly share code, notes, and snippets.

View trapple's full-sized avatar

trapple trapple

  • meleap inc.
  • Japan
View GitHub Profile
trait IHoge
trait IFuga
case class Sample(hogeFugas: List[IHoge with IFuga]) // できる
public IObservable<string> AsyncFunc () {
Subject<string> data = new Subject<string>();
/// 非同期の処理
SomeAsyncFunc(
(res) => {
/// callback
data.OnNext(res);
}
);
#!/bin/sh
set -e
for fromFile in *.wma; do
newName=`basename "$fromFile" .wma`
ffmpeg -i "./$fromFile" -acodec mp3 -ab 160k -map 0:0 "${newName}.mp3"
done
> bufferutil@1.1.0 install /home/pi/sandbox/lm35dz/node_modules/bufferutil
> node-gyp rebuild
install:nan ▌ ╢████████████████████████████████████████████████████████████████████████████████████████ make: Entering directory '/home/pi/sandbox/lm35dz/node_modules/bufferutil/build'
CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
In file included from ../src/bufferutil.cc:16:0:
../../nan/nan.h:261:25: error: redefinition of ‘template<class T> v8::Local<T> _NanEnsureLocal(v8::Local<T>)’
NAN_INLINE v8::Local<T> _NanEnsureLocal(v8::Local<T> val) {
^
../../nan/nan.h:256:25: note: ‘template<class T> v8::Local<T> _NanEnsureLocal(v8::Handle<T>)’ previously declared here
@trapple
trapple / any_event_file.pl
Last active October 29, 2015 02:18
ファイルの変更を監視(AE::timer)
use strict;
use warnings;
use utf8;
use Carp;
use AnyEvent;
use IO::File;
use 5.020;
my $cv = AE::cv;
@trapple
trapple / working.js
Created July 29, 2015 12:37
appendすると動く(遷移する)
//appendすると動く(遷移する)
var a = document.createElement('a');
a.href = "http://www.nhk.or.jp"
document.body.appendChild(a);
a.click();
@trapple
trapple / not_working.js
Created July 29, 2015 12:36
Firefoxで動かない(遷移しない)
//Firefoxで動かない(遷移しない)
var a = document.createElement('a');
a.href = "http://www.nhk.or.jp"
a.click();
var obj1 = {
a: "one",
b: "two",
c: "three"
};
var obj2 = {
0: "one",
1: "two",
2: "three"
" ディクショナリ作成
let mydic = { "one": "une", "two": "deux" }
" 追加
let mydic.three = "trois"
echo mydic
" 削除
call remove(mydic, "two")
echo mydic
let mydic = { "one": "une", "two": "deux" }
let mydic["three"] = "trois"
echo mydic