Skip to content

Instantly share code, notes, and snippets.

View amay077's full-sized avatar
🏠
Working from home

amay077 amay077

🏠
Working from home
View GitHub Profile
@amay077
amay077 / ObservableExtensions.kt
Created November 9, 2017 05:30
Convert RxJava:Observable<T> to AAC:LiveData<T>
package your.awesome.package
import android.arch.lifecycle.LiveData
import android.arch.lifecycle.MutableLiveData
import io.reactivex.Observable
import io.reactivex.disposables.Disposable
fun <T> Observable<T>.toLiveData() : LiveData<T> {
return object : MutableLiveData<T>() {
@amay077
amay077 / ctrl-ime-ahk.ahk
Created August 15, 2023 05:32
右Ctrl で IME ON、左Ctrl で OFF する AutoHotKey スクリプト。 forked from https://github.com/karakaram/alt-ime-ahk
; 左右 Alt キーの空打ちで IME の OFF/ON を切り替える
;
; 左 Alt キーの空打ちで IME を「英数」に切り替え
; 右 Alt キーの空打ちで IME を「かな」に切り替え
; Alt キーを押している間に他のキーを打つと通常の Alt キーとして動作
;
; Author: karakaram http://www.karakaram.com/alt-ime-on-off
#Include IME.ahk
@amay077
amay077 / LazyImageView.java
Created April 13, 2011 08:53
[Android]LazyImageView:画像の読み込みが終わるまでクルクルを表示する ImageView
package com.amay077.android.view;
import java.io.InputStream;
import java.net.URL;
import java.util.Random;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import jp.co.cosmoroot.gequu.R;
import android.content.Context;
import android.graphics.drawable.Drawable;
@amay077
amay077 / google_ime_keymap.txt
Created February 4, 2020 15:36
Google IME's keymap file
status key command
DirectInput Hiragana IMEOn
Precomposition Hiragana IMEOn
Composition Right MoveCursorRight
Composition Left MoveCursorLeft
Conversion Backspace Cancel
Conversion Ctrl [ Cancel
Conversion Ctrl h Cancel
Composition ESC Cancel
Conversion ESC Cancel
@amay077
amay077 / profiles.json
Created February 4, 2020 15:16
Windows Terminal profiles
// To view the default settings, hold "alt" while clicking on the "Settings" button.
// For documentation on these settings, see: https://aka.ms/terminal-documentation
{
"$schema": "https://aka.ms/terminal-profiles-schema",
"defaultProfile": "{2c4de342-38b7-51cf-b940-2309a097f518}",
"profiles":
@amay077
amay077 / app.module.ts
Last active January 29, 2020 02:47
Angular6 + ng-bootstrap で使えるモーダル表示サービス
@NgModule({
imports: [
CommonModule,
],
declarations: [
MyModalConfirmContent], ←追加
exports: [LayoutComponent],
entryComponents: [MyModalConfirmContent] ←追加

リモートワークしていて「ここ困ってます」ってメモ

会社からの貸出物の盗難対策

空き巣に入られたときとか、会社からの貸出物が盗まれるといろいろ困ることになるので対策しないとねー、という流れになっているものの…

  • 貸出PC
    • ストレージの暗号化&遠隔Wipeは行う
  • Windows用ノートPCはワイヤーロック用の穴が開いてるのでワイヤーだけ購入してデスクに固定できる
@amay077
amay077 / AndroidManifest.xml
Last active January 16, 2019 11:04 — forked from koral--/ImageCaptureHelper.java
Helper for sending ACTION_IMAGE_CAPTURE intent and retrieve its results. Handles all low level operations
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="your.awesome.app">
<application>
<!-- need provider tag in application tag -->
<provider
android:name="android.support.v4.content.FileProvider"
@amay077
amay077 / index.js
Created November 16, 2018 06:27
Azure Function Bot with LUIS sample
/*----------------------------------------------------------------------------------------
* Azure Functions bot templates use Azure Functions Pack for optimal performance, get
* familiar with Azure Functions Pack at https://github.com/Azure/azure-functions-pack
* This template demonstrates how to use an IntentDialog with a LuisRecognizer to add
* natural language support to a bot.
* For a complete walkthrough of creating this type of bot see the article at
* https://aka.ms/abs-node-luis
* ---------------------------------------------------------------------------------------- */