Skip to content

Instantly share code, notes, and snippets.

View zrzka's full-sized avatar
👓
Trying to do something

Robert Vojta zrzka

👓
Trying to do something
View GitHub Profile
@zrzka
zrzka / !IMPORTANT.md
Last active March 2, 2020 07:27 — forked from chockenberry/tot.sh
A shell script for Tot
@zrzka
zrzka / DeepLink.swift
Last active February 25, 2020 13:24
SwiftUI - NavigationView - Deep Link
import SwiftUI
struct SignalStrengthIndicator: View {
/// Spacing between individual bars.
@State var barSpacing: CGFloat = 2
/// Minimal height of a bar (`0.1` means 10% of the actual height).
@State var minBarHeight: CGFloat = 0.1
/// Individual bar corner radius.
@State var barCornerRadius: CGFloat = 8.0
@zrzka
zrzka / View+KeyboardAdapter.swift
Last active February 12, 2020 14:41
SwiftUI Keyboard Adapter
import Combine
import SwiftUI
import UIKit
private struct KeyboardInfo {
let height: CGFloat
let eventuallyVisible: Bool
private let animationDuration: Double
@zrzka
zrzka / description.md
Created August 21, 2019 13:39
How to save an actix multipart field to s3 using rusoto_s3?
@zrzka
zrzka / value.rs
Created January 15, 2019 12:51
serde_*::Value comparison
use serde_json;
use serde_yaml;
use std::collections::HashMap;
#[derive(Debug)]
pub enum Value<'a> {
Yaml(&'a serde_yaml::Value),
Json(&'a serde_json::Value),
}
@zrzka
zrzka / goals.md
Last active June 26, 2018 17:10
Rust thermometer design
@zrzka
zrzka / tile-game.py
Last active February 2, 2018 11:00
Tiles
import math
from scene import run, Scene, LabelNode, SpriteNode, Size, Point, Texture, Action
import secrets
from enum import Enum
class Direction(tuple, Enum):
UP = (-1, 0) # 1 row up, no column change
@zrzka
zrzka / imgur-upload.py
Created February 1, 2018 09:09
Imgur Upload
#!python3
import base64
import json
import appex
import clipboard
import objc_util
import photos
import requests
@zrzka
zrzka / README.md
Last active January 29, 2018 21:16
Pythonista Forum Post Copy Code
  • Copy forum-post-copy-code.py script into the Pythonista
  • Go to Settings - Share Extension Shortcuts
  • Tap on + button and add forum-post-copy-code.py there
  • Open Safari, visit forum, find a topic & post with some code
  • Make sure that URL ends with /NUMBER, like /5, /6, ... (it's a post number)
  • Tap on action button in Safari
  • Tap on Run Pythonista Script
  • Tap on shortcut you did previously add
  • All code elements are copied to the clipboard