Skip to content

Instantly share code, notes, and snippets.


Usagi Ito usagi

Block or report user

Report or block usagi

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
usagi / layer-0.json
Last active Jan 8, 2020
(WiP) My Dygma Raise layers
View layer-0.json
"keymap": [
"keyCode": 53,
"label": "`"
"keyCode": 30,
"label": "1"
View error-full-log.txt
PS C:\Users\usagi\tmp\node-usb> npm install
> usb@1.6.2 install C:\Users\usagi\tmp\node-usb
> prebuild-install --verbose || node-gyp rebuild
prebuild-install info begin Prebuild-install version 5.3.3
prebuild-install info install installing standalone, skipping download.
C:\Users\usagi\tmp\node-usb>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
Building the projects in this solution one at a time. To enable parallel build, please add the "-m" switch.
View 2019-01-01-Dygmalab-Bazecor-issue.txt
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
Try the new cross-platform PowerShell
PS C:\Users\usagi> cd tmp
PS C:\Users\usagi\tmp> git clone
Cloning into 'Bazecor'...
remote: Enumerating objects: 243, done.
remote: Counting objects: 100% (243/243), done.
usagi / benchmark_vs2019.cpp
Created Dec 11, 2019
std::mutex vs. boost::mutex (1.71.0) vs. Windows CRITICAL_SECTION with VS2019 and Windows 10
View benchmark_vs2019.cpp
// 以下は計測対象の仕組みを提供するヘッダー
#include <mutex>
#include <boost/thread/mutex.hpp>
#include <Windows.h>
// 以下は計測システムの実装用
#include <cmath>
#include <thread>
#include <boost/timer/timer.hpp>
#include <boost/math/constants/constants.hpp>
#include <string>
usagi / SPAM-EMAIL-SAMPLE-2018-10-02.txt
Created Oct 2, 2018
The contents are bluff 100% and the From field is fake. ( And my camera devices is sealed physically with a masking tapes. lol )
View SPAM-EMAIL-SAMPLE-2018-10-02.txt
Received: by 2002:a1c:aca:0:0:0:0:0 with SMTP id 193-v6csp4888286wmk;
Mon, 1 Oct 2018 19:46:04 -0700 (PDT)
X-Google-Smtp-Source: ACcGV61rUxlWnyMQA0u73kIq94CiivooxgugdenyJyELaVrCn6hrYzYL7HmmFpiQV0q1au5Egao+
X-Received: by 2002:a62:1dc2:: with SMTP id d185-v6mr14131761pfd.219.1538448364069;
Mon, 01 Oct 2018 19:46:04 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1538448364; cv=none;; s=arc-20160816;
usagi / file0.txt
Created Apr 6, 2017
libpng を使ったアプリが実行時に `libpng warning: Interlace handling should be turned on when using png_read_image` を吐いてくれる時の正しい対処法 ref:
View file0.txt
libpng warning: Interlace handling should be turned on when using png_read_image
View for_tokoi_2017-03-25.hxx
struct frame_type final
size_t get_frame_size() const
{ return sizeof( frame_type ) - 1 + data_size; }
some_type1 some_header1;
some_type2 some_header2;
size_t data_size = 0;
array< uint8_t, 0 > data;
usagi / file0.txt
Last active Feb 14, 2017
C++のちょっとしたアプリでさっと使いやすい簡易ロガーの実装例 ref:
View file0.txt
usagi / file0.txt
Created Feb 3, 2017
picojson::value を bool へ ECMA-262 互換で変換する実装例 ref:
View file0.txt
#pragma once
#include "type.hxx"
namespace usagi::json::picojson
static inline auto to_bool( const boolean_type in ) { return in; }
/// @note ECMA-262 NaN: Boolean( 0/0 ) -> false
/// @note ECMA-262 +Inf: Boolean( +1/0 ) -> true
usagi / file0.txt
Last active Feb 3, 2017
picojson の value, array, object の生成を簡単にするヘルパーライブラリーの実装例 ref:
View file0.txt
#pragma once
#include <picojson.h>
#include <string>
namespace usagi::json::picojson
using object_type = ::picojson::object;
using array_type = ::picojson::array;
using value_type = ::picojson::value;
You can’t perform that action at this time.