nielsmaerten / peppermint Goto Github PK
View Code? Open in Web Editor NEWNature's most beautiful wallpapers, right in your Dropbox
Home Page: https://peppermint.pw
Nature's most beautiful wallpapers, right in your Dropbox
Home Page: https://peppermint.pw
I don't like this. It's gonna make approx 20 calls to firebase in rapid succession. Even with firebase, that's probably not good. It might be better to fetch the entire list, and compare in memory. But of course, the list gets larger as time goes on... Ideally, only 1 query is fired containing all new IDs, and the response contains those not already in the database. Then search happens entirely in firebase itself.
(*) Requirements can include: width, heigth, max-age, max-number-of-files (optional),...
Users should have a way of setting their preferred minimum width, height,...
Instead of fetching every post separately, can I select multiple posts at once, and do only 1 call?
To be investigated...
peppermint/src/agents/maintenance.ts
Line 117 in bd50c1b
This call to Firebase for the token is not necessary!
Thee token is already available in this.user
After a new image has been added to the Masterlist, we query which users are interested in this image
Create a webpage explaining what Peppermint does, and where users can connect their dropbox to the service
Current behavior:
Needless to say, this is not efficient...
Suggested behavior:
This would result in a null operation for posts that are already in the Masterlist, it's the same data, so nothing changes.
For posts that are not already in there, this will result in new nodes being created.
Triggering in turn the onNewMasterImage function, which will fill in the remaining details.
peppermint/src/clients/firebase-client.ts
Line 10 in 8c62078
Config () is not available at this point, when running on Cloud Functions.
Weirdly, it is available in the index.js file at the root of the functions folder...
Can I make it available here? Or do I need to grab the config at function init time, and store it somewhere so it can be used here?
Might this be due to JPG files not being deleted from the temp folder? After all, all 'disk' writes are actually stored in memory. So we should clean up after ourselves when a function quits, bc the env may be reused but a new request
Looks like whatever is passed into the function when getting the size for a new image, is not its url:
Stackdriver Error Reporting error detail
Error: You should provide an URI string or a "request" options object.
https://console.cloud.google.com/errors/1794925657192919263?time=P30D&project=peppermint-wallpapers
When a new image is added to the Masterlist, a handler should:
It is inefficient to execute a DB-call for every single user.
Instead, modify this so it only runs a single update-call on the entire users node.
This update should add the new items to respective users' lists.
When a new image is added to the personal list of a user, it triggers the onNewUserImage function, which should add the image to the dropbox of that user
After querying for users interested in a new image, we add the image to the personal lists of those users
Users should be able to look up who originally uploaded an image to Reddit.
Eg, they should be able to find the original post and author
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.