Skip to content

Instantly share code, notes, and snippets.

@josefdolezal
josefdolezal / RichTextView.kt
Created April 5, 2022 20:18
RichTextView Compose
@Composable
fun Demo() {
Column {
Text("This visually looks good:")
TextWithItem("Some text", EmbeddedItem(12.dp, 4.dp))
Spacer(Modifier.height(20.dp))
Text("This is not aligned correctly:")
TextWithItem("Some text", EmbeddedItem(12.dp, 20.dp))
@josefdolezal
josefdolezal / Loader.kt
Created September 10, 2021 22:42
Loader
@Composable
fun Loader(isLoading: Boolean) {
Column(Modifier.fillMaxSize()) {
Column(modifier = Modifier
.fillMaxWidth()
.weight(1f), horizontalAlignment = Alignment.CenterHorizontally, verticalArrangement = Arrangement.Center) {
val transition = rememberInfiniteTransition()
val rotation by transition.animateFloat(
initialValue = 0f,

MI-APH — Space Impact

Introduction

The game is heavily inspired by game called Space Impact originaly released in 2000 as mobile game by company called Nokia.

The game uses similar game graphics assets and logo (recreated to look as it’s displayed in low resolution) to the original game.

@josefdolezal
josefdolezal / Validator.swift
Last active May 29, 2020 05:26
[Swift] Functional Form Fields Validation
import Foundation
// MARK: Validation result
enum ValidationResult<Value>: CustomStringConvertible {
case success(Value)
case failure(Error)
var description: String {
switch self {
@josefdolezal
josefdolezal / gitlab-install.sh
Created December 11, 2015 11:43
GitLab Installation Script
#!/bin/bash
unknown_os ()
{
echo "Unfortunately, your operating system distribution and version are not supported by this script."
echo
echo "You can override the OS detection by setting os= and dist= prior to running this script."
echo "You can find a list of supported OSes and distributions on our website: /docs#os_distro_version"
echo
echo "For example, to force CentOS 6: os=el dist=6 ./script.sh"