This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const mapsToken = 'Your Google Maps API token'; | |
export const weatherToken = 'Your OpenWeatherMap API token'; | |
export const fromPhoneNumber = 'Your Twilio phone number'; | |
export const twilioSid = 'Your Twilio SID'; | |
export const twilioToken = 'Your Twilio token'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Install lodash and airtable with npm or yarn | |
const _ = require('lodash'); | |
const Airtable = require('airtable'); | |
// Get API key and base ID from https://airtable.com/api | |
const base = new Airtable({apiKey: 'YOUR_API_KEY'}).base('YOUR_BASE_ID'); | |
// Fill in your table and field names. | |
const tableName = 'Table 1'; | |
const emailField = 'Email'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$data = array( | |
"fields" => array( | |
"Name" => "Hello world" | |
) | |
); | |
$data_json = json_encode($data); | |
$ch = curl_init("https://api.airtable.com/v0/YOUR_BASE_ID/YOUR_TABLE_NAME?api_key=YOUR_API_KEY"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct Box<T> { | |
let value: T | |
} | |
// This works: | |
let boxes1 = [Box(value: 42), Box(value: "hi")] | |
// This works: | |
let boxes2 = [Box(value: 42), Box(value: "hi")] as [Box<Any>] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This compiles: | |
func immediateOr(args:Bool...) -> Bool { | |
for arg in args { | |
if arg { | |
return true | |
} | |
} | |
return false | |
} |