Skip to content

Instantly share code, notes, and snippets.

View tmspzz's full-sized avatar

Tommaso Piazza tmspzz

View GitHub Profile
@tmspzz
tmspzz / wire-production.json
Created May 13, 2022 15:18
Wire production Deeplink
{
"endpoints" : {
"backendURL" : "https://prod-nginz-https.wire.com",
"backendWSURL": "https://prod-nginz-ssl.wire.com",
"blackListURL": "https://clientblacklist.wire.com/prod",
"teamsURL": "https://teams.wire.com",
"accountsURL": "https://account.wire.com",
"websiteURL": "https://wire.com"
},
"title" : "ProductionRemote"
@tmspzz
tmspzz / wire-staging.json
Created May 13, 2022 15:16
wire-staging-json-deeplink
{
"endpoints" : {
"backendURL" : "https://staging-nginz-https.zinfra.io",
"backendWSURL": "https://staging-nginz-ssl.zinfra.io",
"blackListURL": "https://clientblacklist.wire.com/staging",
"teamsURL": "https://wire-teams-staging.zinfra.io",
"accountsURL": "https://wire-account-staging.zinfra.io",
"websiteURL": "https://wire.com"
},
"title" : "StageRemote"
@tmspzz
tmspzz / wa-holy-paladin.md
Last active December 13, 2020 16:06
Weak Auras - Holy Paladin

Weak Auras Import String

!WA:2!TZvF0XX1v9mzJJt2K0AlhRA7K4mruRi5ilRD1hr2N6KUR0kR1rF5zx5Vt1oZoVDNXA3zMmZSALCskTI2IPuGgrP8zHIGM(DbeeAoTuO4sdLZPh4IOnNbOTaIs5ukuaZPaL)OL779Mz3zL2y7KMEiMQ9C8UZ(M37(M3797EV)E)ERSWjAXrQ3UJ1D8wk3IAlQxS3KfTnRQm00zYo54RPyARsStkNFwvBtlRTLSK(fUGSTQywtZsU6wRkxXvZ0EslxDtdNOlHTTIv68Mgk93B)9FO(xSOTUA2fSiTjn8kCJnKzjt7JjiiezrSJYyjNNejEf7sw3LMRRLZHp4bRkx0SBDZdEIJvvHSG84h)GhYwopRhgqYXv22nAsDdD3OkfWpC0IUORTEXIeBN90UT)LVTLvjkvkuG232JMASPgz6Xs6IFrsUITC8fDSiLkLw1j6AovuiZrmCZG1wF(vMzOezYotMSjKYw7wtztWBjLzQuJnMKHCzItuj2nugLixYvlzf8PrXQK8ce7LQy4)ieDL8MLQu2GpevSLv1R48wU9LCiLkmLPo26Hsnr2ussYL0lAaTBJdnA7eSNdhk4ODhlJpasKISP2KLmLvhqkFjzhNwLkxbN9JMehf5BfoaEH(fi0lws2qVSmDQAa4vpc0AsdtdYLiYoKmU2eJIUABDvvCcGwJzOth2oeC1s1zrADOtwqSKLL1nW2cXG4Bf6f6d6hVC7RVKvv8rf8f0irImvKE6U)lJdmITHCPtWheh3M)ir0woFfhxZYhfx1NFlpCHkgSL0omiv7sKU8ohPZOI4RsM5LljsepIiDPAgIXCHk210vU0j1vD16sC(qL7GtY6gfZkRuI2YhNDl6RZg7rXVhRR6feF9f0BOcEYq2eFqtBuWSjM7XFY1BVgkPxEjnZGdzI4JMzXQ0XeErpbtg0R3y3CvRwVxHQf6bI9wbtBr9UeTzqSHLDLf1ne1TK1TD6WFfru1SMTXv
@tmspzz
tmspzz / UUID+UInt64.swift
Created April 14, 2020 09:07
UUID from and to two UInt64
extension UUID {
init(numbers: (UInt64, UInt64)) {
var firstNumber = numbers.0
var secondNumber = numbers.1
let firstData = Data(bytes: &firstNumber, count: MemoryLayout<UInt64>.size)
let secondData = Data(bytes: &secondNumber, count: MemoryLayout<UInt64>.size)
let bytes = [UInt8](firstData) + [UInt8](secondData)
let tuple: uuid_t = (bytes[0], bytes[1], bytes[2], bytes[3],
@tmspzz
tmspzz / awesome_macOS_dev_tricks.md
Last active February 15, 2022 09:06
A list of tricks useful when developing on macOS

A list of tricks useful when developing on macOS

Git & Github

$ git credential-osxkeychain erase
host=github.com
protocol=https
> [Press Return]
@tmspzz
tmspzz / TrieCleanup.swift
Last active October 10, 2019 22:42
PrefixTrie Cleanup
public struct PrefixTrie<Key: Collection, Value> where Key.Element: Hashable {
internal class Node {
var value: Value?
var step: Key.Element?
var next = [Key.Element: Node]()
var parent: Node?
init(value: Value?, step: Key.Element? = nil, parent: Node? = nil) {
self.value = value
self.parent = parent
@tmspzz
tmspzz / Color.swift
Last active June 12, 2019 09:19
Dynamic Member Lookup Colors
@dynamicMemberLookup
struct Color {
subscript(dynamicMember member: String) -> UIColor {
guard let intValue = Int(member.dropFirst().dropFirst(), radix: 16) else { return .black }
return UIColor(hexValue: intValue)
}
import Foundation
public struct CaseInsensitiveString: Codable {
let value: String
public init(caseInsensitiveString: CaseInsensitiveString) {
self.value = caseInsensitiveString.value
}
@tmspzz
tmspzz / CodableRawTypeEnum.swift
Last active February 1, 2018 21:37
Decodable Conformance of Enum backed with RawType Struct conforming to ExpressibleByStringLiteral
import Foundation
public struct Bar: Codable {
let value: String
public init(bar: Bar) {
self.value = bar.value
}
@tmspzz
tmspzz / Rakefile
Created July 11, 2017 16:06
Download HLint via a Rake task
# @example
#
# rake hlint:install[2.0.9]
namespace :hlint do
desc "Download and install hlint"
task :install, :version do |task, args|
REPO = "https://github.com/ndmitchell/hlint"
VERSION = args[:version].to_s