Skip to content

Instantly share code, notes, and snippets.

View parpok's full-sized avatar
:octocat:
Just git it

Patryk parpok

:octocat:
Just git it
View GitHub Profile
import SwiftData
import SwiftUI
@available(iOS 17, *)
@Model
class TestData {
var id: UUID
var text: String
init(id: UUID, text: String) {
#Preview {
do {
let config = ModelConfiguration(isStoredInMemoryOnly: true)
let container = try ModelContainer(for: Item.self, configurations: config)
let example = Item("Insert Item Parameters")
return PostView(Item: example)
.modelContainer(container)
}
catch {
@parpok
parpok / changes_report.html
Created June 7, 2023 20:36
pkgdiff report comparing Swift build from swift.org and from swiftlang.xyz repository on Ubuntu 22.04
<!-- changed:100;added:1028;removed:1110;moved:1015;renamed:0;changed:0;tool_version:1.7.2 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords" content="swift, changes, report" />
<meta name="description" content="Changes report for the swift package between 5.8.1-RELEASE-ubuntu22.04 and 5.8.1-1.0.0-ubuntu-jammy versions" />
<title>
swift: 5.8.1-RELEASE-ubuntu22.04 to 5.8.1-1.0.0-ubuntu-jammy changes report
</title>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>#WARNING - 1</key>
<string>This is just a sample. Do NOT try loading it.</string>
<key>#WARNING - 2</key>
<string>Ensure you understand EVERY field before booting.</string>
<key>#WARNING - 3</key>
<string>In most cases recommended to use Sample.plist</string>
bądź spoko
nie wyzywaj OK
Cool
to jest eksperyment
@parpok
parpok / WindowsBoot.sh
Created October 13, 2022 17:06
Reboot to Windows from Linux (must have grub set up to do so)
sudo grub-reboot "$(grep -i windows /boot/grub/grub.cfg|cut -d"'" -f2)" && sudo reboot