Skip to content

Instantly share code, notes, and snippets.

Avatar
🐰
うなぎ

Yuki K. kanreisa

🐰
うなぎ
View GitHub Profile
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);
@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
@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 / 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 / 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');
You can’t perform that action at this time.