Skip to content

Instantly share code, notes, and snippets.

🍣
Sushi

Usagi Ito usagi

🍣
Sushi
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
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
Delivered-To: usagi@wonderrabbitproject.net
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;
d=google.com; s=arc-20160816;
b=mOyb695skz3+G+5anVqa2BSh0UusAenfi1t1Rq/Ai3E9fqCmbkvY7Zl9oJfjaNEO3P
NMzeJA562fp+6yrq5Okhm4NxkVLaJOP0DKUSiC3qq23rdjyi17HmzzvMUWFdSujE3FQq
@usagi
usagi / file0.txt
Created Apr 6, 2017
libpng を使ったアプリが実行時に `libpng warning: Interlace handling should be turned on when using png_read_image` を吐いてくれる時の正しい対処法 ref: http://qiita.com/usagi/items/c607fb833fdd63929d33
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
usagi / file0.txt
Last active Feb 14, 2017
C++のちょっとしたアプリでさっと使いやすい簡易ロガーの実装例 ref: http://qiita.com/usagi/items/d4aec8d3f748f4ba9d6a
View file0.txt
小さなサンプルアプリ作る
でもまあロガーくらい入れて作りたい
boost::log入れるのめんどくさいしちょっとしたやつ
気づけばいつものロガーコードを書いている
@usagi
usagi / file0.txt
Created Feb 3, 2017
picojson::value を bool へ ECMA-262 互換で変換する実装例 ref: http://qiita.com/usagi/items/fe09583b4efe2fe77ead
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
usagi / file0.txt
Last active Feb 3, 2017
picojson の value, array, object の生成を簡単にするヘルパーライブラリーの実装例 ref: http://qiita.com/usagi/items/fa09b3881979b923e3a6
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;
@usagi
usagi / file0.txt
Created Feb 1, 2017
picojson で JSON-RPC-2.0 を扱う C++ のライブラリー実装 ref: http://qiita.com/usagi/items/27b5fa874496d05a3030
View file0.txt
#include <usagi/json/picojson/rpc/jsonrpc20.hxx>
#include <memory>
auto main() -> int
{
using namespace usagi::json::picojson;
using namespace usagi::json::picojson::rpc::jsonrpc20;
server_type s;
@usagi
usagi / file0.txt
Created Jan 31, 2017
F# を ubuntu/mono と Visual Studio Code で始めるメモ ref: http://qiita.com/usagi/items/ee8300f897d7b85f6956
View file0.txt
sudo apt-get install mono-complete fsharp nuget
@usagi
usagi / file0.txt
Created Jan 31, 2017
文字列のパスから picojson::object による階層構造に picojson::value を放り込む例 ref: http://qiita.com/usagi/items/2564e7f660c83793cfc3
View file0.txt
/// @brief object_type に対しドット区切りのパスで object_type の階層を必要なら作成しながら辿り末梢の要素の参照を返す
static inline decltype( auto ) make_object_path
( object_type& root_object
, const std::string& dot_separated_path
)
{
// (1) ドット区切りのパス文字列を階層ごとに分離する機能
std::vector< std::string > path;
boost::split( path, dot_separated_path, boost::is_any_of( "." ) );
@usagi
usagi / file0.txt
Last active Jan 31, 2017
vscode を ubuntu に .deb で install したら実行ファイルがどこにあるか探して手 symlink を貼る必要があったメモ ref: http://qiita.com/usagi/items/d800457a7ee355d7305d
View file0.txt
cd /usr/local/bin
sudo ln -s /usr/share/code/bin/code
You can’t perform that action at this time.