Skip to content

Instantly share code, notes, and snippets.

View nukopy's full-sized avatar

Yosuke Okuwaki nukopy

  • Tokyo, Japan
  • 02:59 (UTC +09:00)
View GitHub Profile
@nukopy
nukopy / ci.yml
Created May 25, 2024 17:09
CI workflow in Rust projects on GitHub Actions
name: CI
on:
push:
branches:
- main
paths-ignore:
- "**.md"
- ".gitignore"
pull_request:
@nukopy
nukopy / sample_num_cpus.rs
Created June 19, 2023 17:50
Get the number of logical / physical cores in Rust
// ref: https://docs.rs/num_cpus/latest/num_cpus/fn.get.html
fn main() {
let logical_cpus = num_cpus::get();
let physical_cpus = num_cpus::get_physical();
println!("Logical CPUs: {}", logical_cpus);
println!("Physical CPUs: {}", physical_cpus);
/*
if logical_cpus > physical_cpus {
@nukopy
nukopy / .gitignore.unity
Created March 3, 2023 15:57
.gitignore for Unity
## User Settings
.DS_Store
## Rider
.idea
## for build
# Roulette/Roulette_iOS*/**
# !Roulette/Roulette_iOS*/.gitkeep
@nukopy
nukopy / .gitattributes
Created March 3, 2023 15:56
.gitattributes to use Git LFS for Unity
# ref: https://ikep.hatenablog.com/entry/2018/11/09/005207
## Unity ##
*.cs diff=csharp text
*.cginc text
*.shader text
*.mat merge=unityyamlmerge eol=lf
*.anim merge=unityyamlmerge eol=lf
*.unity merge=unityyamlmerge eol=lf
*.physicsMaterial2D merge=unityyamlmerge eol=lf
@nukopy
nukopy / q2_3.go
Last active April 23, 2022 11:10
Go ならわかるシステムプログラミング Q2.3 標準出力にログを出力しつつ gzip 圧縮した JSON をレスポンスで返す
package main
func main() {
q2_3()
}
func q2_3() {
http.HandleFunc("/", q2_3_handler)
http.ListenAndServe(":8080", nil)
}
@nukopy
nukopy / .latexmkrc
Last active January 5, 2021 04:07
Minimum settings for LaTeX in Docker on VSCode with extensions "Remote - Containers", "LaTeX Workshop"
#!/usr/bin/env perl
$pdf_mode = 3;
$latex = 'uplatex --kanji=utf8 -synctex=1 -file-line-error -halt-on-error %O %S';
$bibtex = 'upbibtex';
$dvipdf = 'dvipdfmx %O -o %D %S';
$makeindex = 'mendex %O -o %D %S';
@nukopy
nukopy / template.yml
Created November 13, 2020 02:39
CFn template
Resources:
# IAM Policy
PolicyLambdaBasicExecution:
Type: AWS::IAM::ManagedPolicy
Properties:
ManagedPolicyName: !Sub "${Prefix}-policy-lambda-basic-execution"
PolicyDocument:
Version: "2012-10-17"
Statement:
- Effect: Allow
@nukopy
nukopy / starship.toml
Created November 1, 2020 16:04
Power line theme
# Starship default config, extracted from the source
# Configure the format of the prompt
format = """\
$username\
$hostname\
$shlvl\
$singularity\
$kubernetes\
$directory\
@nukopy
nukopy / starship.toml
Created November 1, 2020 16:02
Nerd Font Symbols created by Starship. This is a Starship default config.
# Starship default config, extracted from the source
# Configure the format of the prompt
format = """\
$username\
$hostname\
$shlvl\
$singularity\
$kubernetes\
$directory\
@nukopy
nukopy / starship.toml
Created November 1, 2020 14:34
Simple theme with Starship
########################################
# prompt global settings
########################################
# document link: https://starship.rs/ja-JP/config/#%E3%83%95%E3%82%9A%E3%83%AD%E3%83%B3%E3%83%95%E3%82%9A%E3%83%88
# format = "$all"
format = """
$username\
$hostname\
$shlvl\