Skip to content

Instantly share code, notes, and snippets.

View mh61503891's full-sized avatar
🍣

Masayuki Higashino mh61503891

🍣
View GitHub Profile
@mh61503891
mh61503891 / README.md
Last active February 16, 2022 10:16
一般情報教育の知識体系(GEBOK2017.1)のユニット一覧.csv

本CSVファイルは、情報処理学会が公開しているカリキュラム標準一般情報処理教育(GE)の「一般情報教育の知識体系(GEBOK2017.1)」からユニットを抽出したものです。

スクリプトで自動抽出したものであるため、もし誤りがあればコメント等でご指摘頂けると幸いです。

@mh61503891
mh61503891 / expand-textarea-in-campus-square.js
Last active February 16, 2022 06:28
CampusSquareの授業計画詳細情報のテキストエリアがrows=2 cols=21で狭過ぎて辛い時に押すブックマークレット
javascript:(function(){ const tsurai_frame = document.getElementById("main-frame-if"); const textareas = tsurai_frame.contentWindow.document.getElementsByTagName("textarea"); Array.prototype.slice.call(textareas).forEach((t)=>{t.rows=20; t.cols=40;}); tsurai_frame.style.width = 2048 + "px"; tsurai_frame.style.height = 102400 + "px";})();
@mh61503891
mh61503891 / ExampleScenarioTest.kt
Last active January 5, 2022 13:23
Android Test with Jetpack Compose's IdlingResource
@LargeTest
@RunWith(AndroidJUnit4::class)
class ExampleScenarioTest {
@get:Rule
val composeTestRule = createAndroidComposeRule<MainActivity>()
private val mainIdlingResource = object : IdlingResource {
override var isIdleNow: Boolean = true
}
java.lang.IllegalStateException: no event down from INITIALIZED
at androidx.lifecycle.LifecycleRegistry.backwardPass(LifecycleRegistry.java:281)
at androidx.lifecycle.LifecycleRegistry.sync(LifecycleRegistry.java:302)
at androidx.lifecycle.LifecycleRegistry.moveToState(LifecycleRegistry.java:148)
at androidx.lifecycle.LifecycleRegistry.setCurrentState(LifecycleRegistry.java:121)
at androidx.navigation.NavBackStackEntry.updateState(NavBackStackEntry.kt:166)
at androidx.navigation.NavBackStackEntry.handleLifecycleEvent(NavBackStackEntry.kt:156)
at androidx.navigation.NavController.lifecycleObserver$lambda-2(NavController.kt:184)
at androidx.navigation.NavController.$r8$lambda$QcvT-AhOyhL9f0B2nrlZ1aMydmQ(Unknown Source:0)
at androidx.navigation.NavController$$ExternalSyntheticLambda0.onStateChanged(Unknown Source:2)
@mh61503891
mh61503891 / gist:8bb4c1d8ee38c60cbd6c687ea190c3dc
Created January 5, 2022 03:12
Jetpack Compose Test Error
java.lang.IllegalStateException: Restarter must be created only during owner's initialization stage
at androidx.savedstate.SavedStateRegistryController.performRestore(SavedStateRegistryController.java:58)
at androidx.navigation.NavBackStackEntry.setMaxLifecycle(NavBackStackEntry.kt:146)
at androidx.navigation.NavController.updateBackStackLifecycle$navigation_runtime_release(NavController.kt:987)
at androidx.navigation.NavController$NavControllerNavigatorState.markTransitionComplete(NavController.kt:359)
at androidx.navigation.compose.ComposeNavigator.onTransitionComplete$navigation_compose_release(ComposeNavigator.kt:71)
at androidx.navigation.compose.NavHostKt$NavHost$4$2$1$invoke$$inlined$onDispose$1.dispose(Effects.kt:486)
at androidx.compose.runtime.DisposableEffectImpl.onForgotten(Effects.kt:85)
at androidx.compose.runtime.CompositionImpl$RememberEventDispatcher.dispatchRememberObservers(Composition.kt:793)
at androidx.compose.runtime.CompositionImpl.dispose(Composition.kt:496)
@mh61503891
mh61503891 / gist:7881f3b834d847090d08096ec68e4045
Last active June 3, 2021 01:54
Errors log: Install Android Studio to M1 Mac
Preparing "Install Android SDK Platform-Tools (revision: 31.0.2)".
Downloading https://dl.google.com/android/repository/42b081e1e068bb936179551684cdcb30315e245c.platform-tools_r31.0.2-darwin.zip
"Install Android SDK Platform-Tools (revision: 31.0.2)" ready.
Installing Android SDK Platform-Tools in /Users/masayuki/Library/Android/sdk/platform-tools
"Install Android SDK Platform-Tools (revision: 31.0.2)" complete.
"Install Android SDK Platform-Tools (revision: 31.0.2)" finished.
Preparing "Install SDK Patch Applier v4 (revision: 1)".
Downloading https://dl.google.com/android/repository/3534162-studio.sdk-patcher.zip
"Install SDK Patch Applier v4 (revision: 1)" ready.
Installing SDK Patch Applier v4 in /Users/masayuki/Library/Android/sdk/patcher/v4
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.base/java.lang.StringLatin1.charAt(StringLatin1.java:47)
at java.base/java.lang.String.charAt(String.java:693)
at android.content.res.BridgeTypedArray.getType(BridgeTypedArray.java:1024)
at android.content.res.BridgeTypedArray.getType(BridgeTypedArray.java:809)
at android.content.res.BridgeTypedArray.getValue(BridgeTypedArray.java:778)
at android.content.res.BridgeTypedArray.peekValue(BridgeTypedArray.java:847)
at android.view.View.<init>(View.java:5951)
at android.view.ViewGroup.<init>(ViewGroup.java:697)
at android.widget.FrameLayout.<init>(FrameLayout.java:99)
@mh61503891
mh61503891 / covid19-tottori-chart.mmdc
Last active January 7, 2021 06:06
covid19-tottori-chart.mmdc
%% https://www.pref.tottori.lg.jp/item/1207264.htm
%% 101-
%%
%% ```sh
%% $ npm install @mermaid-js/mermaid-cli -g
%% $ curl --silent https://gist.githubusercontent.com/mh61503891/13147a09f30b8158658c9876db9db6ae/raw/790e4714bd45637003c72b5097635652cf6a33c7/covid19-tottori-chart.mmdc| mmdc -w 4000 -o covid19-tottori-chart.png
%% ``
%%
graph TB
@mh61503891
mh61503891 / ipsj-sig-chief-csv-parser.rb
Last active October 8, 2020 13:09
情報処理学会の研究会申込システムで出力したCSVファイルをパースするスクリプト
# @author Masayuki Higashino
# @license Ruby
# Usage: ruby ipsj-sig-chief-csv-parser.rb target.csv
require 'csv'
class Record
def self.parse(csv_file_path)
# Shift_JISのCSVファイルをUTF-8に変換してテキストファイルとして読み込む。
@mh61503891
mh61503891 / handbrake-cli-options.sh
Created July 8, 2020 02:51
HandBrakeCLI's options
$ HandBrakeCLI --version
[11:51:19] Compile-time hardening features are enabled
[11:51:19] hb_init: starting libhb thread
[11:51:19] thread 7000063e9000 started ("libhb")
HandBrake 1.3.3
HandBrake has exited.
$ HandBrakeCLI -h
[11:50:04] Compile-time hardening features are enabled
[11:50:04] hb_init: starting libhb thread