This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var _Button = flagrate.Button; | |
flagrate.Button = function () { | |
var button = _Button.apply(this, arguments); | |
button.dataset.label = button._label.innerHTML; | |
button.dataset.color = button._color || ''; | |
// async support |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
declare module Flagrate { | |
var className: string; | |
function identity<T>(a: T): T; | |
function extendObject<T, U>(b: T, a: U): T; | |
function emptyFunction(): void; | |
/** | |
* Json Pointer Implementation. | |
* @namespace Flagrate.jsonPointer | |
**/ | |
module jsonPointer { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*jslint node:true, nomen:true, plusplus:true, regexp:true, vars:true, continue:true */ | |
'use strict'; | |
var config = require('./config.json'); | |
var dncs = config.dncs || []; | |
var dncsLength = dncs.length; | |
var util = require('util'); | |
var http = require('http'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
EXT="mp4" | |
PTAG="x264_r14f18p" | |
ATAG="fdkaac_he96ab" | |
# m2ts -> m4a | |
avconv -y -i $1 -vn -map 0:a:0 \ | |
-c:a libfdk_aac -profile:a aac_he -b:a 96k -afterburner 1 \ | |
-f mp4 $1.tmp.m4a |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var packet = null; | |
var testStream = fs.createReadStream(__dirname + '/test.m2ts'); | |
testStream.on('data', function (chunk) { | |
var i, l; | |
for (i = 0, l = chunk.length; i < l; i++) { | |
if (chunk[i] === 0x47 && (packet === null || packet.length >= 188)) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# x264 | |
git clone git://git.videolan.org/x264.git /tmp/x264 | |
cd /tmp/x264 | |
./configure --prefix=/usr/local --enable-static --enable-shared | |
make -j 4 | |
make install | |
# libav |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ffmpeg -i input.dts -acodec pcm_s16le -ar 48000 -ac 6 -f wav pipe: | faac -q 128 -w - -o output.m4a | |
ffmpeg -i input.wav -acodec libfaac -aq 128 -f mp4 output.m4a | |
avconv -i input.wav -c:a libfdk_aac -flags +qscale -global_quality 5 -afterburner 1 -f mp4 output.m4a |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Feb 17 10:36:01 yui kernel: [1275074.404755] ------------[ cut here ]------------ | |
Feb 17 10:36:01 yui kernel: [1275074.404766] WARNING: at /build/buildd-linux-2.6_2.6.32-45-amd64-FcX7RM/linux-2.6-2.6.32/debian/build/source_amd64_none/net/sched | |
/sch_generic.c:261 dev_watchdog+0xe2/0x194() | |
Feb 17 10:36:01 yui kernel: [1275074.404770] Hardware name: System Product Name | |
Feb 17 10:36:01 yui kernel: [1275074.404772] NETDEV WATCHDOG: eth0 (r8169): transmit queue 0 timed out | |
Feb 17 10:36:01 yui kernel: [1275074.404774] Modules linked in: usbhid hid ip6table_filter ip6_tables ebtable_nat ebtables cpufreq_userspace cpufreq_conservative | |
cpufreq_stats cpufreq_powersave kvm_intel kvm fuse nfsd exportfs nfs lockd fscache nfs_acl auth_rpcgss sunrpc tun bridge stp ipt_MASQUERADE iptable_filter ext4 | |
jbd2 crc16 acpi_cpufreq iptable_nat ip_tables nf_nat x_tables nf_conntrack_ipv4 nf_conntrack nf_defrag_ipv4 ib_ipoib ib_cm ib_sa inet_lro ib_uverbs ib_umad loop | |
tbsfe ir_lirc_codec lirc_dev ir_mce_kbd_decoder rc_tbs_nec ir_sony_d |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 一番最初に実行する | |
window.sessionStorage.setItem('total', 0); | |
// ♪ここから | |
// load | |
var total = parseInt(window.sessionStorage.getItem('total'), 10); | |
// totaling | |
total += (function () { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
ENCODER="HandBrakeCLI" | |
EXT="mp4" | |
VERSION="r11f18" | |
OUTPUT="$1_$VERSION.$EXT" | |
OPTS='-t 1 -c 1 -f mp4 --denoise="2:1.5:3:2.25" \ | |
-w 1280 -l 720 --crop 0:8:0:0 --modulus 2 -e x264 -q 18 \ |