Heavily informed by the work of @katowulf in this gist - https://gist.github.com/katowulf/f264e7e0c7b8cefd1bcf/eddbadfbafe9e1fe658c51e43e25ac51e26d65b6
MIT
- Angular === 1.5.0
- Firebase === 2.4.1
| import { Link } from 'react-router-dom' | |
| import { Badge, Col, Menu } from 'antd' | |
| const StyledBadge = styled(Badge)` | |
| .ant-badge-count { | |
| background-color: #7ECBBF; | |
| color: white; | |
| box-shadow: 0 0 0 1px #d9d9d9 inset; | |
| } | |
| ` |
| var Rx = require('rxjs'); | |
| var firebase = require('firebase'); | |
| firebase.initializeApp({ | |
| "databaseURL": "https://quiver-two.firebaseio.com", | |
| "serviceAccount": "./service-account.json" | |
| }); | |
| var ref = firebase.database().ref('rxjs-demo'); | |
| Rx.Observable.fromPromise(ref.remove()) | |
| .map(function () { |
| function asyncFunc(e) { | |
| return new Promise((resolve, reject) => { | |
| setTimeout(() => resolve(e), e * 1000); | |
| }); | |
| } | |
| const arr = [1, 2, 3]; | |
| let final = []; | |
| function workMyCollection(arr) { |
| //const tpl = makeTemplate('hello ${name}') | |
| //const name = 'world'; | |
| //tpl({name}); | |
| const makeTemplate = (templateString) => { | |
| return (templateData) => new Function(`{${Object.keys(templateData).join(',')}}`, 'return `' + templateString + '`')(templateData); | |
| } |
| function pbcopy(data) { | |
| var proc = require('child_process').spawn('pbcopy'); | |
| proc.stdin.write(data); | |
| proc.stdin.end(); | |
| } |
| var saveUser = function(user, cb) { | |
| var ref = new Firebase("https://<your-firebase>.firebaseio.com"); | |
| var usersRef = ref.child('users'); | |
| usersRef.child('count').once('value', function(snap) { | |
| var priority = snap.val() ? snap.val() : 0; | |
| usersRef.child(user.uid).setWithPriority(user, priority, function() { | |
| // on complete, update user count | |
| usersRef.child('count').transaction(function (current_value) { return (current_value || 0) + 1; }); | |
| }); |
| function go() { | |
| var userId = prompt('Username?', 'Guest'); | |
| var userData = { name: userId }; | |
| tryCreateUser(userId, userData); | |
| } | |
| var USERS_LOCATION = 'https://<Firebase URL>.com/users'; | |
| function userCreated(userId, success) { | |
| if (!success) { |
| app_identifier "com.yourorganization.mytodoapp" # The bundle identifier of your app | |
| apple_id "<You Apple Id>" # Your Apple email address | |
| # You can uncomment any of the lines below and add your own | |
| # team selection in case you're in multiple teams | |
| # team_name "CAMobileApp" | |
| # team_id "Q2CBPJ58CA" | |
| # you can even provide different app identifiers, Apple IDs and team names per lane: | |
| # https://github.com/KrauseFx/fastlane/blob/master/docs/Appfile.md |
| #!/usr/bin/env node | |
| var fs = require("fs"), | |
| path = require("path"); | |
| var rootdir = process.argv[2]; | |
| if (rootdir) { | |
| module.exports = function(context) { |
Heavily informed by the work of @katowulf in this gist - https://gist.github.com/katowulf/f264e7e0c7b8cefd1bcf/eddbadfbafe9e1fe658c51e43e25ac51e26d65b6
MIT