Skip to content

Instantly share code, notes, and snippets.

View pmarquees's full-sized avatar
💭
🍜

Pedro Marques pmarquees

💭
🍜
View GitHub Profile
@jnewc
jnewc / NotesApp.swift
Last active January 21, 2024 17:40
A notes app written in >100 lines of swift using SwiftUI
import SwiftUI
let dateFormatter = DateFormatter()
struct NoteItem: Codable, Hashable, Identifiable {
let id: Int
let text: String
var date = Date()
var dateText: String {
dateFormatter.dateFormat = "MMM d yyyy, h:mm a"
Promise.prototype.spread = function (fn) {
this.then(function (values) {
fn.apply(this, values)
})
}
function when () {
var requirements = Array.prototype.slice.call(arguments, 0)
return Promise.all(requirements.map(function(name){
@avar
avar / 30-income-calculon.pl
Last active February 12, 2024 18:34
Calculate your income in The Netherlands with and without a 30% ruling.
# To check if this is up-to-date with the tax rates go to
# http://www.expatax.nl/tax-rates-2016.php and see if there's anything
# newer there.
#
# I make no guarantees that any of this is correct. I calculated this
# at the time and have been updating it when new tax rates come along
# because people keep finding this useful.
#
# There's also an interactive JS version of this created by
# @stevermeister at