Skip to content

Instantly share code, notes, and snippets.

Sash Zats zats

Block or report user

Report or block zats

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
@zats
zats / presenting.md
Last active Jul 6, 2018
Takeaways from "Presenting Design Work" - WWDC sessions 2018 https://developer.apple.com/videos/play/wwdc2018/811/
View presenting.md

The presenter

Clarify your objectives

  • Establish your goals
  • Identify the questions you need answered
  • Understand the objective of your audiences
  • Don't dive into details before clarifying bigger picture

Embrace feedback

  • Take all feedback seriously even if disagree
  • Clarify the problems identified by the audience - separate problems highlighted from (potentially) invalid solutions suggested
  • Be willing to change your position
@zats
zats / rich-reminders.swift
Created Apr 7, 2018
This is a sample of how to add actionable button for Reminders (private API); demo video: https://youtu.be/q7LrO3VhI64
View rich-reminders.swift
import PlaygroundSupport
PlaygroundPage.current.needsIndefiniteExecution = true
let reminderListName = "Test"
import EventKit
extension EKCalendarItem {
var hack_action: AnyObject? {
set {
@zats
zats / ↔️.js
Created Feb 11, 2018
Bookmarklets for fullscreen, entering picture-in-picture, switching between fast and normal playback
View ↔️.js
javascript:document.getElementsByTagName('video')%5B0%5D.webkitEnterFullscreen()
@zats
zats / 0_usage.mm
Last active Jan 31, 2018
Load private framework, core service, app, etc
View 0_usage.mm
void *handler = loadPrivate(@"ChatKit", TypePrivateFramework);
const Class CKGradientViewCls = NSClassFromString(@"CKGradientView");
UIView *const gradientView = [(UIView *)[CKGradientViewCls alloc] initWithFrame:{0, 0, 300, 200}];
@zats
zats / FindReplace.json
Last active Sep 2, 2018
Alternative spellings for some emojis according to /System/Library/PrivateFrameworks/CoreEmoji.framework/Versions/A/Resources/en.lproj/FindReplace.strings
View FindReplace.json
{
"💍":"diamond | engagement ring | diamond ring | diamond rings | diamonds | engagement rings",
"🆎":"blood type AB",
"❣":"heart",
"🇱🇨":"Saint Lucia | Saint Lucian flag",
"🇮🇪":"Ireland | Irish flag",
"🇨🇮":"Côte d’Ivoire | Ivory Coast | Ivorian flag",
"💎":"diamond | gem | gemstone | jewel | diamonds | gems | gemstones | jewels",
"☠️":"skull and crossbones | poison | poisonous",
"👩‍💻":"technology worker | tech worker | technologist | techie | IT worker | Apple genius | woman in technology | woman tech worker | woman technologist | woman IT worker | woman in IT | woman Apple genius",
@zats
zats / emojis.swift
Created Sep 17, 2017
All emojis available in iOS 11.0 including lookup categories for gender and skin-tone dependent
View emojis.swift
let emojis: [String: [String]] = [
// +[EMFEmojiCategory TravelAndPlacesEmoji]
"travel": ["🚗", "🚕", "🚙", "🚌", "🚎", "🏎", "🚓", "🚑", "🚒", "🚐", "🚚", "🚛", "🚜", "🛴", "🚲", "🛵", "🏍", "🚨", "🚔", "🚍", "🚘", "🚖", "🚡", "🚠", "🚟", "🚃", "🚋", "🚞", "🚝", "🚄", "🚅", "🚈", "🚂", "🚆", "🚇", "🚊", "🚉", "🚁", "🛩", "✈️", "🛫", "🛬", "🚀", "🛰", "💺", "🛶", "⛵️", "🛥", "🚤", "🛳", "", "🚢", "⚓️", "🚧", "⛽️", "🚏", "🚦", "🚥", "🗺", "🗿", "🗽", "⛲️", "🗼", "🏰", "🏯", "🏟", "🎡", "🎢", "🎠", "", "🏖", "🏝", "", "🏔", "🗻", "🌋", "🏜", "🏕", "⛺️", "🛤", "🛣", "🏗", "🏭", "🏠", "🏡", "🏘", "🏚", "🏢", "🏬", "🏣", "🏤", "🏥", "🏦", "🏨", "🏪", "🏫", "🏩", "💒", "🏛", "⛪️", "🕌", "🕍", "🕋", "", "🗾", "🎑", "🏞", "🌅", "🌄", "🌠", "🎇", "🎆", "🌇", "🌆", "🏙", "🌃", "🌌", "🌉", "🌁"],
// +[EMFEmojiCategory NatureEmoji]
"nature": ["🐶", "🐱", "🐭", "🐹", "🐰", "🦊", "🐻", "🐼", "🐨", "🐯", "🦁", "🐮", "🐷", "🐽", "🐸", "🐵", "🙈", "🙉", "🙊", "🐒", "🐔", "🐧", "🐦", "🐤", "🐣", "🐥", "🦆", "🦅", "🦉", "🦇", "🐺", "🐗", "🐴", "🦄", "🐝", "🐛", "🦋", "🐌", "🐚", "🐞", "🐜", "🕷", "🕸", "🐢", "🐍", "🦎", "🦂", "🦀", "🦑", "🐙", "🦐", "🐠", "🐟", "🐡", "🐬", "🦈
@zats
zats / File.swift
Last active Jan 9, 2017
Kill compiler with this one weird trick
View File.swift
import UIKit
class ViewController: UIViewController {
private var a1: Int!
private var a2: Int!
private var a3: Int!
private var a4: Int!
private var a5: Int!
private var a6: Int!
@zats
zats / Models.swift
Last active Aug 10, 2017 — forked from JaviSoto/SampleViewController.swift
Init based Storyboard View Controller Instantiation
View Models.swift
import Foundation
// Some clearly non-NSObject-based models:
enum Coconut: String {
case small, medium, large
}
struct Tomato {
static var red = Tomato(color: #colorLiteral(red: 0.7490196078, green: 0.09803921569, blue: 0.02352941176, alpha: 1))
View Podfile
target '' do
end
post_install do |installer_or_rep|
installer = installer_or_rep.respond_to?(:installer) ? installer_or_rep.installer : installer_or_rep
installer.pods_project.build_configurations.each do |config|
# Only in debug
if config.name.include?("Debug")
@zats
zats / usage.swift
Created Jul 16, 2016
Optional escape operator
View usage.swift
// flow controll using do-catch
do {
try commentBody(¿commentRangeBeforeOffset(¿getNameOffset(dictionary)))
} catch let e as OptionalError {
} catch {
}
// folding into optional value. Currently produces double optional
You can’t perform that action at this time.