Skip to content

Instantly share code, notes, and snippets.

View Mr-Alirezaa's full-sized avatar
👨‍💻

Alireza Asadi Mr-Alirezaa

👨‍💻
View GitHub Profile
@AlexKobachiJP
AlexKobachiJP / Process+Run.swift
Created February 21, 2023 08:55
Creates a process and launches an exectuable with arguments.
// Copyright © 2022 Alex Kovács. All rights reserved.
#if os(macOS)
import Foundation
extension Process {
/// Creates a process and launches an exectuable with arguments.
///
@ole
ole / MyMainActor.swift
Last active October 23, 2023 20:46
A reimplementation of the basics of MainActor. Sample code for https://oleb.net/2022/how-mainactor-works/
import Dispatch
@globalActor
final actor MyMainActor {
// Don’t allow others to create instances
private init() {}
// Requirements from the implicit GlobalActor conformance
typealias ActorType = MyMainActor
@dannygsmith
dannygsmith / valet-plus-destroy
Last active July 18, 2023 09:07
Remove valet-plus - reboot required
#!/usr/bin/env bash
#styles
VP_NONE='\033[00m'
VP_RED='\033[01;31m'
VP_GREEN='\033[01;32m'
VP_YELLOW='\033[01;33m'
VP_PURPLE='\033[01;35m'
VP_CYAN='\033[01;36m'
VP_WHITE='\033[01;37m'