Skip to content

Instantly share code, notes, and snippets.

View nov-'s full-sized avatar
🚀
swift...

Smirnov Yuriy nov-

🚀
swift...
View GitHub Profile
@adamawolf
adamawolf / Apple_mobile_device_types.txt
Last active July 26, 2024 10:00
List of Apple's mobile device codes types a.k.a. machine ids (e.g. `iPhone1,1`, `Watch1,1`, etc.) and their matching product names
i386 : iPhone Simulator
x86_64 : iPhone Simulator
arm64 : iPhone Simulator
iPhone1,1 : iPhone
iPhone1,2 : iPhone 3G
iPhone2,1 : iPhone 3GS
iPhone3,1 : iPhone 4
iPhone3,2 : iPhone 4 GSM Rev A
iPhone3,3 : iPhone 4 CDMA
iPhone4,1 : iPhone 4S
@nuthinking
nuthinking / UIView+CustomTimingFunction.h
Created November 11, 2013 15:59
UIView Custom Timing Functions
//
// UIView+CustomTimingFunction.h
// Instants
//
// Created by Christian Giordano on 16/10/2013.
// Copyright (c) 2013 Christian Giordano. All rights reserved.
//
#import <UIKit/UIKit.h>
@liaujianjie
liaujianjie / NSURL+mailTo.swift
Last active August 2, 2016 08:17
Swift convenience NSURL extension for composing mailto urls
import Foundation
extension NSURL {
/**
Convenience class method for composing an `NSURL` for creating mail links with the `mailto` scheme.
- parameter receipients: Email receipients
- parameter cc: Email carbon copy receipients. (optional)
- parameter bcc: Email blind carbon copy receipients (optional)
- parameter subject: Subject title of the email (optional)
@insidegui
insidegui / WebCacheCleaner.swift
Created September 14, 2016 23:12
Clear WKWebView's cookies and website data storage, very useful during development.
import Foundation
import WebKit
final class WebCacheCleaner {
class func clean() {
HTTPCookieStorage.shared.removeCookies(since: Date.distantPast)
print("[WebCacheCleaner] All cookies deleted")
WKWebsiteDataStore.default().fetchDataRecords(ofTypes: WKWebsiteDataStore.allWebsiteDataTypes()) { records in
@simme
simme / debounce-throttle.swift
Created December 20, 2016 10:04
Swift 3 debounce & throttle
//
// debounce-throttle.swift
//
// Created by Simon Ljungberg on 19/12/16.
// License: MIT
//
import Foundation
extension TimeInterval {
@simonwuyts
simonwuyts / TooltipView.swift
Last active February 5, 2024 19:28
Customizable Tooltips
//
// TooltipView.swift
// Customizable Tooltips
//
// Copyright © 2017 Simon Wuyts
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// ==UserScript==
// @name EmuParadise Download Workaround - 1.1.1
// @version 1.1.2
// @description Replaces the download button link with a working one
// @author Eptun
// @match https://www.emuparadise.me/*/*/*
// @require http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js
// @grant none
// ==/UserScript==
@kuglee
kuglee / DiskSpaceLightbulb.sh
Created February 16, 2019 11:33
Homebridge disk space as Lightbulb with homebridge-cmd4 plugin
#!/usr/bin/env bash
# Plugin: https://github.com/ztalbot2000/homebridge-cmd4
#
# config.json
#
# ...
# {
# "platform": "Cmd4",
# "name": "Cmd4",
@maheshwaghmare
maheshwaghmare / curl-website-speed-test-with-no-cache.sh
Last active March 14, 2024 07:08
Test the website speed with CURL request though command line.
curl -s -o /dev/null -w "%{time_total}\n" -H "Pragma: no-cache" https://maheshwaghmare.com/
@romiroma
romiroma / Tappable-SwiftUI.swift
Created October 31, 2020 06:06
Tappable Text in SwiftUI
import Foundation
import SwiftUI
struct TappableColoredText: View {
enum Component {
case text(String)
case tappable(String, () -> Void)
}
let components: [Component]