Skip to content

Instantly share code, notes, and snippets.

@JohnyLisir
JohnyLisir / DarwinNotificationCenter.swift
Created October 19, 2022 08:52 — forked from AvdLee/DarwinNotificationCenter.swift
A notification center for Darwin Notifications. MIT License applies.
//
// DarwinNotificationCenter.swift
//
// Copyright © 2017 WeTransfer. All rights reserved.
//
import Foundation
/// A Darwin notification payload. It does not contain any userInfo, a Darwin notification is purely event handling.
public struct DarwinNotification {
@JohnyLisir
JohnyLisir / duplicate_xcode_project_target.rb
Created January 31, 2018 03:13 — forked from ratazzi/duplicate_xcode_project_target.rb
Duplicate Xcode Project Target with Ruby
#!/usr/bin/env ruby
require 'rubygems'
require 'xcodeproj'
name = 'test_copy'
proj = Xcodeproj::Project.open('test.xcodeproj')
src_target = proj.targets.find { |item| item.to_s == 'test' }