Skip to content

Instantly share code, notes, and snippets.

@vganin
vganin / ComposeNumberPicker.kt
Last active January 14, 2024 11:53
Jetpack Compose simple number picker
@Composable
fun NumberPicker(
state: MutableState<Int>,
modifier: Modifier = Modifier,
range: IntRange? = null,
textStyle: TextStyle = LocalTextStyle.current,
onStateChanged: (Int) -> Unit = {},
) {
val coroutineScope = rememberCoroutineScope()
val numbersColumnHeight = 36.dp
@daj
daj / BaseStatelessBlackBoxEspressoTest.java
Last active December 20, 2018 09:44 — forked from xrigau/AndroidManifest.xml
The set of changes required to disable animations any time Espresso tests run. These instructions will only work on emulators and on rooted devices. This is based on the instructions in: https://code.google.com/p/android-test-kit/wiki/DisablingAnimations
public abstract class BaseStatelessBlackBoxEspressoTest<T extends Activity> extends ActivityInstrumentationTestCase2<T> {
private SystemAnimations mSystemAnimations;
public BaseStatelessBlackBoxEspressoTest(Class clazz) {
super(clazz);
}
@Override
protected void setUp() throws Exception {
@mystix
mystix / install-elasticsearch-debian
Last active March 19, 2023 15:14 — forked from karussell/install-elasticsearch-debian
Install ElasticSearch on Debian
VERSION=0.20.6
sudo apt-get update
sudo apt-get install openjdk-6-jdk
wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-$VERSION.deb
sudo dpkg -i elasticsearch-$VERSION.deb
# be sure you add "action.disable_delete_all_indices" : true to the config!!
@prof7bit
prof7bit / .gitignore
Last active March 17, 2022 09:13
The portfolio rebalancing bot will buy and sell to maintain a constant asset allocation ratio of exactly 50/50 = fiat/BTC
/.project