Skip to content

Instantly share code, notes, and snippets.

View TwoDollarsEsq's full-sized avatar
🦊

Artyom Rudakov TwoDollarsEsq

🦊
  • Ukraine, Dnipro
  • 20:27 (UTC +03:00)
View GitHub Profile
import Foundation
import PlaygroundSupport
/// A thread-safe array.
public class SynchronizedArray<Element> {
private let queue = DispatchQueue(label: "io.zamzam.ZamzamKit.SynchronizedArray", attributes: .concurrent)
private var array = [Element]()
public init() { }
@CaptinKraken
CaptinKraken / TargetProcess Dark Theme - Stylish.css
Last active September 10, 2020 14:09
TargetProcess Dark Theme - Stylish
@-moz-document domain('tpondemand.com') {
.tau-board,
.tau-cover-view,
.tau-bubble-board__inner,
.quick-add,
.tau-teams-projects-manager .tau-teams-projects-search,
.tau-teams-projects-manager .tau-teams-projects-search:after,
.tau-bubble__inner,
.system-info,
.tau-in-text,
@swillits
swillits / Keycodes.swift
Last active July 15, 2025 04:47
Swift Keyboard Keycodes
struct Keycode {
// Layout-independent Keys
// eg.These key codes are always the same key on all layouts.
static let returnKey : UInt16 = 0x24
static let enter : UInt16 = 0x4C
static let tab : UInt16 = 0x30
static let space : UInt16 = 0x31
static let delete : UInt16 = 0x33
static let escape : UInt16 = 0x35
@martinbuberl
martinbuberl / git-import-repository.md
Last active May 28, 2025 21:05
Import an Existing Git Repository into Another

Import an Existing Git Repository into Another

Before: Folder Structure (Two Separate Repositories)

XXX
 |- .git
 |- (project files)
YYY
 |- .git
@andreacipriani
andreacipriani / Bash.swift
Last active June 11, 2025 09:19
Execute shell/bash commands from Swift
import UIKit
protocol CommandExecuting {
func run(commandName: String, arguments: [String]) throws -> String
}
enum BashError: Error {
case commandNotFound(name: String)
}
@danieleggert
danieleggert / GPG and git on macOS.md
Last active March 6, 2025 20:45
How to set up git to use the GPG Suite

GPG and git on macOS

Setup

No need for homebrew or anything like that. Works with https://www.git-tower.com and the command line.

  1. Install https://gpgtools.org -- I'd suggest to do a customized install and deselect GPGMail.
  2. Create or import a key -- see below for https://keybase.io
  3. Run gpg --list-secret-keys and look for sec, use the key ID for the next step
  4. Configure git to use GPG -- replace the key with the one from gpg --list-secret-keys
@PurpleBooth
PurpleBooth / README-Template.md
Last active July 17, 2025 05:44
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

#!/usr/bin/env python3
# -*- coding: utf-8 -*-
'''
BMP Inspector: Prints BPM file information and pixel array statistics
Copyright (C) 2015 Jan Marjanovic <[email protected]>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@armadsen
armadsen / SceneKitCheatSheet.m
Last active October 28, 2021 08:06
Cheat sheet for SceneKit learning app (Objective-C)
// Configure the Scene View
self.sceneView.backgroundColor = [UIColor darkGrayColor];
// Create the scene
SCNScene *scene = [SCNScene scene];
@gurgeous
gurgeous / CGMath.swift
Last active November 21, 2024 13:22
missing operators for CGPoint, CGSize and CGRect
//
// MARK: CGPoint op point/size/float
//
func -(l: CGPoint, r: CGPoint) -> CGPoint { return CGPoint(x: l.x - r.x, y: l.y - r.y) }
func +(l: CGPoint, r: CGPoint) -> CGPoint { return CGPoint(x: l.x + r.x, y: l.y + r.y) }
func *(l: CGPoint, r: CGPoint) -> CGPoint { return CGPoint(x: l.x * r.x, y: l.y * r.y) }
func /(l: CGPoint, r: CGPoint) -> CGPoint { return CGPoint(x: l.x / r.x, y: l.y / r.y) }
func -(l: CGPoint, r: CGSize) -> CGPoint { return CGPoint(x: l.x - r.width, y: l.y - r.height) }