Skip to content

Instantly share code, notes, and snippets.

@hiono
hiono / install_mitamae.sh
Last active August 18, 2024 13:50
Install mitamae
#!/bin/bash
set -e
# Run script
# curl -fsLS https://bit.ly/inst-mitamae | bash
type curl >/dev/null 2>&1 || sudo apt install -qqq -y curl
type openssl >/dev/null 2>&1 || sudo apt install -qqq -y openssl
type tar >/dev/null 2>&1 || sudo apt install -qqq -y tar
@hiono
hiono / convProfilerDataMAT2YAML.m
Created September 14, 2022 02:19
A tool to convert the MAT format of simulink's ProfilerData results to YAML format.
%%% usage
% diary_name = strcat('prof_', datestr(now, 'yyyymmddHHMMSS'), '.yaml');
% diary_folder = pwd;
% diary(diary_name);
% convProfilerDataMAT2YAML('ProfilerData.mat');
% diary off;
function convProfilerDataMAT2YAML(matfile)
narginchk(1, 1)
mat = load(matfile);
spd = mat.(cell2mat(fieldnames(mat)));
@hiono
hiono / base_setup.ps1
Last active January 27, 2022 09:22
Vagrant provisioner
param()
#---------------
# Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://gist.github.com/hiono/15d2a5d667118afd941f31b9a6835a3e/raw/base_setup.ps1'))
#---------------
# Set-PSDebug -Trace 2
Set-StrictMode -Version Latest
$ProgressPreference = 'SilentlyContinue'
$ErrorActionPreference = 'Stop'
$validExitCodes = @(0, 1605, 1614, 1641, 3010)
trap {
@hiono
hiono / direnvrc
Created December 16, 2021 04:46 — forked from candeira/direnvrc
layout_poetry for direnv
# Layout Poetry originally from
# https://github.com/direnv/direnv/issues/592
layout_poetry() {
if [[ ! -f pyproject.toml ]]; then
log_error 'No pyproject.toml found. Use `poetry new` or `poetry init` to cr
exit 2
fi
local VENV=$(poetry env list --full-path | cut -d' ' -f1)
#!/bin/sh
# usage
# curl -s https://gist.githubusercontent.com/hiono/805800f242672ca15198fb151c2d86e9/raw | sudo bash
set -o errexit
set -o nounset
# Docker
apt remove --quiet --yes docker docker-engine docker.io containerd runc || true
apt update
#!/bin/bash
# usage
# curl -s https://gist.githubusercontent.com/hiono/9c1e602d5307d0dc1415007866eb64a0/raw | bash
set -e
set -v
sudo apt -qq update
# addtopath
curl -s https://gist.githubusercontent.com/ccoomber/5886028/raw >> ~/.bashrc
@hiono
hiono / boxstarter4ri209492.txt
Last active October 29, 2020 17:44
Install boxstarter: Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://boxstarter.org/bootstrapper.ps1')); Get-Boxstarter -Force;; Install-BoxstarterPackage -PackageName "h…
#
# Setup for data platform demo environment
# Learn more: http://boxstarter.org/Learn/WebLauncher
#
# Install manually
#---- セットアップ用の一時的な設定---
Update-ExecutionPolicy Unrestricted
Disable-UAC
@hiono
hiono / boxstartertrb05798.txt
Last active September 2, 2020 22:08
for rb05798 windows10 setup
#
# Setup for data platform demo environment
# Learn more: http://boxstarter.org/Learn/WebLauncher
#
# Install manually
#---- セットアップ用の一時的な設定---
Update-ExecutionPolicy Unrestricted
Disable-UAC
@hiono
hiono / boxstartert4msedgevm.txt
Last active September 2, 2020 22:09
boxstartert script for MSEdge VM. VBoxManage import ~/"MSEdge - Win10.ova" --vsys 0 --cpus 2 --vsys 0 --memory 16384
#
# Setup for data platform demo environment
# Learn more: http://boxstarter.org/Learn/WebLauncher
#
# Install manually
#---- セットアップ用の一時的な設定---
Update-ExecutionPolicy Unrestricted
Disable-UAC
@hiono
hiono / boxstarter.txt
Last active July 6, 2018 10:11
My Boxstarter script
# Orig: http://torumakabe.github.io/post/intro_boxstarter/
# Learn more: http://boxstarter.org/Learn/WebLauncher
# Chocolateyパッケージがないもの、パッケージ更新が遅いものは別途入れます。メモです。
# Install manually (Ubuntu, VS, snip, Azure CLI/PS/Storage Explorer, Terraform, Go, 1Password 6, Driver Management Tool)
#---- TEMPORARY ---
Disable-UAC
#--- Fonts ---