Skip to content

Instantly share code, notes, and snippets.

View matthiaszarzecki's full-sized avatar
🍏

matthias_code matthiaszarzecki

🍏
View GitHub Profile
@jordansinger
jordansinger / AppleLogo.swift
Created June 16, 2021 18:37
Original Apple logo in SwiftUI
import SwiftUI
struct ContentView: View {
var body: some View {
VStack(spacing: 0) {
Color.green
Color.green
Color.green
Color.yellow
Color.orange
@steipete
steipete / RandomColor.swift
Created April 6, 2021 17:20
Random Color for SwiftUI
extension Color {
/// Return a random color
static var random: Color {
return Color(
red: .random(in: 0...1),
green: .random(in: 0...1),
blue: .random(in: 0...1)
)
}
}
@markmals
markmals / Wiggle.swift
Last active March 30, 2025 12:15
The iOS Home Screen wiggle animation, in SwiftUI
import SwiftUI
extension View {
func wiggling() -> some View {
modifier(WiggleModifier())
}
}
struct WiggleModifier: ViewModifier {
@State private var isWiggling = false
@kyleshevlin
kyleshevlin / index.js
Last active September 22, 2020 12:39
Recolor your GH contribution graph
// Run this in your console with whatever `newColors` you choose.
function recolorContributionGraph(newColors) {
const days = [...document.querySelectorAll('.day')]
const legendItems = [...document.querySelectorAll('.legend > li')]
const colors = [
...days.reduce((acc, day) => {
acc.add(day.getAttribute('fill'))
return acc
}, new Set()),
]
@erluxman
erluxman / rectangularnotch.dart
Created April 28, 2020 02:28
Rectangular notched Fab
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
@av
av / main.dart
Created January 13, 2020 18:44
Flutter: neu
import 'package:flutter/material.dart';
void main() => runApp(NeumorphicApp());
class NeumorphicApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Neumorphic App',
theme: ThemeData(
@markmals
markmals / Swift Wish List.md
Last active June 12, 2022 21:10
Features I would like to see from Swift and its core ecosystem

Swift Wish List

Features I would like to see from Swift and its core ecosystem, to make it a robust and ergonomic language for all use cases.

  • ❌ = Unimplemented
  • 📜 = Manifesto
  • ⚾️ = Pitch
  • 💍 = Proposal
  • ⛔️ = Partially Implemented / Awaiting Implementation
  • ⚠️ = In Active Review
@zacwest
zacwest / ios-font-sizes.swift
Last active April 13, 2025 15:39
iOS default font sizes - also available on https://www.iosfontsizes.com
let styles: [UIFont.TextStyle] = [
// iOS 17
.extraLargeTitle, .extraLargeTitle2,
// iOS 11
.largeTitle,
// iOS 9
.title1, .title2, .title3, .callout,
// iOS 7
.headline, .subheadline, .body, .footnote, .caption1, .caption2,
]
@Hamcha
Hamcha / SmoothFollow.cs
Created July 28, 2013 00:45
Stupid Unity scripts : "Smooth Follow" from Standard Assets
// Smooth Follow from Standard Assets
// Converted to C# because I fucking hate UnityScript and it's inexistant C# interoperability
// If you have C# code and you want to edit SmoothFollow's vars ingame, use this instead.
using UnityEngine;
using System.Collections;
public class SmoothFollow : MonoBehaviour {
// The target we are following
public Transform target;