Skip to content

Instantly share code, notes, and snippets.

View Widcket's full-sized avatar

Rita Zerrizuela Widcket

View GitHub Profile
@hecht1962
hecht1962 / ipstocrash.pl
Last active January 4, 2025 15:23
Convert an IPS crash report (.ips) to the legacy crash report format (.crash)
#!/usr/bin/perl
##
## This script converts an IPS crash report (.ips) to the legacy crash report format.
##
## The .ips file (JSON) is read from STDIN and the legacy crash report is written to
## STDOUT.
##
use strict;
@insidegui
insidegui / CodableReference.swift
Created January 4, 2022 18:03
Property wrapper that allows for properties to be encoded as references by ID and resolved while decoding.
protocol ReferenceEncodable: Identifiable {
static var referenceStorageKey: CodingUserInfoKey { get }
}
extension ReferenceEncodable {
static var referenceStorageKey: CodingUserInfoKey {
CodingUserInfoKey(rawValue: String(describing: Self.self) + "ReferenceStorage")!
}
}
@helje5
helje5 / servedocc.swift
Last active July 16, 2022 22:24
Small Swift Script to serve `.doccarchive`s to the browser
#!/usr/bin/swift sh
import MacroExpress // @Macro-swift
// MARK: - Parse Commandline Arguments & Usage
func usage() {
let tool = path.basename(process.argv.first ?? "servedocc")
print(
"""
//
// CodableExtensions.swift
// 7-Eleven
//
// Created by Raja Sekhar Chiderae on 1/14/19.
// Copyright © 2019 self. All rights reserved.
//
import Foundation
@DreamingInBinary
DreamingInBinary / Best in Class iOS Checklist
Last active January 24, 2025 03:26
This is a public checklist updated every year after the latest version of iOS and iPadOS are shipped. It's a boiled down version of a "Best in Class" app checklist created by Jordan Morgan.
# A Best in Class Checklist
A boiled down checklist adapted from this [post](https://www.swiftjectivec.com/a-best-in-class-app/), created by @jordanmorgan10.
> To use this, create a Github Issue in your own repo, and simply copy and paste this text.
## iOS Core Technology
_Things any iOS app can benefit from_
- [ ] iCloud Sync
- [ ] Focus Filter Support
@dagronf
dagronf / DSFKeyedArchiverCodable.swift
Created November 18, 2019 01:22
A swift wrapper class to support Codable via NSKeyedArchiver
//
// DSFKeyedArchiverCodable.swift
// QR Generator
//
// Created by Darren Ford on 18/11/19.
// Copyright © 2019 Darren Ford. All rights reserved.
//
import Foundation
@stinger
stinger / CombineFetcherAndDecoder.swift
Last active February 17, 2024 02:07
Combine - fetching and decoding JSON data
import Foundation
import Combine
enum APIError: Error, LocalizedError {
case unknown, apiError(reason: String), parserError(reason: String)
var errorDescription: String? {
switch self {
case .unknown:
return "Unknown error"
import Foundation
public struct SandwichError: Error, Equatable, CustomStringConvertible {
private enum SandwichErrorCode: Int {
case tooLittleSalami = 1
case tooLittleMustard
case noTomatoes
case noBread
}
@lukas1
lukas1 / README.md
Last active October 17, 2022 05:44
A swift script that generates Color Assets and a Swift file containing enum of colors based on input json

Call the script like this:

./palette-generator.swift example-input.json

It will create a folder Colors in the folder where this script is executed, containing output.