Skip to content

Instantly share code, notes, and snippets.

View usagi's full-sized avatar
🍣
Sushi

Usagi Ito usagi

🍣
Sushi
View GitHub Profile
@usagi
usagi / fizz_buzz_in_proc_macro_by_chatgpt.rs
Created December 2, 2022 14:40
> RustのprocmacroでFizzBuzzする実装ってどう書けば良いかな?
use proc_macro::TokenStream;
use proc_macro2::Span;
use quote::quote;
use syn::{parse_macro_input, parse_quote, Expr};
// `fizzbuzz`マクロを定義する
#[proc_macro]
pub fn fizzbuzz(input: TokenStream) -> TokenStream {
// 引数をパースする
let input = parse_macro_input!(input as Expr);
<!DOCTYPE html>
<style>
/* HTML要素の「文字」を対象に擬似的に縁取りする CSS の例 */
:root {
/* 輪郭線にしたい色 */
--shadow-color: #333;
/* 輪郭線にしたい幅(長さ) */
--shadow-thickness: 0.5mm;
/* 輪郭線にしたい幅の2倍の + 向きの長さ = + 向きのオフセット値 */
@usagi
usagi / README.md
Created July 10, 2022 03:23
TOMISUKE配列(論理)👉DYGMA RAISEのISO配列(物理)のキーマップファイル
autoload predict-on
alias predict.on="predict-on && export ZSH_PREDICT_STATE=0"
alias predict.off="predict-off && export ZSH_PREDICT_STATE=1"
predict.on
predict.toggle()
{
if [ $ZSH_PREDICT_STATE -eq 0 ]
<!DOCTYPE html>
<title>Issue-#17 repro.</title>
<div>
<div>test-result = <span id="test-result">????</span></div>
<div>exception: <pre id="test-exception">(No exceptions.)</pre></div>
</div>
<hr />
PS C:\Users\usagi\tmp\e1> yarn build
yarn run v1.22.4
$ electron-build-env nj-cli build
Compiling e1 v0.1.0 (C:\Users\usagi\tmp\e1)
error: linking with `link.exe` failed: exit code: 1181
|
= note: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.26.28801\\bin\\HostX64\\x64\\link.exe" "/NOLOGO" "/NXCOMPAT" "/LIBPATH:C:\\Users\\usagi\\.rustup\\toolchains\\nightly-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib" "C:\\Users\\usagi\\tmp\\e1\\target\\debug\\deps\\e1.221kml6osi0k2zqq.rcgu.o" "C:\\Users\\usagi\\tmp\\e1\\target\\debug\\deps\\e1.2i5tll55w6kdpnp0.rcgu.o" "C:\\Users\\usagi\\tmp\\e1\\target\\debug\\deps\\e1.38i0v4c7x0idatk9.rcgu.o" "C:\\Users\\usagi\\tmp\\e1\\target\\debug\\deps\\e1.3flbz8kk92q3rug5.rcgu.o" "C:\\Users\\usagi\\tmp\\e1\\target\\debug\\deps\\e1.40pfx1x8de8k1dst.rcgu.o" "C:\\Users\\usagi\\tmp\\e1\\target\\debug\\deps\\e1.4lbisy8hv8xf4p0s.rcgu.o" "C:\\Users\\usagi\\tmp\\e1\\target\\debug\\deps\\e1.503r6cyzgcyd5jqb.rcgu.o" "C:\\Use
PS C:\Users\usagi\tmp\e1> nj-cli build
Blocking waiting for file lock on build directory
Compiling futures-core v0.3.5
Compiling slab v0.4.2
Compiling itoa v0.4.6
Compiling futures-sink v0.3.5
Compiling winapi v0.2.8
Compiling once_cell v1.4.0
Compiling pin-utils v0.1.0
Compiling futures-io v0.3.5
index.html:38 /*!
@import /amethyst_input/src/bindings.rs#Bindings, StringBindings
Bindings<StringBindings>
*/
(
axes: {
"left_paddle": Emulated(
pos: Key(W),
neg: Key(S),
PS C:\Users\usagi\tmp\node-bindgen\examples\function> dir ..\target\debug\deps
Directory: C:\Users\usagi\tmp\node-bindgen\examples\target\debug\deps
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a---- 2020-04-20 18:32 7944 aho_corasick-ae017a1b101c29b1.d
-a---- 2020-04-20 18:32 98184 async_std-d7533f24c65e33bd.d
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