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 / app.js
Created Nov 28, 2011
node.js / socket.io SSL接続サンプル (サーバ, クライアント)
View app.js
var PORT = 10443;
var SSL_KEY = '___.key';
var SSL_CERT= '___.cert';
var fs = require('fs');
var io = require('socket.io').listen(PORT, {
key : fs.readFileSync(SSL_KEY).toString(),
cert : fs.readFileSync(SSL_CERT).toString()
});
View coreinfo-ryzen-7-1700x
PS C:\WINDOWS\system32> coreinfo
Coreinfo v3.31 - Dump information on system CPU and memory topology
Copyright (C) 2008-2014 Mark Russinovich
Sysinternals - www.sysinternals.com
AMD Ryzen 7 1700X Eight-Core Processor
AMD64 Family 23 Model 1 Stepping 1, AuthenticAMD
Microcode signature: 0800110E
HTT * Multicore
View unixbench-ryzen-7-1700x.txt
========================================================================
BYTE UNIX Benchmarks (Version 5.1.3)
System: ubuntu: GNU/Linux
OS: GNU/Linux -- 4.8.0-22-generic -- #24-Ubuntu SMP Sat Oct 8 09:15:00 UTC 2016
Machine: x86_64 (x86_64)
Language: en_US.utf8 (charmap="UTF-8", collate="UTF-8")
CPU 0: AMD Ryzen 7 1700X Eight-Core Processor (6786.9 bogomips)
Hyper-Threading, x86-64, MMX, AMD MMX, Physical Address Ext, SYSENTER/SYSEXIT, AMD virtualization, SYSCALL/SYSRET
CPU 1: AMD Ryzen 7 1700X Eight-Core Processor (6786.9 bogomips)
View mongodb.js
"use strict";
const http = require("http");
const MongoClient = require('mongodb').MongoClient;
let collection = null;
let documentId = null;
MongoClient.connect("mongodb://user:pass@hostname:port/dbName", (err, db) => {
View documentdb.js
"use strict";
const http = require("http");
const DocumentClient = require('documentdb-q-promises').DocumentClientWrapper;
const host = "https://<name>.documents.azure.com:443/";// Add your endpoint
const masterKey = "...";// Add the masterkey of the endpoint
const client = new DocumentClient(host, { masterKey: masterKey });
// DB, Collection, Document 生成コードは面倒なので省きました。
@kanreisa
kanreisa / basic.css
Created Apr 13, 2016
Electron を光らせる
View basic.css
div#container {
-webkit-user-select: none;
-webkit-app-region: drag;
position: absolute;
top: 10px;
right: 10px;
bottom: 10px;
left: 10px;
background: #fff;
box-shadow: 0 0 10px rgba(0,0,0,0.15);
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
You can’t perform that action at this time.