Skip to content

Instantly share code, notes, and snippets.

@d-date
d-date / BundleCurrent.swift
Created April 22, 2023 09:10
Workaround for previewing SwiftPM resources
// Workaround for Bundle resource when running on Xcode previews
// https://forums.swift.org/t/xcode-previews-swiftpm-resources-xcpreviewagent-crashed/51680/10
// https://developer.apple.com/forums/thread/664295?answerId=673644022#673644022
// https://gist.github.com/ctreffs/ad9d23e08d586cf75e4d1c3bb1b1061f
import class Foundation.Bundle
import class Foundation.ProcessInfo
private class BundleFinder {}
@freak4pc
freak4pc / Combine+WithLatestFrom.swift
Last active November 25, 2024 05:58
withLatestFrom for Apple's Combine
//
// Combine+WithLatestFrom.swift
//
// Created by Shai Mishali on 29/08/2019.
// Copyright © 2019 Shai Mishali. All rights reserved.
//
import Combine
// MARK: - Operator methods
@sjones6
sjones6 / circleci_merge_target_branch.md
Created August 2, 2018 19:34
How to Merge Target Branch in CircleCI Job

Problem statement: you want to make sure that the PR branch is up-to-date with the target branch before running your CI job against it.

As a secondary concern, you don't want to run the job if there are conflicts with the target branch.

Solution:

# setup the github user
git config --global user.email $( git log --format='%ae' $CIRCLE_SHA1^! )
git config --global user.name $( git log --format='%an' $CIRCLE_SHA1^! )
@dameleon
dameleon / rx_sample_codes.md
Last active November 24, 2016 23:39
Dive to Reactive Extension with Swift サンプルコード