Skip to content

Instantly share code, notes, and snippets.

View usagi's full-sized avatar
🍣
Sushi

Usagi Ito usagi

🍣
Sushi
View GitHub Profile
import bpy
from re import compile
print('')
# Target(s) REGEX
regex = compile( '^Edit(KamiARoot|MaeKamiA(_00[1,2])?)$' )
# Replace Mode := Remove a target(s) -> new a merged
replace = True
# Merged name; "+".join if None
error[E0308]: mismatched types
-->
C:\Users\usagi\.cargo\git\checkouts\azul-f3b1e21a5e685cad\17b76b0\cargo\azul-text-layout\../../azul-text-layout\text_shaping.rs:309:73
|
309 | let error = FT_New_Memory_Face(ft_library, font_bytes.as_ptr(), buf_len, font_index as i64, &mut ft_face);
| ^^^^^^^ expected `i32`, found `i64`
|
help: you can convert an `i64` to `i32` and panic if the converted value wouldn't fit
|
309 | let error = FT_New_Memory_Face(ft_library, font_bytes.as_ptr(), buf_len.try_into().unwrap(), font_index as i64, &mut
@usagi
usagi / layer-0.json
Last active February 22, 2020 18:05
(WiP) My Dygma Raise layers
{
"keymap": [
{
"keyCode": 53,
"label": "`"
},
{
"keyCode": 30,
"label": "1"
},
@usagi
usagi / .rustfmt.toml
Last active February 18, 2020 04:57
usagi.network's Rust formatting rule
# https://rust-lang.github.io/rustfmt/
brace_style = "AlwaysNextLine"
combine_control_expr = false
comment_width = 127
condense_wildcard_suffixes = true
control_brace_style = "AlwaysNextLine"
empty_item_single_line = true
enum_discrim_align_threshold = 127
fn_args_layout = "Vertical"
fn_single_line = true
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.
core.c
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
Try the new cross-platform PowerShell https://aka.ms/pscore6
PS C:\Users\usagi> cd tmp
PS C:\Users\usagi\tmp> git clone git@github.com:Dygmalab/Bazecor.git
Cloning into 'Bazecor'...
remote: Enumerating objects: 243, done.
remote: Counting objects: 100% (243/243), done.
@usagi
usagi / benchmark_vs2019.cpp
Created December 11, 2019 10:17
std::mutex vs. boost::mutex (1.71.0) vs. Windows CRITICAL_SECTION with VS2019 and Windows 10
// 以下は計測対象の仕組みを提供するヘッダー
#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
usagi / file0.css
Last active February 17, 2019 22:36
白い画面恐怖症患者のためのChrome系ウェブブラウザーの処方箋 ref: https://qiita.com/usagi/items/ec9cbe3296c18c72a229
._3u13 ._3u15
{
background: #000;
}
cmake_minimum_required(VERSION 2.8.10)
project(parallel_sort)
add_custom_target(parallel_sort.g++.Ofast ALL g++ -std=c++11 -Ofast -march=native -fopenmp -o parallel_sort.g++.Ofast ${PROJECT_SOURCE_DIR}/parallel_sort.cxx)
add_custom_target(parallel_sort.g++.O3 ALL g++ -std=c++11 -O3 -march=native -fopenmp -o parallel_sort.g++.O3 ${PROJECT_SOURCE_DIR}/parallel_sort.cxx)
add_custom_target(parallel_sort.g++.O2 ALL g++ -std=c++11 -O2 -march=native -fopenmp -o parallel_sort.g++.O2 ${PROJECT_SOURCE_DIR}/parallel_sort.cxx)
add_custom_target(parallel_sort.g++.O1 ALL g++ -std=c++11 -O1 -march=native -fopenmp -o parallel_sort.g++.O1 ${PROJECT_SOURCE_DIR}/parallel_sort.cxx)
add_custom_target(parallel_sort.g++.O0 ALL g++ -std=c++11 -O0 -march=native -fopenmp -o parallel_sort.g++.O0 ${PROJECT_SOURCE_DIR}/parallel_sort.cxx)
add_custom_target(parallel_sort.g++.Os ALL g++ -std=c++11 -Os -march=native -fopenmp -o parallel_sort.g++.Os ${PROJECT_SOURCE_DIR}/parallel_sort.cxx)