org.gradle.jvmargs=-Xmx4048m -XX:MaxPermSize=1024m
org.gradle.parallel=true
kotlin.parallel.tasks.in.project=true
kapt.include.compile.classpath=false
kapt.use.worker.api=true
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
use std::fs; | |
use pathfinding::prelude::dijkstra; | |
type Board = Vec<Vec<char>>; | |
type Height = u32; | |
type Cost = usize; | |
#[derive(Clone, Eq, Hash, Ord, PartialEq, PartialOrd)] | |
struct Pos(usize, usize); |
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.chmielowski.advent.day10 | |
import androidx.compose.foundation.Canvas | |
import androidx.compose.foundation.background | |
import androidx.compose.foundation.layout.fillMaxSize | |
import androidx.compose.runtime.* | |
import androidx.compose.ui.Modifier | |
import androidx.compose.ui.geometry.Offset | |
import androidx.compose.ui.geometry.Size | |
import androidx.compose.ui.graphics.Color |
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.chmielowski.aoc.day12 | |
import net.chmielowski.aoc.day12.Vertex.* | |
import java.io.File | |
fun main() { | |
val file = File("input.txt") | |
val lines = file.readLines() | |
println("Part 1: " + findPaths(lines, strategy = MaxOnce).size) |
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 java.io.File | |
fun main() { | |
val file = File("input.txt") | |
val lines = file.readLines() | |
val initial = parseInitialStep(lines) | |
println(countFlashes(initial, steps = 100)) | |
println(findFirstStepWithSyncFlash(initial)) | |
} |
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.chmielowski.translatetest | |
import android.content.ActivityNotFoundException | |
import android.content.Context | |
import android.content.Intent | |
import android.content.pm.ActivityInfo | |
import android.content.pm.ResolveInfo | |
import android.os.Bundle | |
import androidx.activity.ComponentActivity | |
import androidx.activity.compose.setContent |
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
<?xml version="1.0" encoding="utf-8"?> | |
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:orientation="horizontal"> | |
<LinearLayout | |
android:layout_width="0dp" | |
android:layout_height="match_parent" | |
android:layout_weight="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
fun main() { | |
val shared = Observable.interval(1, TimeUnit.SECONDS) | |
.doOnSubscribe { println("Subscribed.") } | |
.doOnDispose { println("Disposed.") } | |
.replay() // or .publish() | |
.autoConnect() // or .refcount() | |
Thread { | |
shared | |
.take(3) |
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
adb tcpip 5555 | |
adb shell "ifconfig | grep -A1 wlan0 | tail -n1 | cut -d\: -f2 | cut -f1 -d' '" | |
adb connect 172.27.27.208:5555 |
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
git for-each-ref | cut -f2 -d' ' | cut -f2 | grep --color=never heads | cut -f3 -d'/' | while read br; do git branch -d $br; done |
NewerOlder