Skip to content

Instantly share code, notes, and snippets.

View emin-grbo's full-sized avatar
💻
Getting Schwifty

👾 emin emin-grbo

💻
Getting Schwifty
View GitHub Profile
@emin-grbo
emin-grbo / norwegian-b1-qa.md
Created March 6, 2026 20:53
Norwegian B1 Q&A

Hi! 👋

I collected these questions from facebook groups and friends who took the exam.

For the answers, I gave AI same instructions as are noted on HKDIR website, so idealy, examples should give you approximate guideline on how you should answer those quetsions. They are not made to be learned by heart, but to simply inspire you and teach you some new words you might want to use.

Any suggestions are more than welcome!

If by any chance you feel inclined to help me out in return, you can check out one app I made that helps you type in both english and norwegian (and you can access it from ANY app)

@emin-grbo
emin-grbo / Norskprøve spørsmåliste
Last active February 21, 2025 11:48
Spørsmålene jeg fant til norskprøven. (A2/B1)
1. Hva dagens unge lærer fra eldre? Bør de unge lære av eldre?
2. Hva synes du om å følge med på nyhetene gjennom døgnet? Bør nyheter være tilgjengelig 24/7?
3. Hva synes du om å spise sunn mat?
4. Gjør sosiale medier oss mindre sosial?
5. Bør barna bruke mobiltelefonen i skolen?
6. Nordmenn tar ikke kontakt med innvandrere?
7. Synes du unge mennesker har **for** høye forventninger til livet og seg selv?
8. Hva synes du er en dårlig og god skole?
9. Hva må være gratis i Norge? (Kollektivtransport, utdanning?)
10. Er bolig og gode boligforhold viktig **for** å ha et godt liv?
import Foundation
extension String {
/// Returns a percent-escaped string following RFC 3986 for a query string key or value.
///
/// RFC 3986 states that the following characters are "reserved" characters.
///
/// - General Delimiters: ":", "#", "[", "]", "@", "?", "/"
/// - Sub-Delimiters: "!", "$", "&", "'", "(", ")", "*", "+", ",", ";", "="
///
@emin-grbo
emin-grbo / decodeOrReport.swift
Created February 13, 2024 10:39
DecodeOrReport
// Used to detect specific issue with JSON decoding
func decodeOrReport(data: Data) {
do {
let _ = try JSONDecoder().decode(WidgetResponse.self, from: data)
print("\n\n👍ALL GOOD\n\n")
} catch DecodingError.keyNotFound( let key, let context) {
print("\n\n⛔️FAILED TO DECODE\n\n")
print("could not find key \(key) in JSON: \(context.debugDescription)")
} catch DecodingError.valueNotFound( let type, let context) {
print("\n\n⛔️FAILED TO DECODE\n\n")
struct AnimationWithReduceMotion<V: Equatable>: ViewModifier {
@Environment(\.accessibilityReduceMotion)
private var reduceMotion
var animation: Animation?
let value: V
func body(content: Content) -> some View {
content
@emin-grbo
emin-grbo / MaterialView.swift
Created August 24, 2022 07:06
MaterialView
struct MaterialView: View {
var foregroundColor: Color = Color.purple
let text: String
var body: some View {
Text(text)
.padding()
.background(.quaternary)
.foregroundStyle(foregroundColor)
import SwiftUI
import CoreMotion
struct CMMotionManagerTest: View {
@StateObject var motion = MotionManager()
var body: some View {
ZStack {
Color.purple
@emin-grbo
emin-grbo / 1. App.swift
Last active May 22, 2022 06:45
Voodo Arch Template
@main
struct mainApp: App {
init() {
// custom init if needed. Analytics setup and similar
}
var body: some Scene {
WindowGroup {
MainView(mainObservableObject: MainObservableObject())
@emin-grbo
emin-grbo / severance.swift
Last active April 20, 2022 08:33
Severance screentest
import SwiftUI
struct ContentView: View {
let rows = Array(repeating: GridItem(), count: 10)
@State var change: Bool = false {
didSet {
toggle()
}
@emin-grbo
emin-grbo / UnsafeRing.swift
Last active November 16, 2021 09:48
Example of a ring designed in swiftUI for un:safe app (unsafe.undeadpixel.dev)
import SwiftUI
struct Ring: View {
var body: some View {
HStack {
Spacer()
ZStack(alignment: .trailing) {
Circle()
.strokeBorder(Color.circleGradientColor, lineWidth: 50)
Circle()