Skip to content

Instantly share code, notes, and snippets.

View crsantos's full-sized avatar

Carlos Ricardo Santos crsantos

View GitHub Profile
@crsantos
crsantos / ServiceLocator.swift
Last active May 26, 2020 14:52 — forked from FGoessler/ServiceLocator.swift
A very lightweight ServiceLocator implementation including a module mechanism written in Swift.
import Foundation
public typealias ServiceFactoryClosure<Service> = () -> Service
public protocol ServiceLocatorModule {
func registerServices(_ serviceLocator: ServiceLocator)
}
public class ServiceLocator {
@crsantos
crsantos / re_add_labels_github_repo.py
Last active February 21, 2024 17:00
Simply deletes all labels on all repos from an Organization and create new ones
from github import Github # https://github.com/PyGithub/PyGithub
import time
new_labels_to_add = [
("low", "78d60c"),
("medium", "f4df42"),
("high", "d12349")
]
g = Github("ADD_YOUR_ACCESS_TOKEN_HERE")