Skip to content

Instantly share code, notes, and snippets.

View ammeep's full-sized avatar
🍠
yam

Aims Palamountain ammeep

🍠
yam
View GitHub Profile
@neilsmithdesign
neilsmithdesign / swift-ui-protocol-view-models.swift
Last active April 27, 2024 17:13
SwiftUI views with protocol interfaces to view models.
import SwiftUI
/// View model protocol
protocol ViewModel: ObservableObject {
var count: Int { get }
func increase()
}
/// Concrete implementation
class MyViewModel: ViewModel {
@acarrillo
acarrillo / gist:5772508
Created June 13, 2013 09:44
On Google Spreadsheet form submission, push new entry to a MailChimp subscription list with an `onformsubmit` trigger. Uses the MailChimp API and Google Apps Script.
var API_KEY = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';
var mc_base_url = 'http://us7.api.mailchimp.com/1.3/?method=listSubscribe';
var mc_list_id = 'xxxxxxxxxx';
var mc_double_optin = false;
/**
* Uses the MailChimp API to add a subscriber to a list.
*/
function sendToMailChimp_(fn, ln, em, yr){