Skip to content

Instantly share code, notes, and snippets.

@mapyo
mapyo / hoge.kt
Created April 19, 2018 22:47
seald class sample
package jp.co.hoge
import org.junit.Test
sealed class Event {
class Loading : Event()
class Loaded(val result: String) : Event()
class LoadFailed(val reason: String) : Event()
}
@mapyo
mapyo / penguin.java
Last active December 6, 2017 18:59
class Penguin(java)をデコンパイルしたもの
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) ansi
package com.mapyo.kotlindataclassproguardsample;
public class c
{
@mapyo
mapyo / dog.java
Created December 6, 2017 18:28
class Dogをデコンパイルしたもの
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) ansi
package com.mapyo.kotlindataclassproguardsample;
import a.a.a.a;
public final class b
{
@mapyo
mapyo / cat.java
Created December 6, 2017 18:27
data class Cat をデコンパイルしたもの
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) ansi
package com.mapyo.kotlindataclassproguardsample;
public final class a
{
@mapyo
mapyo / commit_version_name_stage_bump.rb
Created July 18, 2017 23:43
versionNameを指定したstage名で更新していくactionです
module Fastlane
module Actions
class CommitVersionNameStageBumpAction < Action
PATH = 'app/build.gradle'
def self.run(params)
UI.message "Stage Name: #{params[:stage_name]}"
stage_name = params[:stage_name]
public final class b
{
public final int a()
{
return a;
}
public final String b()
{
@mapyo
mapyo / git-checkout-this-pr
Last active November 14, 2016 12:33
現在の開いているプルリクのブランチに切り替えて変更分をとってくるやつ
#!/bin/sh
set -e
chrome-cli execute '(function () {
return [
location.hostname,
location.pathname.split("/")[1],
location.pathname.split("/")[2],
document.title,
@mapyo
mapyo / gist:323c4c62be27ede513d4
Last active August 4, 2016 01:17
Androidの実機でいい感じでキャプチャを取れるようにする方法のメモ

1. AndroidStudio入れる

http://developer.android.com/intl/ja/sdk/index.html

※SDKがどうやって入るのか確認

2. adbコマンドのパスと環境変数の設定

※パス的なものはどこに入ってるのか見て調整する必要があります

echo 'export PATH="$PATH:$HOME/Library/Android/sdk/platform-tools"' >> ~/.bash_profile
echo 'export ANDROID_SDK_HOME="$HOME/Library/Android/sdk"' &gt;&gt; ~/.bash_profile
@mapyo
mapyo / DetailedImageActivity.java
Last active February 14, 2016 16:32
droid kaigi memo
public class DetailedImageActivity extends AppCompatActivity {
static final String IMAGE_URL = "imageUrl";
public static void launchActivity(Context context, String imageUrl) {
Intent intent = new Intent(context, ImageDetailActivity.class);
intent.putExtra(IMAGE_URL, imageUrl);
context.startActivity(intent);
}
@mapyo
mapyo / gist:6075465
Created July 24, 2013 23:10
隣の人のソースをforkして公開用に結構いろいろいじったbot
# coding: utf-8
require 'date'
require 'cinch'
class HogehogeBot
include Cinch::Plugin
@@reviewer="誰かな"