Skip to content

Instantly share code, notes, and snippets.

View NickIliev's full-sized avatar

Nikolay Iliev NickIliev

  • Progress
  • Sofia, Bulgaria
View GitHub Profile
service firebase.storage {
match /b/{bucket}/o {
match /{allPaths=**} {
// Allow access by all users
allow read, write;
}
}
}
@NickIliev
NickIliev / app.ts
Last active November 22, 2018 12:06
Firebase storage initialization
const APPSPOT_BUCKET_URL = "gs://firebase-storage-demo.appspot.com";
firebase.init({
storageBucket: APPSPOT_BUCKET_URL
// any other options
}).then(() => {
console.log("Firebase init!");
})
@NickIliev
NickIliev / home-page.ts
Created November 20, 2018 11:52
Importing JSON files using resolveJsonModule in tsconfig.json
import config from "./config.json";
console.log(config.count); // 42
console.log(config.env); // "debug"
@NickIliev
NickIliev / config.json
Created November 20, 2018 11:49
sample JSON file
{
"count": 42,
"users": [
{"name": "John", "age": 35},
{"name": "Ann", "age": 32},
{"name": "George", "age": 24},
{"name": "Mary", "age": 27},
{"name": "Vivian", "age": 21}
],
"env": "debug"
@NickIliev
NickIliev / tsconfig.json
Created November 20, 2018 11:46
Enabling JSON imports via tsconfig.json
{
"compilerOptions": {
"module": "commonjs",
"resolveJsonModule": true,
"esModuleInterop": true
}
}