Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@Tiryoh
Tiryoh / chrome-vscode-install.sh
Created June 10, 2023 13:31
Google Corme + VSCode install script
#!/usr/bin/env bash
set -eu
# Google Corme + VSCode install script
# Tested Version: Ubuntu 22.04
#
# (C) 2023 Daisuke Sato
# Released under the MIT License
# https://tiryoh.mit-license.org/2023
@Tiryoh
Tiryoh / unity_hub_install_ubuntu.sh
Last active August 31, 2023 02:19
install Unity Hub on Ubuntu
#!/usr/bin/env bash
set -eu
# Unity Hub install script
# Tested Version: Ubuntu 20.04 + Unity Hub 3.4.1
#
# (C) 2023 Daisuke Sato
# Released under the MIT License
# https://tiryoh.mit-license.org/2023
@Tiryoh
Tiryoh / mini_pupper_display_ip.service
Last active October 19, 2022 00:42
systemctl service to show IP address on Mini Pupper LCD
[Unit]
Description=Display IP Address on MiniPupper LCD
Requires=NetworkManager-wait-online.service
After=NetworkManager-wait-online.service
[Service]
Type=forking
ExecStart=python3 -c "from MangDang.mini_pupper.display import Display ; disp = Display(); disp.show_ip();"
[Install]
@Tiryoh
Tiryoh / python3.bat
Last active April 29, 2022 17:46
Windowsでpython3を実行したときにpython.exeを呼び出せるようにする
@echo off
call python.exe %*
cmd /k exit /B %ERRORLEVEL%
@Tiryoh
Tiryoh / robin_nano_cfg.txt
Last active March 25, 2022 15:36
KINGROON KP3S純正ファームウェアで使用している設定ファイル
# robin_nano_cfg.txt [3D Touch] 日本語版 2021.10.30 Version 0.1.0 by @Tiryoh
# robin_nano_cfg.txt [3D Touch] 日本語版 2021.3.5 Version.0.0.1 by @hitoriblog の派生物です
#=================== 高度な機能設定 =======================================
>cfg_insert_det_module 0 # アクセス停電検出モジュール (1:mks 220det; 0:mks pwc)
>cfg_have_ups_device 0 # マシンにUPS電源が搭載されているかどうか (1:yes; 0:no)
>cfg_print_over_auto_close 1 # プリントオーバーシャットダウン設定 (1:on; 0:off) 「プリントオーバーシャットダウンモジュール」と同時に使用
@Tiryoh
Tiryoh / add_target_blank_in_markdown.sh
Created June 15, 2021 15:45
A shell script to add target="_blank" option to link in Markdown text
#!/usr/bin/env bash
set -eu
# (C) 2021 Daisuke Sato
# Released under the MIT License
# https://tiryoh.mit-license.org/2021
SRC_DIR=$(cd $(dirname ${BASH_SOURCE:-$0}); pwd)
# there is no Negative Lookahead in sed
@Tiryoh
Tiryoh / settings.json
Created July 29, 2020 04:52
CS+用VSCodeの設定
{
"files.encoding": "shiftjis",
"C_Cpp.default.defines": [
"_DEBUG",
"UNICODE",
"_UNICODE",
"_VSCODE"
],
"C_Cpp.default.includePath": [
"${workspaceFolder}/**",
@Tiryoh
Tiryoh / setup-ds4drv.sh
Last active August 2, 2020 09:42
DualShock4のUbuntu用ドライバのセットアップ手順(Python3)
#!/usr/bin/env bash
set -eu
# tested on Ubuntu 18.04.4
git clone https://github.com/ds4-driver/ds4drv.git
cd ds4drv
mkdir -p ~/.local/lib/python3.6/site-packages
python3 setup.py install --prefix ~/.local
sudo cp udev/50-ds4drv.rules /etc/udev/rules.d/
@Tiryoh
Tiryoh / raspimouse_read_mcp3208_via_spidev.py
Last active July 9, 2020 04:46
A Python script to read MCP3208 via spi0.0 on Jetson Nano
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# raspimouse_read_mcp3208_via_spidev.py
# (C) 2020 Daisuke Sato@RT CORPORATION
# Released under the MIT License
# special thanks: https://www.denshi.club/pc/raspi/5raspberry-pi-zeroiot8a-d5mcp3208.html
import time
import spidev
@Tiryoh
Tiryoh / jetson_nano_install_archer_t2u_nano_driver.sh
Last active March 22, 2020 12:08
Jetson Nano USB WiFi dongle(Archer T2U Nano) driver installer
#!/usr/bin/env bash
set -eu
sudo apt update
sudo apt install --no-install-recommends dkms
mkdir -p ~/workspace
cd ~/workspace
git clone https://github.com/abperiasamy/rtl8812AU_8821AU_linux.git
cd rtl8812AU_8821AU_linux
git checkout 4235b0ec7d7220a6364586d8e25b1e8cb99c36f1
sed -i -e "s/CONFIG_PLATFORM_ARM_JET_NANO = n/CONFIG_PLATFORM_ARM_JET_NANO = y/g" -e "s/CONFIG_PLATFORM_I386_PC = y/CONFIG_PLATFORM_I386_PC = n/g" Makefile