This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package net.yusukezzz | |
import gg.jte.CodeResolver | |
import gg.jte.TemplateEngine | |
import gg.jte.output.WriterOutput | |
import gg.jte.resolve.DirectoryCodeResolver | |
import io.ktor.application.* | |
import io.ktor.http.* | |
import io.ktor.http.content.* | |
import io.ktor.response.* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.graphics.* | |
import com.squareup.picasso.Transformation | |
// https://gist.github.com/codezjx/b8a99374385a0210edb9192bced516a3 | |
class CircleTransformation: Transformation { | |
companion object { | |
private val KEY = "circleImageTransformation" | |
} | |
override fun transform(source: Bitmap): Bitmap { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"content_scripts": [ { | |
"js": [ "newtab.js" ], | |
"matches": [ "*://*/*" ] | |
} ], | |
"description": "Always open external links in a new tab.", | |
"manifest_version": 2, | |
"name": "Open External Links in New Tab", | |
"update_url": "https://clients2.google.com/service/update2/crx", | |
"version": "1.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// RetryWithDelay 使用例 | |
fun main(args: Array<String>) { | |
Observable.create<String> { subscriber -> | |
subscriber.onNext("test") | |
subscriber.onError(Throwable("error occurred")) | |
} | |
.retryWhen(RetryWithDelay(3, 1000L)) | |
// toBlocking() や Thread.sleep() 的なものがないとメインスレッドが一瞬で終了してリトライ中の処理ごと死んでしまう | |
// 実処理では blocking するわけに行かないので処理中に死んだ場合を考慮する必要があるかも | |
// -> Android なら onStop() での unsubscribe() ? 要調査 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# prefixキーをC-aに変更する | |
set -g prefix C-a | |
# C-a a で先頭に移動 | |
bind a send-prefix | |
# C-bのキーバインドを解除する | |
unbind C-b | |
# キーストロークのディレイを減らす | |
set -sg escape-time 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# /etc/rc.d/init.d/hhvm | |
# | |
# Starts the hhvm daemon | |
# | |
# chkconfig: 345 26 74 | |
# description: HHVM (aka the HipHop Virtual Machine) is an open-source virtual machine designed for executing programs written in Hack and PHP | |
# processname: hhvm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
update | |
upgrade | |
tap homebrew/dupes | |
tap homebrew/php | |
tap caskroom/cask | |
install brew-cask | |
install android-sdk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php namespace Yusukezzz; | |
use Illuminate\Filesystem\Filesystem; | |
class Config implements \ArrayAccess | |
{ | |
/** | |
* @var array | |
*/ | |
protected $items = []; |
NewerOlder