- Create Directory for your app
mkdir my-app
- get the sapper template
npx degit "sveltejs/sapper-template#rollup"
- Install the packages
npm i
- Install express server
npm i express
- Initialize Firebase
firebase init
rules_version = '2'; | |
service cloud.firestore { | |
match /databases/{database}/documents { | |
function isAuthenticated() { | |
return request.auth != null; | |
} | |
function isDefined(field) { | |
return field in request.resource.data |
const batchWrapper = async (documentRef, action, update) => { | |
const batchArray = []; | |
batchArray.push(db.batch()); | |
let operationCounter = 0; | |
let batchIndex = 0; | |
documentRef.forEach(doc => { | |
console.log('Org cleanup: deleting notifications', doc.id); | |
if (action === 'delete') { | |
batchArray[batchIndex].delete(doc.ref); |
name: Test, Build and Deploy | |
on: | |
pull_request: | |
types: [closed] | |
jobs: | |
build-test-release: | |
if: github.event.action == 'closed' && github.event.pull_request.merged == true | |
runs-on: ubuntu-latest |
// Credits to the following posts that helps me to reduce build times drastically | |
// https://discuss.emberjs.com/t/tips-for-improving-build-time-of-large-apps/15008/12 | |
// https://www.gokatz.me/blog/how-we-cut-down-our-ember-build-time/ | |
//ember-cli-build.js | |
let EmberApp = require('ember-cli/lib/broccoli/ember-app'); | |
let env = EmberApp.env(), |
echo code --install-extension | |
code --install-extension aaron-bond.better-comments | |
code --install-extension alefragnani.project-manager | |
code --install-extension ardenivanov.svelte-intellisense | |
code --install-extension cbuelter.vscode-toggle-max-editor | |
code --install-extension christian-kohler.path-intellisense | |
code --install-extension DavidAnson.vscode-markdownlint | |
code --install-extension dbaeumer.vscode-eslint | |
code --install-extension donjayamanne.githistory | |
code --install-extension dracula-theme.theme-dracula |
{"lastUpload":"2020-08-13T16:51:00.817Z","extensionVersion":"v3.4.3"} |
JSONStream = require('JSONStream'); | |
es = require('event-stream'); | |
fileStream = storage.bucket('your-bucket').file('your-JSON-file').createReadStream(); | |
db = admin.firestore(); | |
return new Promise( (resolve, reject) => { | |
batchPromises = []; | |
batchSize = 0; | |
batch = db.batch(); |
Nespresso Expert machine has the Bluetooth ability which officially can be used only by Nespresso mobile app and it does not offer any API for 3rd party applications and services. Moreover, the Bluetooth services and characteristics are not documented and easy to use by the other Bluetooth libraries plus there is no documentation for the Bluetooth packets payload that need to be sent or received.
However, after searching a lot and sniffing the packets for a couple of days, I've been able to hack the machine and write the small nodejs application using noble and express to control and monitor the machine with Rest API exposed by express through Bluetooth connection. As I did this application for my ex-company and they are still using it for their demo I cannot share the code but I'm going to explain how it works.
_Thanks to this