Skip to content

Instantly share code, notes, and snippets.

View robertpetras's full-sized avatar
:octocat:
Teaching SwiftUI and iOS App Development at SwiftUI Masterclass Course

Robert Petras robertpetras

:octocat:
Teaching SwiftUI and iOS App Development at SwiftUI Masterclass Course
View GitHub Profile
@jnewc
jnewc / NotesApp.swift
Last active December 18, 2024 13:41
A notes app written in <100 lines of swift using SwiftUI
import SwiftUI
let dateFormatter = DateFormatter()
struct NoteItem: Codable, Hashable, Identifiable {
let id: Int
let text: String
var date = Date()
var dateText: String {
dateFormatter.dateFormat = "MMM d yyyy, h:mm a"
@lopspower
lopspower / README.md
Last active May 28, 2025 13:09
Hexadecimal color code for transparency

Hexadecimal color code for transparency

Twitter

How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

Download This sample on Google Play Store

@rossluebe
rossluebe / Twig Snippets for Atom
Created May 7, 2014 20:09
Twig Snippets for Atom
'.text.html.twig':
'Tag Print':
'prefix': '}}'
'body': '{{ $1 }}$0'
'Tag Block':
'prefix': '%%'
'body': '{% $1$2 %}$0{% end$1 %}'
'Tag Block (Block)':
@rosswd
rosswd / multi-git-win.md
Last active December 30, 2024 13:49
Setting up a Github and Bitbucket account on the same computer on Mac OS. Now with a guide for Windows 10.

Setting up github and bitbucket on the same computer (Windows)

Guide for Windows

mix3d asked for some help using this guide with windows so here we go. This was tested with Windows 10. Run all commands in Git Bash once it's installed.

Github will be the main account and bitbucket the secondary.

Git for Windows

  • Download and install Git for Windows
    • In the installer, select everything but decide if you want a desktop icon (2nd step)