Skip to content

Instantly share code, notes, and snippets.

View tjmaynes's full-sized avatar
🔌
Focused

TJ Maynes tjmaynes

🔌
Focused
View GitHub Profile
@tjmaynes
tjmaynes / notes_from_clear_architecture_robert_c_martin.md
Created November 30, 2019 15:58 — forked from lorenadl/notes_from_clear_architecture_robert_c_martin.md
Notes from "Clean Architecture" - Robert C. Martin

Notes from "Clean Architecture" - Robert C. Martin

Part I: Introduction

What is design and architecture

"Architecture" is often used in the context of something at a high level, whereas "design" more often seems to imply structures and decisions at lower level. But this usage is nonsensical. In software design the low-level details and the high-level stucture are all part of the same whole, there is a continuum of decisions from the highest to the lowest levels.

;;; htmlize.el --- Convert buffer text and decorations to HTML. -*- lexical-binding: t -*-
;; Copyright (C) 1997-2003,2005,2006,2009,2011,2012,2014,2017,2018 Hrvoje Niksic
;; Author: Hrvoje Niksic <[email protected]>
;; Homepage: https://github.com/hniksic/emacs-htmlize
;; Keywords: hypermedia, extensions
;; Version: 1.56
;; This program is free software; you can redistribute it and/or modify

XCode Cheatsheet

@tjmaynes
tjmaynes / introrx.md
Created May 17, 2020 04:37 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
import XCTest
class AwesomeAppUITests: XCTestCase {
func test_whenUserTapsThroughMoreThanTwoScreens_itShouldTakeThemToLastScreen() {
let app = XCUIApplication()
app.launch()
XCTAssertTrue(app.staticTexts["First screen"].exists)
app.buttons["Tap me!"].tap()
@main
struct AwesomeApp: App {
var body: some Scene {
WindowGroup {
MainView()
}
}
}
import SwiftUI
struct ButtonView: View {
let message: String
let buttonTitle: String
let onTap: () -> Void
var body: some View {
VStack {
Text(message).padding()
...
struct ContentView: View {
@State private var selection: String?
var body: some View {
NavigationView {
VStack {
ButtonView(
message: "First screen",
SELECT 'CREATE DATABASE member'
WHERE NOT EXISTS (SELECT FROM pg_database WHERE datname = 'member')\gexec
version: '3.1'
services:
my-service-db:
image: "postgres:11.5-alpine"
restart: always
volumes:
- my-service-volume:/var/lib/postgresql/data/
- ./db:/docker-entrypoint-initdb.d/
networks:
- my-service-network