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
altscreen on | |
term screen-256color | |
hardstatus off | |
hardstatus alwayslastline | |
hardstatus string '%{= kG}[%{G}%H%? %1`%?%{g}][%= %{= kw}%-w%{+b yk} %n*%t%?(%u)%? %{-}%+w %=%{g}][%{B}%m/%d %{W}%C%A%{g}]' | |
startup_message off | |
termcapinfo xterm* ti@:te@ |
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
# letsencrypt certonly -a webroot --webroot-path=/opt/web -d domain.com | |
# crontab -e | |
30 2 * * 1 letsencrypt renew | |
35 2 * * 1 service nginx reload |
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 androidx.annotation.StringRes | |
import androidx.test.espresso.Espresso.onView | |
import androidx.test.espresso.ViewInteraction | |
import androidx.test.espresso.matcher.ViewMatchers | |
import org.hamcrest.CoreMatchers | |
import org.hamcrest.CoreMatchers.allOf | |
fun onSnackbar(@StringRes withText: Int): ViewInteraction { | |
return onView( | |
CoreMatchers.allOf( |
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
set encoding=utf-8 | |
set mouse= | |
set tabstop=4 | |
set shiftwidth=4 | |
set expandtab | |
set number | |
syntax on | |
set et |
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
class Json() : JSONObject() { | |
constructor(init: Json.() -> Unit) : this() { | |
this.init() | |
} | |
infix fun String.to(value: Json) { | |
put(this, value) | |
} |
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 pro.labster.dct | |
import kotlin.math.cos | |
import kotlin.math.sqrt | |
/** | |
* Around 20x faster than a naive implementation | |
*/ | |
class DctAlgorithm2DFast : DctAlgorithm { |
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
ssh -NR 9091:localhost:9091 user@server |
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 page.smirnov.sample | |
import android.content.BroadcastReceiver | |
import android.content.Context | |
import android.content.Intent | |
import android.content.IntentFilter | |
import android.os.Bundle | |
import kotlinx.coroutines.channels.awaitClose | |
import kotlinx.coroutines.flow.Flow | |
import kotlinx.coroutines.flow.callbackFlow |