Skip to content

Instantly share code, notes, and snippets.

@JEuler
JEuler / app-build.gradle
Created September 12, 2025 03:44
Flutter Android 16KB Setup Gist
// app/build.gradle
plugins {
id 'com.android.application'
// Use modern Kotlin Android plugin ID aligned with settings.gradle
id 'org.jetbrains.kotlin.android'
id 'dev.flutter.flutter-gradle-plugin'
}
...
@AliSoftware
AliSoftware / Demo.swift
Last active October 31, 2023 12:25
NestableCodingKey: Nice way to define nested coding keys for properties
struct Contact: Decodable, CustomStringConvertible {
var id: String
@NestedKey
var firstname: String
@NestedKey
var lastname: String
@NestedKey
var address: String
enum CodingKeys: String, NestableCodingKey {
@SamClewlow
SamClewlow / SCMockURLProtocol.m
Created February 4, 2016 13:23
A basic NSURLProtocol subclass useful for capturing and mocking JSON responses
#import "SCMockURLProtocol.h"
#define HARVEST_MODE NO
#define MOCK_MODE YES
@interface SCMockURLProtocol()<NSURLConnectionDelegate>
@property (nonatomic, strong) NSURLRequest *currentRequest;
@property (nonatomic, strong) NSURLSessionTask *currentTask;
@property (nonatomic, strong) NSURLConnection *connection;