Skip to content

Instantly share code, notes, and snippets.

@Phroneris
Phroneris / howGithubMarkdownDetailsWork.md
Last active March 30, 2024 05:50
GitHubのMarkdownで折りたたみ記法の中身を整形させる方法

どうやら</summary>後の空行以降から整形される。

記述

違いは</summary>後の空行だけ。

<details>
<summary>これは中身が整形されない</summary>
1. 野菜**A**の皮を剥く。
2. 乱切りにする。
@Pooh3Mobi
Pooh3Mobi / TheIntersectionOfTwoLines.kt
Last active March 26, 2019 01:05
the intersection of two lines
import java.lang.AssertionError
data class Point(val x: Float, val y: Float)
fun pointAt(x: Float, y: Float) = Point(x, y)
data class Line(val p1: Point, val p2: Point)
infix fun Point.to(other: Point) = Line(this, other)
@TomoyaShibata
TomoyaShibata / MainActivity.kt
Last active September 8, 2018 10:56
Kotlin Coroutines でリトライをしながら通信を試行する
package com.example.tomoyashibata.myapplication
import android.graphics.Bitmap
import android.graphics.BitmapFactory
import android.os.Bundle
import android.support.v7.app.AppCompatActivity
import android.util.Log
import android.widget.Toast
import kotlinx.android.synthetic.main.activity_main.*
import kotlinx.coroutines.experimental.CommonPool
@nobeans
nobeans / syntax_improvement_in_groovy3.groovy
Last active May 5, 2018 13:11
Groovy 3.0.0から改善されるシンタックス互換性
// Groovy 3.0.0からラムダ記法が使えます。
//def twice = (int num) -> { num * 2 }
//def twice = (num) -> { num * 2 }
def twice = num -> num * 2
twice(100)
assert twice instanceof Closure
def hoge = () -> "HOGE"
assert hoge() == "HOGE"
@yusuke
yusuke / Android Studio30分集中超絶技巧100選メモ DroidKaigi 2018 #DroidKaigi #DroidKaigi_room3
Created February 9, 2018 02:10
Android Studio30分集中超絶技巧100選メモ DroidKaigi 2018 #DroidKaigi #DroidKaigi_room3
Android Studio30分集中超絶技巧100選 DroidKaigi 2018
山本 ユウスケ @yusuke
マウス、トラックパッドを使うのはやめましょう
今日は以下のキーマップの話です
Mac OSX: Mac OSX 10.5+
Windows/Linux: Default
他のキーマップだとQiitaやドキュメント、ブログなどを見る際に苦労します。
設定画面 Cmd + , (Ctrl + Alt + S)
プロジェクト設定画面 Cmd + ;
File > Power Save Modeでバッテリー節約
@radum
radum / charles-map-remote.md
Last active March 21, 2024 08:02
Charles proxy Map Remote over HTTP or HTTPS

Charles Proxy Map Remote over HTTP or HTTPS

The Map Remote tool changes the request location, per the configured mappings, so that the response is transparently served from the new location as if that was the original request.

HTTP

Using this feature for http resources does't require anything else apart from just configuring your Map Remote entry.

Always make sure you are clearing your cache before you test. Even if Charles is configured properly you might not see the changes unless the browser gets the resource again from the server and not for its local cache.
@toshihirock
toshihirock / JenkinsGradle.gradle
Last active August 29, 2015 14:10
JenkinsのコミットメッセージをGradleで取得する
// something
// jenkins
import groovy.json.*
ext {
jenkinsUrl = 'http://localhost:8080'
buildNumber = System.getenv("BUILD_NUMBER");
jobName = System.getenv("JOB_NAME");
println "build number is ${buildNumber}"
@patrickhammond
patrickhammond / ParcelableHelper.java
Last active April 20, 2021 02:22
A Parcelable is not always immediately deep copied; this forces an immediate deep copy into a new Parcelable instance.
import android.os.Parcel;
import android.os.Parcelable;
public class ParcelableHelper {
/**
* There is not always a guarantee that Parcelable values will be immediately written out and
* read back in. For data data that mutable (its own issue), this can be a problem. This is
* for the times when it would be great to have confidence that you will be working with a copy
* of that data.
*/
@chikuchikugonzalez
chikuchikugonzalez / pecd.bat
Created August 5, 2014 15:51
pecoでディレクトリを選択してcdするスクリプト (Windowsバッチファイル)
@echo off
:: pecoってディレクトリ移動をするスクリプト.
::
:: TODO 文字化けしてた('A`)
:init
set _pecocd_flags=
set _pecocd_folder=%CD%
:args
if "%1"=="" goto :peco
@taichi
taichi / pgradle.bat
Created July 17, 2014 01:09
gradle task selection with peco on windows.
@echo off
for /f %%i in ('gradlew tasks ^| peco') do (
echo gradlew %%i
gradlew %%i
break
)