Skip to content

Instantly share code, notes, and snippets.

View unnamedd's full-sized avatar
🇺🇦
#StandWithUkraine

Thiago Holanda unnamedd

🇺🇦
#StandWithUkraine
View GitHub Profile
@unnamedd
unnamedd / mac-apps.md
Created December 4, 2018 10:05 — forked from erikreagan/mac-apps.md
Mac developer must-haves

Mac web developer apps

This gist's comment stream is a collection of webdev apps for OS X. Feel free to add links to apps you like, just make sure you add some context to what it does — either from the creator's website or your own thoughts.

— Erik

@unnamedd
unnamedd / vim_cheatsheet.md
Created April 21, 2019 22:26 — forked from awidegreen/vim_cheatsheet.md
Vim shortcuts

Introduction

  • C-a == Ctrl-a
  • M-a == Alt-a

General

:q        close
:w        write/saves
:wa[!]    write/save all windows [force]
:wq       write/save and close
@unnamedd
unnamedd / TextFieldTyped.swift
Last active October 9, 2022 21:05
[SwiftUI] Wrapping a UITextField into SwiftUI to use different keyboards, e.g: UIKeyboardType.twitter, UIKeyboardType.numbersAndPunctuation
// Created by Thiago Holanda on 22.06.19.
// twitter.com/tholanda
import SwiftUI
struct ContainerView: View {
@State var decimal = ""
@State var twitter = ""
@State var url = ""
@State var search = ""
@unnamedd
unnamedd / TextBorderBottom.swift
Last active September 11, 2023 21:54
[SwiftUI] Text + Border Bottom
var body: some View {
Group {
Text(language.name)
.font(.body)
.padding([.leading, .trailing], 10)
.padding([.top, .bottom], 5)
.background(Color.gray)
.overlay(
Rectangle()
.frame(height: 4)
@unnamedd
unnamedd / TextStyleButtons.swift
Last active July 1, 2019 22:34
[SwiftUI] Text style buttons
//
// ContentView.swift
// TestsWithSwiftUI
//
// Created by Thiago Holanda on 01.07.19.
// Copyright © 2019 unnamedd codes. All rights reserved.
//
import SwiftUI
@unnamedd
unnamedd / MacEditorTextView.swift
Last active April 14, 2025 11:43
[SwiftUI] MacEditorTextView - A simple and small NSTextView wrapped by SwiftUI.
/**
* MacEditorTextView
* Copyright (c) Thiago Holanda 2020-2021
* https://bsky.app/profile/tholanda.com
*
* (the twitter account is now deleted, please, do not try to reach me there)
* https://twitter.com/tholanda
*
* MIT license
*/
@unnamedd
unnamedd / MyService.swift
Created August 8, 2019 13:27 — forked from mminer/MyService.swift
Components of XPC service.
import Foundation
class MyService: NSObject, MyServiceProtocol {
func upperCaseString(_ string: String, withReply reply: @escaping (String) -> Void) {
let response = string.uppercased()
reply(response)
}
}
@unnamedd
unnamedd / UIView+Tooltips.h
Created September 15, 2019 00:53 — forked from steventroughtonsmith/UIView+Tooltips.h
WIP tooltips for Mac Catalyst
//
// UIView+Tooltips.h
// Crossword
//
// Created by Steven Troughton-Smith on 13/09/2019.
// Copyright © 2019 Steven Troughton-Smith. All rights reserved.
//
#import <UIKit/UIKit.h>
// The SwiftUI Lab
// Website: https://swiftui-lab.com
// Article: https://swiftui-lab.com/alignment-guides
import SwiftUI
class Model: ObservableObject {
@Published var minimumContainer = true
@Published var extendedTouchBar = false
@Published var twoPhases = true
protocol KeyPathUpdatable {}
extension KeyPathUpdatable {
func updating<LeafType>(_ keyPath: WritableKeyPath<Self, LeafType>, to value: LeafType) -> Self {
var copy = self
copy[keyPath: keyPath] = value
return copy
}
}