I have a node project hosted on Cyclic. If your´re not familiar with Cyclic, you basically log in with GitHub, link the repo you want to host and Cyclic just publishes that repo.
In this project I have an SQLite database with some light content, and I am tracking it with LFS. Without LFS the hosting works flawlessly, and I can query the database with no problems at all, but when I DO use LFS, the database appears empty, and I can´t fetch any data from it. I need to use LFS since I´m not the only one working on this project, and working on this on GitHub without LFS causes problems.
I read this, https://gist.github.com/fkraeutli/66fa741d9a8c2a6a238a01d17ed0edc5#retrieving-lfs-files, but didn´t really understand it or how I would use it in my case.
Has anyone done a similar project or just have any general tips?
(I didn´t put any of my code here since I didn´t think it would be necessary, but if you would like to see some part of it just let me know.)
Related
Today I went into a GitHub repository I haven't worked on in a month or so since completing a bootcamp. It is a personal project where I have basically just seeded some database tables and had uploaded an image or two and started a React app displaying those.
When I went on today, in the public images folder was a profile photo and also a photo of my passport visa. I don't recall adding those! and can't see that it would've even been an accident, though maybe I suppose.
Could having my fairly rookie code available to see on GitHub have led to me leaving something open for someone to get those files from my local system? I'm not sure how that would work but did read a little about .DS_Store files on Mac and there was one of those uncommitted in there too.
Can anyone shed any insight? Is it possible/likely someone scanned my files and grabbed those images for whatever reason?
I deleted the photos and ds_store file.
Thanks
That is why I always do a git status, before a git commit: to double-check what I am about to commit.
Unless someone has direct access to your machine, nobody else should have been able to add a personnel file but you.
And remember: deleting the file only removes it from the most recent commit, not from past commits.
Only a tool like git filter-repo (python-based) would allow you to remove it from all past commits, which changes the history and require a git push --force (not a big deal if you are the only one working on the repository).
I'm working on a Quizz with Html/JS on Github and which will be dedicated to my comrades.
I would like to be able to read everyone’s answers so I thought about creating a text or csv file with their answers that would be saved in a specific directory of the github project.
But I’m a beginner and I don’t know if that’s possible, i’ve seen tracks that use PHP or NodeJs with FileSaver.js, but I haven’t managed any of them because i would like it to be automatic, not to ask the user to download his answers.
If some people knwo how to do it or explain me why it’s impossible and how to do it otherwise it’ll be cool.
Thanks ! ;)
Unless you want to make every person using the quiz a contributor to your Github project (which will require that they sign up for Github accounts and tell you their account name so you can manually grant them permission) and then use the API to read the CSV file, modify it, then commit the change (and resolve any merge conflicts caused by race conditions): This is not possible (and if you are willing to do that, then it is among the most complex approach that you could take).
If you want to store and aggregate data submitted by visitors to a website then write some server-side code (using whatever language and frameworks you like, PHP and Node.js are both options) and use a web hosting service designed to support them. Github Pages is designed only for static pages and doesn't support any form of server-side programming.
Once you store the data in a file, just use git commands to commit and push it.
The idea is to bundle the MySQL database within the npm app. The reason behind this is because the app is intended to run as a stand-alone desktop application built using Electron and, of course, many other modules.
So far, all of my searches for a MySQL database module only leads to the drivers. All other tutorials talk about the typical web app set up wherein the MySQL db is installed in the server. A comment from another post discussed how to set up MySQL db in server and just mentioned that if it's a desktop app, it's a whole other issue. I want to know if there is a way to do this or if it isn't possible at all.
After further research (and a lot of compromise in the initial design), I decided to use Lovefield by Google. It is the closest to what I have been looking for since 1. it is embedded in the browser and 2. structured query is how you get data. Still hoping there would be a solution to an embedded MySQL database in an Electron app.
Sometime in the past, I have managed to embed a full Drupal CMS installation inside of node-webkit (https://nwjs.io/). It was configured to proxy all the known PHP files to the embedded PHP installation. Then we have simply imported the sql dump file into sqlite and the entire thing worked out nicely. You might want to give that a try.
As #jd-hernandes pointed out, sqlite could be the answer you are looking for.
I develop an angular-php web application which I have it running online, for different users, on 5 different subdomains, such us:
sub1.mydomain.com
sub2.mydomain.com
sub3.mydomain.com
sub4.mydomain.com
sub5.mydomain.com
Problem:
My problem is that I still develop the web-app local and whenever I change files(php, js,tpl.html,css or when add new ones) I have to upload them on each subdomain.
Question:
Is there a way/library/API whatever that I can use to make something like package (with the updated or new files) and just call it from each subdomain url , and make the appropriate updates?
Or should I just copy them to each subdomain?
Do I make myself clear, in other words just like on cms systems that we press the update button and we update a component/module.
If anyone knows a way of doing that please enlight me. Thanks.
I tried to depict what i mean.
What you are describing is called deployment.
There are a lot of ways to create a deployment mechanism so there is not a single answer to your question. Depends of the tools that you are using, the servers where your app is hosted, etc.
If not, I advise you to use Git to make versions of your app (with Github or Gitlab) and automate the deployment process when you push a new piece of code.
You can make your own scripts to deploy or use online services (surely what you need because of "systems that we press the update button").
I can't advice you one particular service but you would find what you need in Googling "deployment automation github".
I would do it with config files. Considering the code for all my substations is the same. I would have config for each sub-domain and fetch the core files from the same location but serving different data If your structure allows it.
I have a Chrome packaged app that has taken me a while to get my head around but I finally have it working. However I have now come across another problem.
Is it possible to save a variable from my app into a text file that's placed in my app/file directory?
I have looked over the chrome.fileSystem api but I don't really understand it.
I could be completely wrong and maybe you can't save files to the file directory?
Any examples or tutorials on this would be great!
Thanks!
I would suggest storing the file's contents in chrome.storage and then dynamically loading and saving the contents of your css file from there instead of using the filesystem. To me, this would be much easier to accomplish.
chrome.storage sounds like a good fit all right (though not too sure about your specific needs in accessing the css outside the app). It's main use case is for saving state and storing configuration settings/variables.
We've a code lab that walks through all kinds of chrome apps stuff, including chrome.storage here: http://developer.chrome.com/trunk/apps/app_codelab5_data.html
There's also the new syncFileSystem API, which really doesn't seem to fit your needs. This is document/file level synchronization, like getting access to user's files on hard drive, saving them in app, and syncing them.
But sure, if you are curious, here's the docs on working with Chrome File System and sync File System: http://developer.chrome.com/trunk/apps/app_storage.html
We're also working on a doc that explains the key concepts around storing data in the cloud (specifically for packaged apps). Hoping to have an early cut in trunk over the next week or so.
Keep us posted on how you get on!