This file contains 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
Verifying my Blockstack ID is secured with the address 1VtUpGViwMuFsnbVHudge1nYvpNKGoMNn https://explorer.blockstack.org/address/1VtUpGViwMuFsnbVHudge1nYvpNKGoMNn |
This file contains 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
init(json: Dictionary<String, AnyObject>){ | |
var name: String? = json[ "trackName" ] as AnyObject? as? String | |
if !name? { | |
name = json[ "collectionName" ] as AnyObject? as? String | |
} | |
//Sometimes price comes in as formattedPrice, sometimes as collectionPrice.. and sometimes it's a float instead of a string. Hooray! | |
var price: String? = json["formattedPrice"] as AnyObject? as? String | |
if !price? { |
This file contains 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
{ | |
"rules": { | |
".read": false, | |
"{{your-data-endpoint-root}}": { // ie: blog | |
".write": false, // prevents /blog from being overwritten | |
"{{child-endpoint}}": { // ie: entries | |
".write": false, // prevents /blog/entries from being overwritten | |
"$other": { // allows for writes to /blog/entries/{{key}} | |
".write": true |
This file contains 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
// wrap in a closure to get at the global, | |
// no matter where we are. | |
(function () { this.env = this.env || "prod" })() | |
// in production mode, be fast. | |
// in development/testing mode, add some error checking. | |
function Class (ctor, parent, proto) { | |
if (typeof parent === "object") { | |
proto = parent | |
parent = null |
This file contains 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
<script> | |
function getPicture() { | |
navigator.camera.getPicture(getPicture_Success, null, { quality: 10 }); | |
}; | |
function getPicture_Success(imageData) { | |
alert("getpic success"); | |
document.getElementById("test_img").src = "data:image/jpeg;base64," + imageData; | |
} | |
</script> |