rachelnicole / robokitty Goto Github PK
View Code? Open in Web Editor NEWA DIY Cat (or dog. or human) Feeder powered by node
Home Page: http://imcool.online/robokitty
License: GNU General Public License v2.0
A DIY Cat (or dog. or human) Feeder powered by node
Home Page: http://imcool.online/robokitty
License: GNU General Public License v2.0
This appears to be the same as (or very close to) the sold out one. http://www.amazon.com/Zevro-KCH-06114-Dispenser-Black-Chrome/dp/B00013K8O4/ref=pd_sim_79_2?ie=UTF8&dpID=41LL1R%2B%2BcwL&dpSrc=sims&preST=_AC_UL160_SR107%2C160_&refRID=1C6H16QTED210S8MG0VT
Specifically on https://github.com/rachelnicole/robokitty/blob/master/app.js#L3 you should use the path module from node standard lib to join paths. This makes this so it could be run on Windows as well since it'll handle the correct path separator the underlying OS
path = require('path'),
index = fs.readFileSync(path.join(__dirname, 'index.html'),
Please direct any questions that don't require a pull request to the comments under this post. I'll try my best to answer them!
On https://github.com/rachelnicole/robokitty/blob/master/app.js#L10-L11
You definitely want someone to put that data in there. Since they're required (and the defaults are invalid) you might not want to do the shortcircuit ||
operator, but rather check to see if those variables are undefined
and if they are print out usage instructions:
var token = process.env.PARTICLE_KEY
var deviceId = process.env.PHOTON_ID
if (!token || !deviceId) {
console.log('You need to provide your PARTICLE_KEY and PHOTON_ID as environment variables before running this command')
console.log('Ex: PARTICLE_KEY=test PHOTON_ID=test node app.js')
process.exit()
}
(Or you could throw too, if app.js
is ever require
'd by another module, calling process.exit
is a pretty rude thing to do to the including program :))
https://github.com/rachelnicole/robokitty/blob/master/app.js#L45
specifically: https://github.com/rachelnicole/robokitty/blob/master/app.js#L80
fixing this will make #16 much much easier, as well.
I can't test this because I I don't have my Photon handy, but you could replace those four existing Hapi routes in lib/server.js
with this one route to handle the static content in that public
directory:
server.route({
method: 'GET',
path: '/{param*}',
handler: {
directory: {
path: 'public',
listing: false,
index: true
}
}
});
It should basically work the same way, but I'm making the assumption that you just want to serve up that content and that it isn't required to link directly to your image assets.
Need to add a code of conduct.
just have inline JS and css right now.
Super minor... I see that you're using attachEvent, but not ensuring existence of window.console
. Probably, if you're doing one, you should do both - but I'd guess you could just skip the attachEvent check? Is this necessary anywhere but IE8?
https://github.com/rachelnicole/robokitty/blob/master/package.json#L16
you can just require('http')
the same way you do with fs
... and these are the docs: https://nodejs.org/api/http.html
Same brand, same content volume: http://www.amazon.com/Portion-Control-Compact-Edition-Dispenser/dp/B009Q8PZMK
Maybe localStorage or implement a simple DB system.
People may not want to leave this app running on their computer 24/7.
We could set the app up to run on a Raspberry Pi or Arduino that sits on the user's local network so that they don't have to!
Acceptance Criteria:
Right now "4xAA Battery Pack with ON/OFF Switch" is repeated 3 times. I assume only one is needed?
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.