Skip to content

Instantly share code, notes, and snippets.

View h1romas4's full-sized avatar
🍕
< Pizza Time

hiromasa h1romas4

🍕
< Pizza Time
View GitHub Profile
@h1romas4
h1romas4 / images---Fri_Jul_23_2021_1627012282100.png
Last active November 13, 2024 13:58
Ubuntu 20.04 LTS install and dependencies
images---Fri_Jul_23_2021_1627012282100.png
@h1romas4
h1romas4 / settings.plantuml
Created January 29, 2021 09:32
PlantUML の色設定
@startuml color-setting
hide footbox
skinparam shadowing false
skinparam NoteBorderColor #Black
skinparam NoteBackgroundColor #White
skinparam sequence {
LifeLineBorderColor #Black
LifeLineBackgroundColor #White
ActorBackgroundColor #White
ActorBorderColor #Black
@h1romas4
h1romas4 / bind.sh
Created October 4, 2020 09:01
FY HD Video Ubuntu
$ ls -l /sys/bus/usb/drivers/snd-usb-audio/
合計 0
lrwxrwxrwx 1 root root 0 10月 4 17:49 1-1.2:1.0 -> ../../../../devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.2/1-1.2:
1.0
lrwxrwxrwx 1 root root 0 10月 4 17:49 1-1.2:1.1 -> ../../../../devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.2/1-1.2:
1.1
lrwxrwxrwx 1 root root 0 10月 4 17:49 1-1.2:1.2 -> ../../../../devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.2/1-1.2:
1.2
lrwxrwxrwx 1 root root 0 10月 4 17:49 1-1.2:1.3 -> ../../../../devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.2/1-1.2:
1.3
@h1romas4
h1romas4 / ssh-port-forward.sh
Last active June 19, 2020 09:30
fumidai-host 経由で target-host に接続し、target-host 内でポートフォワードする ssh コマンド
# node.js の debug ポート(9229)接続の例
# ↓ssh元(PC) ↓target-hostからみたlocalhost
ssh -t -L 19229:localhost:44444 fumidai-host ssh -i .ssh/target-host.pem -L 44444:localhost:9229 target-host
# - 前提として ssh 元(PC) から fumidai-host に ssh 接続できるように .ssh/config などを定義すること。
# - target-host には fumidai-host はからの ssh(22) のみしか接続できない場合を想定。
# - ssh 元(PC) に 19229 ポートで接続を起動する(デバッガの接続先設定は localhost:19229)
# - 上記コマンドを叩いて target-host にログインできればOK(ターミナルはそのままにすること)
# - fumidai-host に target-host の ssh(22) の接続に使う秘密鍵が配置されていること(.ssh/target-host.pem)
@h1romas4
h1romas4 / packgage.json
Last active May 19, 2020 02:43
express でつくられたアプリをリリース用にバンドルする webpack(express はバンドルできないようなので除外)
{
"name": "app",
"version": "1.0.0",
"description": "app",
"repository": {},
"license": "",
"devDependencies": {
"@babel/core": "^7.9.0",
"@babel/preset-env": "^7.9.0",
"babel-loader": "^8.1.0",
@h1romas4
h1romas4 / launch.json
Last active April 26, 2020 15:23
macOS clang/lldb の vscode 起動構成
{
"version": "0.2.0",
"configurations": [
{
"type": "lldb",
"request": "launch",
"name": "Debug megadrij",
"program": "${workspaceFolder}/megadrij64",
"args": [
@h1romas4
h1romas4 / c_cpp_properties.json
Last active April 26, 2020 15:20
macOS 用の C/C++ vscode 定義
{
"configurations": [
{
"name": "Mac",
"intelliSenseMode": "clang-x64",
"includePath": [
"${workspaceRoot}/**"
],
"macFrameworkPath": [
"/System/Library/Frameworks",
@h1romas4
h1romas4 / webpack.config.js
Last active April 7, 2020 07:37
express だけ除外してバンドルする node 向け webpack.config.js
const path = require('path');
module.exports = {
devtool: "source-map",
mode: 'production',
target: 'node',
externals: function (context, request, callback) {
// use express in server install
// npm install express
// NODE_PATH=`npm root -g` node dist/app-bundle.js
@h1romas4
h1romas4 / parallel-fizzbuzz.ps
Last active March 10, 2020 08:26
PowerShell 7 の新機能 ForEach-Object -Parallel を使った シャー専用 3並列パラレル FizzBuzz
# -Parallel で並列化
# -ThrottleLimit で立てるスレッド数を指定
1..100 | foreach -ThrottleLimit 3 -Parallel {
# 最短 FizzBuzz は http://blog.powershell-from.jp/?p=15 さんより
$s=@(“Fizz”)[$_%3] + @(“Buzz”)[$_%5];
[PSCustomObject]@{
Id =$_; Value = ($s,$_)[!$s]
}
} | Sort-Object Id
@h1romas4
h1romas4 / mame-driver-add.md
Last active March 28, 2020 10:13
mame ドライバーつくりかたメモ