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
| echo "Creating an SSH key for you..." | |
| ssh-keygen -t rsa | |
| echo "Please add this public key to Github \n" | |
| echo "https://github.com/account/ssh \n" | |
| read -p "Press [Enter] key after this..." | |
| echo "Installing xcode-stuff" | |
| xcode-select --install |
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
| // Log some info | |
| // Go to the logs tab and scroll to the bottom to see logs | |
| console.log("This event happened") |
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
| // Send push to a device that created an event | |
| push.sendToDeviceID(event.data.device_id, "You just generated an event") | |
| // Send push to an alias "iPad" which one or more devices have reigstered | |
| push.sendToAlias("iPad", "Your iPad just generated an event") | |
| // Send push to a tag "device" which several devices have registered | |
| push.sendToTags("device", "Here's a message!") | |
| // Send a background push with custom data to a device that created an event but no sound |
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
| // Store custom data sent in a payload in the vault with a tag temp | |
| vault.create(JSON.stringify({temperature: event.payload.temperature}), "temp") | |
| // Update a pre-existing item with a tag temp | |
| var tempVault = vault.find("temp") | |
| vault.update(tempVault.vault_info.id, JSON.stringify({temperature: event.payload.temperature})) | |
| // Delete a vault item | |
| var tempVault = vault.find("temp") | |
| vault.destroy(tempVault.vault_info.id) |