Skip to content

Instantly share code, notes, and snippets.

@0xack13
0xack13 / Combine+Pairwise.swift
Created August 2, 2025 21:58 — forked from fxm90/Combine+Pairwise.swift
Extension for a Combine-Publisher that returns the current and previous value.
//
// Combine+Pairwise.swift
//
// Created by Felix Mau on 17.05.21.
// Copyright © 2021 Felix Mau. All rights reserved.
//
import Combine
extension Publisher {
@0xack13
0xack13 / UserDefault.swift
Created August 2, 2025 16:09 — forked from simonbs/UserDefault.swift
Property wrapper that stores values in UserDefaults and works with SwiftUI and Combine.
/**
* I needed a property wrapper that fulfilled the following four requirements:
*
* 1. Values are stored in UserDefaults.
* 2. Properties using the property wrapper can be used with SwiftUI.
* 3. The property wrapper exposes a Publisher to be used with Combine.
* 4. The publisher is only called when the value is updated and not
* when_any_ value stored in UserDefaults is updated.
*
* First I tried using SwiftUI's builtin @AppStorage property wrapper
@0xack13
0xack13 / remove_sim_dups.py
Created May 25, 2025 21:39 — forked from buscarini/remove_sim_dups.py
Remove Xcode duplicated simulators
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import re
from subprocess import Popen, PIPE
from subprocess import call
p = Popen(["xcrun","simctl","list","devices"], stdin=PIPE, stdout=PIPE, stderr=PIPE)
output, err = p.communicate(b"input data that is passed to subprocess' stdin")
@0xack13
0xack13 / Readme.txt
Created May 3, 2025 16:58 — forked from jcward/Readme.txt
Generating iOS P12 / certs without Mac OSX Keychain (on linux, windows, etc)
1) Generate a private key and certificate signing request:
openssl genrsa -out ios_distribution.key 2048
openssl req -new -key ios_distribution.key -out ios_distribution.csr -subj '/[email protected], CN=Example, C=US'
2) Upload CSR to apple at: https://developer.apple.com/account/ios/certificate/create
- choose Production -> App Store and Ad Hoc
3) Download the resulting ios_distribution.cer, and convert it to .pem format:
@0xack13
0xack13 / Readme.txt
Created May 3, 2025 16:58 — forked from jcward/Readme.txt
Generating iOS P12 / certs without Mac OSX Keychain (on linux, windows, etc)
1) Generate a private key and certificate signing request:
openssl genrsa -out ios_distribution.key 2048
openssl req -new -key ios_distribution.key -out ios_distribution.csr -subj '/[email protected], CN=Example, C=US'
2) Upload CSR to apple at: https://developer.apple.com/account/ios/certificate/create
- choose Production -> App Store and Ad Hoc
3) Download the resulting ios_distribution.cer, and convert it to .pem format:
@0xack13
0xack13 / 1-setup.md
Created February 22, 2025 16:16 — forked from troyfontaine/1-setup.md
Signing your Git Commits on MacOS

Methods of Signing Git Commits on MacOS

Last updated March 13, 2024

This Gist explains how to sign commits using gpg in a step-by-step fashion. Previously, krypt.co was heavily mentioned, but I've only recently learned they were acquired by Akamai and no longer update their previous free products. Those mentions have been removed.

Additionally, 1Password now supports signing Git commits with SSH keys and makes it pretty easy-plus you can easily configure Git Tower to use it for both signing and ssh.

For using a GUI-based GIT tool such as Tower or Github Desktop, follow the steps here for signing your commits with GPG.

@0xack13
0xack13 / ngrams.py
Created February 17, 2025 16:52 — forked from benhoyt/ngrams.py
Print most frequent N-grams in given file
"""Print most frequent N-grams in given file.
Usage: python ngrams.py filename
Problem description: Build a tool which receives a corpus of text,
analyses it and reports the top 10 most frequent bigrams, trigrams,
four-grams (i.e. most frequently occurring two, three and four word
consecutive combinations).
NOTES
@0xack13
0xack13 / github-actions-notes.md
Created January 16, 2025 04:56 — forked from br3ndonland/github-actions-notes.md
Getting the Gist of GitHub Actions
@0xack13
0xack13 / flink-quickstart-scala.sh
Created July 13, 2024 19:49 — forked from cesarcneto/flink-quickstart-scala.sh
Create an apache-flink scala project using the provided quickstart archetype
@0xack13
0xack13 / ca.md
Created February 11, 2024 02:26 — forked from soarez/ca.md
How to setup your own CA with OpenSSL

How to setup your own CA with OpenSSL

For educational reasons I've decided to create my own CA. Here is what I learned.

First things first

Lets get some context first.