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
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
@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');
@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 / 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 / index.js
Created Sep 20, 2014
maniaxcache/3
View index.js
'use strict';
var config = require('./config.json');
var dncs = config.dncs || [];
var dncsLength = dncs.length;
var util = require('util');
var http = require('http');
@kanreisa
kanreisa / Web.config
Created Sep 24, 2014
Snippets for Node on Azure Web Sites
View Web.config
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.webServer>
<handlers>
<add name="node-application" path="index.js" verb="*" modules="iisnode" />
</handlers>
<rewrite>
<rules>
<rule name="node-application">
<action type="Rewrite" url="index.js" />
@kanreisa
kanreisa / resolve.conf
Created Oct 6, 2014
shellshocked /etc/init.d/resolve.conf
View resolve.conf
nameserver 4.2.2.2
@kanreisa
kanreisa / ssh
Created Oct 6, 2014
shellshocked /etc/init.d/ssh
View ssh
#! /bin/sh
### BEGIN INIT INFO
# Provides: sshd
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop:
# Short-Description: OpenBSD Secure Shell server
### END INIT INFO
@kanreisa
kanreisa / bda2mp4
Last active Aug 29, 2015
mp4 encode utils
View bda2mp4
#!/bin/bash
ATAG="fdkaac-he96ab"
# BDAV MPEG-2 TS something audio -> HE-AAC v1 audio in MPEG-4
avconv -y -i $1 \
-c:a libfdk_aac -profile:a aac_he -b:a 96k -afterburner 1 \
-f mp4 $1.$ATAG.mp4
View (Vuvuzela_jp)post.php
<?php
include('./init.php');
if(!$_SESSION['user']) exit('login.');
/* tweet text */
$A[] = 'ブブ';
$A[] = 'ブー';
$A[] = 'ブォォオ';
$A[] = 'ブォ';
You can’t perform that action at this time.