Skip to content

Instantly share code, notes, and snippets.

👓
Trying to do something

Robert Vojta zrzka

👓
Trying to do something
Block or report user

Report or block zrzka

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@zrzka
zrzka / description.md
Created Aug 21, 2019
How to save an actix multipart field to s3 using rusoto_s3?
View description.md
@zrzka
zrzka / value.rs
Created Jan 15, 2019
serde_*::Value comparison
View value.rs
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 Jun 26, 2018
Rust thermometer design
View goals.md
View tile-game.py
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
View imgur-upload.py
#!python3
import base64
import json
import appex
import clipboard
import objc_util
import photos
import requests
@zrzka
zrzka / README.md
Last active Jan 29, 2018
Pythonista Forum Post Copy Code
View README.md
  • 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
@zrzka
zrzka / security.py
Last active Nov 19, 2018
iOS Keychain for Pythonista (WIP)
View security.py
#!python3
from ctypes import c_int, c_void_p, POINTER, byref, c_ulong
from objc_util import (
load_framework, c, ns, ObjCInstance, nsdata_to_bytes, NSString, NSData, NSNumber,
ObjCClass, NSArray, NSDictionary
)
from enum import Enum, IntFlag
from typing import Union
import datetime
View 21_scheduled_notifications.py
#!python3
import unittest
import notification
# https://github.com/omz/Pythonista-Issues/issues/21
class TestScheduledNotifications(unittest.TestCase):
delay = 300 # Keep it in the distant future, so, it won't fire during tests
View CIImage.properties.txt
{
ColorModel = RGB;
DPIHeight = 72;
DPIWidth = 72;
Depth = 8;
Orientation = 1;
PixelHeight = 960;
PixelWidth = 1280;
ProfileName = "sRGB IEC61966-2.1";
"{ExifAux}" = {
@zrzka
zrzka / lambda-remove-versions.py
Created Oct 10, 2017
Quick hack to remove all lamba function versions except X latest ones
View lambda-remove-versions.py
#!/usr/bin/env python3
import os
import boto3
from boto3.session import Session
import argparse
session = Session()
client = session.client('lambda')
You can’t perform that action at this time.