Skip to content

Instantly share code, notes, and snippets.

Avatar
🍣

Masayuki Higashino mh61503891

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

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

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

@mh61503891
mh61503891 / ExampleScenarioTest.kt
Last active Jan 5, 2022
Android Test with Jetpack Compose's IdlingResource
View ExampleScenarioTest.kt
@LargeTest
@RunWith(AndroidJUnit4::class)
class ExampleScenarioTest {
@get:Rule
val composeTestRule = createAndroidComposeRule<MainActivity>()
private val mainIdlingResource = object : IdlingResource {
override var isIdleNow: Boolean = true
}
View gist:480e0a7635d8addf7aeb43e3e26a53ac
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)
View gist:8bb4c1d8ee38c60cbd6c687ea190c3dc
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 Jun 3, 2021
Errors log: Install Android Studio to M1 Mac
View gist:7881f3b834d847090d08096ec68e4045
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
View gist:faa8212be88507e8ca8518b45e358a05
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 Jan 7, 2021
covid19-tottori-chart.mmdc
View 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 Oct 8, 2020
情報処理学会の研究会申込システムで出力したCSVファイルをパースするスクリプト
View ipsj-sig-chief-csv-parser.rb
# @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に変換してテキストファイルとして読み込む。
View handbrake-cli-options.sh
$ 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
@mh61503891
mh61503891 / example-of-static-webpage-generator.rb
Created Jun 23, 2020
An example of Static Webpage Generator using ActionView
View example-of-static-webpage-generator.rb
#! /usr/bin/env ruby
require 'action_view'
require 'action_pack'
# @see https://github.com/rails/rails/blob/master/actionpack/lib/action_dispatch/middleware/debug_view.rb
class View < ActionView::Base
def initialize(assigns)
paths = ['app/views']