Skip to content

Instantly share code, notes, and snippets.

View betty-godier's full-sized avatar

Betty Godier betty-godier

View GitHub Profile
@betty-godier
betty-godier / new-weather-4.swift
Last active September 13, 2022 11:26
Add property wrapper @State
import CoreLocation
import SwiftUI
import WeatherKit
struct ContentView: View {
@State private var currentSymbol: String?
@State private var conditions: String?
var body: some View {
ScrollView {
@betty-godier
betty-godier / new-weather-3.swift
Last active September 13, 2022 11:26
Creation fund loadWeather, make a new task, create let location, let weather
import CoreLocation
import SwiftUI
import WeatherKit
struct ContentView: View {
private var currentSymbol: String?
private var conditions: String?
var body: some View {
ScrollView {
@betty-godier
betty-godier / new-weather-2.swift
Created September 13, 2022 10:52
Creation of the construction of the view , ScrollView, VStack
import SwiftUI
struct ContentView: View {
private var currentSymbol: String?
private var conditions: String?
var body: some View {
ScrollView {
VStack {
if let currentSymbol {
@betty-godier
betty-godier / new-weather-1.swift
Last active September 13, 2022 10:53
Creation of 2 private var `currentSymbol` `and condition`
import SwiftUI
struct ContentView: View {
private var currentSymbol: String?
private var conditions: String?
var body: some View {
VStack {
Image(systemName: "globe")
.imageScale(.large)
@betty-godier
betty-godier / new-weather-0.swift
Last active September 13, 2022 10:35
New Project SwiftUI
import SwiftUI
struct ContentView: View {
var body: some View {
VStack {
Image(systemName: "globe")
.imageScale(.large)
.foregroundColor(.accentColor)
Text("Hello, world!")
}
@betty-godier
betty-godier / Cannot convert return expression of type '.md
Last active May 25, 2021 13:23
Cannot convert return expression of type 'Fail< >' to return type 'AnyPublisher< >'

Author: Betty Godier | Twitter: @BettyGodier | Email: [email protected]

#Useful solution to Fix mistake with Combine and publisher

"Cannot convert return expression of type 'Fail< >' to return type 'AnyPublisher< >' "

or

"Cannot convert return expression of type 'Result< >' to return type 'AnyPublisher< >' "

@betty-godier
betty-godier / passphrase ssh.md
Last active May 20, 2021 13:13
stop writing passphrase ssh

Author: Betty Godier | Twitter: @BettyGodier | Email: [email protected]

#Useful solution to Fix asking passphrase ssh

1️⃣ Run this in git bash: eval ssh-agent -s ssh-add ~/.ssh/*_rsa

2️⃣ it will ask for pass phrase in the second command, and that's it. Each additional action you will need to do (which once required pass phrase) won't ask you for the pass phrase.

@betty-godier
betty-godier / suppress ds store.md
Last active May 20, 2021 13:07
suppress ds store

Author: Betty Godier | Twitter: @BettyGodier | Email: [email protected]

#Useful solution to Fix Git Problems with .DS_Store

1️⃣ Delete the existing files from the repository:

find . -name .DS_Store -print0 | xargs -0 git rm -f --ignore-unmatch

2️⃣ Add row