Skip to content

Instantly share code, notes, and snippets.

@davibe
davibe / example.swift
Created March 16, 2017 10:19
react-native swift module with no macros
//
// RCTViewController.swift
// Grocerest
//
// Created by Davide Bertola on 15/03/2017.
//
import Foundation
import UIKit
@natecook1000
natecook1000 / operatorCharacters.swift
Last active September 2, 2024 22:07
Allowed characters for Swift operators
import Foundation
extension UnicodeScalar : ForwardIndexType {
public func successor() -> UnicodeScalar {
return UnicodeScalar(value + 1)
}
}
var operatorHeads: [UnicodeScalar] = Array("=-+!*%<>&|^~?".unicodeScalars)
operatorHeads += Array("\u{00A1}" ... "\u{00A7}")
@Revolucent
Revolucent / git-gat
Last active July 22, 2018 23:39
The Git Gatling Gun: Perform operations on multiple side-by-side git repositories.
#!/bin/bash
# Git Gat: The Git Gatling Gun!
# Perform operations machine-gun style on side-by-side git repositories.
#
# Save this somewhere on your path as git-gat (or whatever you want to call it).
# Usage:
#
# git gat status
# git gat -f status # Perform operation even if the repo is dirty.
@Revolucent
Revolucent / BitwiseOptions.swift
Last active September 22, 2018 12:46
BitwiseOptions implementation for Swift
//
// BitwiseOptions.swift
//
// Created by Gregory Higley on 11/24/14.
// Copyright (c) 2014 Prosumma LLC. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell