Skip to content

Instantly share code, notes, and snippets.

View imcat's full-sized avatar

Rimantas Liubertas imcat

View GitHub Profile
@Sherlouk
Sherlouk / DebugDevice.swift
Last active December 10, 2023 19:24
Debug Profiles - Securely debugging in production
//
// DebugDevice.swift
//
// Copyright 2022 • Sidetrack Tech Limited
//
import Foundation
// This must be called on the main-thread.
var isDebugProfileInstalled: Bool {
@eMdOS
eMdOS / NibLoadableView.swift
Last active October 15, 2021 12:29
Reusable views and cell registration and dequeuing (for table views and collection views)
protocol NibLoadableView: class {
static var nibName: String { get }
}
extension NibLoadableView where Self: UIView {
static var nibName: String {
return String(describing: self)
}
}

This document has moved!

It's now here, in The Programmer's Compendium. The content is the same as before, but being part of the compendium means that it's actively maintained.

@vasanthk
vasanthk / System Design.md
Last active May 9, 2024 16:45
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@jameslafa
jameslafa / event.rb
Last active July 5, 2019 23:32 — forked from bbonamin/event.rb
Handle translations with Globalize3 in Active Admin with Rails 4
#app/models/event.rb
class Event < ActiveRecord::Base
translates :title, :description, :summary
has_many :event_translations
accepts_nested_attributes_for :event_translations, :allow_destroy => true
end