Skip to content

Instantly share code, notes, and snippets.

Avatar
🍶
I want to drink

Shinnosuke Kugimiya kgmyshin

🍶
I want to drink
View GitHub Profile
@kgmyshin
kgmyshin / AppInjector.kt
Last active Oct 26, 2018
マルチモジュール時のDagger-AndroidでのInject
View AppInjector.kt
import android.app.Activity
import androidx.fragment.app.Fragment
import dagger.android.DispatchingAndroidInjector
import javax.inject.Inject
class AppInjector : HasDispatchingFragmentInjector {
@Inject
lateinit var supportFragmentInjector: DispatchingAndroidInjector<Fragment>
@kgmyshin
kgmyshin / Extension.kt
Last active Jan 6, 2018
toSingleOptional
View Extension.kt
fun <T> Maybe<T>.toSingleOptional(): Single<Optional<T>> = RxJavaPlugins.onAssembly(MaybeToSingleOptional<T>(this))
@kgmyshin
kgmyshin / gist:4dfc8f807e6f07fc82082f999afbe348
Created Oct 28, 2017
kotlin系jarをclasspathに含めるかどうかで変わる -> というより gradle plugin実行時のClassLoader.getSystemClassLoaderの振る舞いが変わる?
View gist:4dfc8f807e6f07fc82082f999afbe348
val classLoader = URLClassLoader(
arrayOf(クラスファイル群パス),
ClassLoader.getSystemClassLoader()
)
val clazz = classLoader.loadClass("クラス名")
println("clazz.annotations.size: " + clazz.declaredAnnotations.size + " ")
@kgmyshin
kgmyshin / LintIssureRegistory.java
Last active Jan 6, 2017
RxJava2SubscribeOnErrorDetector
View LintIssureRegistory.java
package com.kgmshin.lint;
import com.android.tools.lint.client.api.IssueRegistry;
import com.android.tools.lint.detector.api.Issue;
import java.util.Collections;
import java.util.List;
public class LintIssueRegistry extends IssueRegistry {
@kgmyshin
kgmyshin / Hello World memo
Created Dec 6, 2015
Javaクラスファイルで Hello, World
View Hello World memo
- magic
CAFEBABE
- minor_virsion
0000
- major_version
0034
- constant_pool_count
View mov2gif.sh
mkdir ________work
ffmpeg -i $0 -an -r 15 ________work/%04d.png
convert work/*.png __mov.gif
rm -r ________work
View checkstyle.xml
<?xml version="1.0"?><!DOCTYPE module PUBLIC
"-//Puppy Crawl//DTD Check Configuration 1.2//EN"
"http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
<module name="Checker">
<!--module name="NewlineAtEndOfFile"/-->
<module name="FileLength" />
<module name="FileTabCharacter" />
@kgmyshin
kgmyshin / private.xml
Last active May 17, 2021
karabiner private.xml
View private.xml
<?xml version="1.0"?>
<root>
<!-- for RealForce -->
<devicevendordef>
<vendorname>RealForce_VendorID</vendorname>
<vendorid>0x0853</vendorid>
</devicevendordef>
<deviceproductdef>
@kgmyshin
kgmyshin / Android MのPermissionの個別設定情報の保存場所について
Last active Aug 29, 2015
Android MのPermissionの個別設定情報の保存場所について
View Android MのPermissionの個別設定情報の保存場所について
Permissionのファイルは
/data/system/users/{userId}/runtime-permissions.xml
ここにこういうのが入ってる
```runtime-permissions.xml
<?xml version='1.0' encoding='utf-8' standalone='yes' ?>
<runtime-permissions>
<pkg name="com.android.launcher">
@kgmyshin
kgmyshin / template.rb
Last active Aug 29, 2015
rails new new_project_name -m template.rb
View template.rb
gem 'haml-rails'
gem 'erb2haml'
gem_group :development, :test do
gem 'hirb'
gem 'hirb-unicode'
gem 'pry-rails'
gem 'pry-doc'
gem 'pry-byebug'
gem 'rspec-rails', '~> 3.0'