Skip to content

Instantly share code, notes, and snippets.

View hrvolapeter's full-sized avatar
🔨
Bitwelding

Peter Hrvola hrvolapeter

🔨
Bitwelding
View GitHub Profile
@hrvolapeter
hrvolapeter / znackovacie2.sh
Created March 22, 2017 16:51
znackovacie hw2 fi muni
#!/bin/bash
cd "/Users/peterhrvola/Downloads/Jaro2017 PB138 Uloha 2/dist"
for file in /Users/peterhrvola/Downloads/Jaro2017\ PB138\ Uloha\ 2/src/invalid/*
do
java -jar "/Users/peterhrvola/Downloads/Jaro2017 PB138 Uloha 2/dist/Jaro2017_PB138_Uloha2.jar" "$file"
done
@hrvolapeter
hrvolapeter / main.mir
Created March 21, 2018 14:56
borrowck-use-in-index-lvalue.mir
// MIR for `test`
// source = MirSource { def_id: DefId(0/0:3 ~ borrowck_use_in_index_lvalue[317d]::test[0]), promoted: None }
// pass_name = nll
// disambiguator = 0
| Free Region Mapping
| '_#0r | Global | ['_#0r, '_#1r]
| '_#1r | Local | ['_#1r]
|
| Inferred Region Values
// MIR for `move_out_from_begin_and_end`
// source = MirSource { def_id: DefId(0/0:3 ~ borrowck_move_out_from_array[317d]::move_out_from_begin_and_end[0]), promoted: None }
// pass_name = nll
// disambiguator = 0
| Free Region Mapping
| '_#0r | Global | ['_#0r, '_#1r]
| '_#1r | Local | ['_#1r]
|
| Inferred Region Values
DEBUG 2018-03-23T18:14:46Z: rustc_mir::borrow_check::nll::type_check: run_pass: DefId(0/0:3 ~ borrowck_move_out_from_array[317d]::move_out_from_begin_and_end[0])
DEBUG 2018-03-23T18:14:46Z: rustc_mir::borrow_check::nll::type_check: run_pass: DefId(0/0:4 ~ borrowck_move_out_from_array[317d]::move_out_by_const_index_and_subslice[0])
DEBUG 2018-03-23T18:14:46Z: rustc_mir::borrow_check::nll::type_check: run_pass: DefId(0/0:5 ~ borrowck_move_out_from_array[317d]::main[0])
DEBUG 2018-03-23T18:14:46Z: rustc_mir::borrow_check: run query mir_borrowck: move_out_from_begin_and_end
DEBUG 2018-03-23T18:14:46Z: rustc_mir::borrow_check::nll: replace_regions_in_mir(def_id=DefId(0/0:3 ~ borrowck_move_out_from_array[317d]::move_out_from_begin_and_end[0]))
DEBUG 2018-03-23T18:14:46Z: rustc_mir::borrow_check::nll::universal_regions: build(mir_def_id=DefId(0/0:3 ~ borrowck_move_out_from_array[317d]::move_out_from_begin_and_end[0]))
DEBUG 2018-03-23T18:14:46Z: rustc_mir::borrow_check::nll::universal_regions: build: param_env=Param
// MIR for `test`
// source = MirSource { def_id: DefId(0/0:3 ~ borrowck_use_in_index_lvalue[317d]::test[0]), promoted: None }
// pass_name = nll
// disambiguator = 0
| Free Region Mapping
| '_#0r | Global | ['_#0r, '_#1r]
| '_#1r | Local | ['_#1r]
|
| Inferred Region Values
@hrvolapeter
hrvolapeter / authenticationView.swift
Last active March 22, 2020 16:11
Zetten - tutorial authenticationView step 1
import SwiftUI
struct LoginView: View {
@State var email: String = ""
@State var password: String = ""
var body: some View {
VStack {
Text("Login")
.font(.title)
@hrvolapeter
hrvolapeter / createAccountView.swift
Created March 22, 2020 17:28
Zetten - createAccountView part 2
struct CreateAccountView: View {
@State var email: String = ""
@State var password: String = ""
var body: some View {
VStack {
Text("Create an account")
.font(.title)
TextField("Email", text: $email)
.autocapitalization(.none)
@hrvolapeter
hrvolapeter / loginViewLink.swift
Created March 22, 2020 17:34
Zetten - login link to create account part 3
@hrvolapeter
hrvolapeter / AppDelegate.swift
Created March 22, 2020 17:50
Zetten - app delegate part 4
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
FirebaseApp.configure()
return true
}
@hrvolapeter
hrvolapeter / AuthenticationService.swift
Last active March 22, 2020 18:36
Zetten authentication service part 5
import Firebase
class AuthenticationService: ObservableObject {
@Published var user: User?
var cancellable: AuthStateDidChangeListenerHandle?
init() {
cancellable = Auth.auth().addStateDidChangeListener { (_, user) in
if let user = user {
logger.event("Got user: \(user.uid)")