Skip to content

Instantly share code, notes, and snippets.

View tjmaynes's full-sized avatar
🔌
Focused

TJ Maynes tjmaynes

🔌
Focused
View GitHub Profile
[dependencies]
actix-web = "4.0.0-beta.8"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
sqlx = { version = "0.5.7", features = [ "runtime-actix-native-tls", "postgres" ] }
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
SELECT 'CREATE DATABASE member'
WHERE NOT EXISTS (SELECT FROM pg_database WHERE datname = 'member')\gexec
...
struct ContentView: View {
@State private var selection: String?
var body: some View {
NavigationView {
VStack {
ButtonView(
message: "First screen",
import SwiftUI
struct ButtonView: View {
let message: String
let buttonTitle: String
let onTap: () -> Void
var body: some View {
VStack {
Text(message).padding()
@main
struct AwesomeApp: App {
var body: some Scene {
WindowGroup {
MainView()
}
}
}
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()
@tjmaynes
tjmaynes / introrx.md
Created May 17, 2020 04:37 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing

XCode Cheatsheet

;;; 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