object BookmarkTranslator {
fun toPresentation(model: Bookmark): BookmarkViewModel {
return BookmarkViewModel().build(model.id.value) {
name = model.name
// ommit
}
}
fun toDomainId(viewModel: BookmarkViewModel): Bookmark.Id = Bookmark.Id(viewModel.id.key)
This file contains hidden or 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
atom-dark-ui-slim | |
autocomplete-paths | |
autocomplete-sass | |
color-picker | |
highlight-selected | |
jumpy | |
maximize-panes | |
merge-conflicts | |
minimap | |
minimap-autohide |
This file contains hidden or 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
http://chrisjenx.com/gradle-robolectric-jacoco-dagger/ |
This file contains hidden or 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
@Table | |
data class AuthorizedUser( | |
@Column | |
val ok: Boolean, | |
@Column | |
val url: String, | |
@Column | |
val team: String, |
sbt_test_only () {
[[ $# -eq 0 ]] && return 1
local classes=$(git log --name-only --oneline $1..HEAD|grep "^test"|sort|uniq|while read line; do echo "$(head -1 $line|awk '$0=$2').$(cat $line|grep "object"|awk '$0=$2')"; done|xargs)
echo "sbt \"test-only $classes\""
}
This file contains hidden or 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 kotlin.properties.ReadWriteProperty | |
import kotlin.reflect.KProperty | |
class IntRestrictedProperty(minValue : Int, maxValue : Int, private var curValue:Int = 0) : ReadWriteProperty<Any?, Int> { | |
val valueRange = IntRange(minValue, maxValue) | |
override fun getValue(thisRef: Any?, prop: KProperty<*>): Int = curValue | |
override fun setValue(thisRef: Any?, prop: KProperty<*>, value: Int) { | |
curValue = valueRange.clamp(value) |
This file contains hidden or 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
git rev-list --left-right $(git rev-parse --abbrev-ref HEAD)...$(git rev-parse --abbrev-ref $(git rev-parse --abbrev-ref HEAD)@{upstream})|tail -1|sed 's/^<//' | |
current_branch=$(git rev-parse --abbrev-ref HEAD) | |
tracked_branch=$(git rev-parse --abbrev-ref ${current_branch}@{upstream}) | |
git rev-list --left-right ${current_branch}...${tracked_branch}|tail -1|sed 's/^<//' | |
git rev-list HEAD --count
Apacheのtika を入れて,/usr/local/bin/parsexml を作って
/usr/local/bin/parsexml
#!/usr/bin/env bash
tika -t "$1"
This file contains hidden or 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
Contents can't be empty. |