Skip to content

Instantly share code, notes, and snippets.

🐰
うなぎ

Yuki K. kanreisa

🐰
うなぎ
Block or report user

Report or block kanreisa

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@kanreisa
kanreisa / flagrate-test.js
Created Jul 1, 2014
Flagrate Test Support
View flagrate-test.js
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
@kanreisa
kanreisa / flagrate.d.ts
Last active Aug 29, 2015
TypeScriptified Flagrate (working)
View flagrate.d.ts
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 {
@kanreisa
kanreisa / index.js
Created May 21, 2014
maniaxcache/2
View index.js
/*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');
View bdts2mp4
#!/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
View packet.js
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)) {
@kanreisa
kanreisa / gist:5522683
Last active Dec 17, 2015
れいさ用 avconv (libav)
View gist:5522683
# 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
View gist:5522174
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
@kanreisa
kanreisa / gist:4970160
Created Feb 17, 2013
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()
View gist:4970160
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
View gist:4463433
// 一番最初に実行する
window.sessionStorage.setItem('total', 0);
// ♪ここから
// load
var total = parseInt(window.sessionStorage.getItem('total'), 10);
// totaling
total += (function () {
View dtvts2mp4.sh
#!/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 \
You can’t perform that action at this time.