Skip to content

Instantly share code, notes, and snippets.

View kanreisa's full-sized avatar
☑️
Busy

Yuki K. kanreisa

☑️
Busy
View GitHub Profile
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
========================================================================
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)
"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) => {
"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 April 13, 2016 07:33
Electron を光らせる
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);
@kanreisa
kanreisa / bda2mp4
Last active August 29, 2015 14:16
mp4 encode utils
#!/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
@kanreisa
kanreisa / resolve.conf
Created October 6, 2014 20:38
shellshocked /etc/init.d/resolve.conf
nameserver 4.2.2.2
@kanreisa
kanreisa / ssh
Created October 6, 2014 20:11
shellshocked /etc/init.d/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 / Web.config
Created September 24, 2014 09:41
Snippets for Node on Azure Web Sites
<?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 / index.js
Created September 20, 2014 08:19
maniaxcache/3
'use strict';
var config = require('./config.json');
var dncs = config.dncs || [];
var dncsLength = dncs.length;
var util = require('util');
var http = require('http');