I'm a newbie and that's ok.
But when I use tutorials, they always tell me to go straight to my terminal and install documents from there in which I have no clue what the next step is and no idea why I have to do it. Is it essential that I install frameworks through terminal or can I just work without it?
ex. http://net.tutsplus.com/tutorials/javascript-ajax/real-time-messaging-for-meteor-with-meteor-streams/
"Let’s create a very simple, browser console based chat application with Meteor Streams. We’ll first create a new Meteor application:"
meteor create hello-stream
I understand this is may not be very challenging, but I don't have a clear answer when I try and simply google it. Anything would help, thanks a lot!
Being a newbie is ok.
The terminal is the go to because writing programs, tools, and scripts with a couple lines of bash or python is, well, a couple of lines versus an entire gui and all the lines of code to go with it.
meteor create hello-stream
That's telling you to run the program called meteor with the supplied arguments (create hello-stream).
If you haven't installed meteor, do that next. From their website, open your terminal and type/paste:
curl https://install.meteor.com | sh
That downloads a file from the URL and pipes (|) it to the sh command. The file it downloads is a shell script that takes care of setup/installation. Now go back and try the meteor command again.
More reading
You might try and find a terminal tutorial. This is the first one I found:
http://www.ee.surrey.ac.uk/Teaching/Unix/
Answer from someone who only recently (as in: within the last year) got into using the Terminal more and more frequently:
It's generally a good idea to get used to using the Terminal for code-related things as you can pretty much use it platform-independently (meaning you can use the same commands on Mac, Linux, Windows,...) and because it makes you understand better what you're actually doing.
Once you've got the hang of it, it can make navigating your system as well as making changes to it easier. Hidden files, for example (like .gitignore files, or files in your .ssh directory, or your .bash_profile), can be viewed, opened and edited easily from the Terminal whereas you have to take multiple, complicated steps (or install other software) to view them from your Finder.
With the help of package managers (like Homebrew), which are also operated from the Terminal, you can also install software that isn't otherwise available for Mac.
Related
I'm working on a project in node.js and I'm stuck at this. I need to convert an external device ( a usb stick etc.) into an "exFAT" partition if it's not an exFAT . I used an npm package called "drivelist-scanner" to get the list of usb devices connected and also their mountpoints. Now the only thing left to do is to convert them into exFAT and I don't know how to do it. I came across an npm package called "gpt" which said it can format drives but the documentation is not so clear. Here's a link to the github repository for gpt : Github link
Any ideas on how to accomplish this? I'm even willing to launch a script based on the operating system to do the job, but I'm not sure on how to do this too. Any help is appreciated. Thanks.
Actually you can not directly format a drive with programming languages. You will need to invoke a operating system specific program to do the actual work for you.
Create a bash script
You can use this info for do that.
https://superuser.com/questions/274687/how-do-i-format-a-usb-drive-on-a-pc-that-was-formatted-on-a-mac
Run a bash script with node.js
You can use exec command for run a bash script with node.js
Run shell script with node.js (childProcess)
Following the title, I have am unable to execute cmdlets, exe, shellscripts, vb. All that I am able open is git bash, but again, I have no admin rights. Are there any ways of accomplishing this? 1 idea i had was to create a local website that does this for us in the form where we upload a zip file to the website then it does its stuff then repacks it and sends it back to us via a local zip file download?
EDIT:
I am trying to document out a front end site coded in react. Only thing that is able to run anything within itself is Git Bash. No execution of .exe's or cmdlets withing Git Bash works though...
Well, apparently if u have git bash in ur restricted laptop and have the ability to push ur commit to git hub, it seems that using EDoc node module does the job.
Instead of saving globally (which won't work) do a npm install -save esdoc.
Then instead of running esdoc -c [json file], use ./node_modules/esdoc/out/src/esdoccli.js -c [json file]
Worked beautifully for me. Hope this helps anyone who faces a similar situation as me. Feel free to add additional methods to generate documentation.
I want to create a Javascript (using Electron) app, but I want this app to be run and executed with terminal commands, like how you run git, is there a way to accomplish this?
I know that python and ruby are better languages for this purpose but I have a reason to use electron.
For non-GUI applications, you can just use node.js directly. If you want to make a TUI, you can use node.js + a module like blessed (and possibly blessed-contrib).
Electron is basically Chromium browser with tabs and all that stuff stripped out, plus a pile of tools to work with the user's desktop environment added in. It lets you use add HTML and CSS to a Node.JS application to create a GUI.
If all you need is a terminal command, Electron is completely unnecessary.
Here's a little pile of links to help you get started creating your command line app:
Writing command line applications in Node (Free Code Camp)
Scripting with Node (Atlassian)
Node.js with Commander npm module would work very well for your requirement.
I am trying to follow this answer:
https://stackoverflow.com/a/15752736/4167140
But the path /usr/local/meteor does not exist on my OSX. I ran a single Meteor app on my machine for months and it worked fine, but now that I have multiple meteor apps on my mount, I keep on getting...
Unexpected mongo exit code 100. Restarting.
...when I go to run any of the apps locally (aside from the first one I created).
Did I install Meteor incorrectly? I curl'd it down and I have the executable in /usr/local/bin/meteor, but I need to be able to access /usr/local/meteor in order to get verbose logging when I run mongod inside of the directory.
This happens even on Meteor applications that dont have any collections (just static content).
I have never run into this issue with any of the Meteor + MongoDB applications that I run on my Ubuntu boxes.
Before of to check the installation of Meteor, you could see in your app directory if there is any mongodb.lock, in that case just delete it with rm .meteor/local/db/mongodb.lock (that path is on my linux, maybe it can change a bit, so please check it)
did you try this? There's a bug on github for it...
https://github.com/meteor/meteor/issues/2772
Hey, I don't really have enough to go on for a good answer. But, the .lock file isn't the database. It's a file mongodb writes to prevent itself from starting again on your database. That would get messy. If mongodb crashed, and didn't delete the .lock it wouldn't start again without manual intervention.
Does anyone know how to install GameClosure on Windows? According to the docs, on the installation guide, only osx is supported, although they have some success running on Linux and Windows. Unfortunately they don't expand on how to do this and a Google turns up only one promising looking page which returns a 404 (there is a cached version but it only seems to be a half article).
I have successfully installed the GC DevKit on Windows, there are a few additional steps like creating symbolic links BEFORE trying to install the GC DevKit.
Follow these steps carefully and you shouldn't have a problem getting it up and running. Read through them and try to understand what is required first.
Download the list of required items (Windows builds for Git, Node and Java) from the install guide.
Open up Git Bash (find it on the start menu under Git)
Continue with the install guide by cloning the repo (git clone https://github.com/gameclosure/devkit).
The files would have been installed to %USERPROFILE% if you did not change the directory while in Git Bash.
Move all the files in devkit\SDK somewhere else but make sure they are gone from that directory.
Open a normal command-prompt (cmd.exe).
Create symbolic links for everything that WAS under the devkit\SDK directory using mklink (available in Vista and above) from the command-prompt (not the Git Bash console). The files you moved in step 5 will contain the path as text that the link should be pointed to EG: > mklink /D "%USERPROFILE%\devkit\sdk\squill" "..\lib\squill\"
JSIO is special and actually needs to exist in a sub-directory at the time of writing. Create the directory devkit\SDK\jsio and then create a symbolic link INSIDE that going back one more relative path. EG: > mklink /D "%USERPROFILE%\devkit\sdk\jsio\jsio" "..\..\lib\js.io\packages\"
Go back you your Git Bash console and now continue with the installation for GC DevKit by switching to the devkit directory running the ./install.sh script as described.
Run basil by executing node src/basil [command]
If all the correct pre-requisites were in place everything should go smoothly. If basil throws errors it's more than likely the symbolic links, just check that everything is pointing to the right place and run ./install.sh to try again.
Good luck!!
There is now a full guide to installing Game Closure SDK on Windows here (I have also posted the contents in pastebin here in case the previous link disappears)
It's quite a process to get everything installed and configured, and looks like you can only develop for Android using the windows version of the SDK, but I may be mistaken
I wasn't able to get it installed on windows, but it's easy enough to install on linux, so I ended up using virtualbox and a linux vm. Cygwin could be another option but I didn't try it so unfortunately can't say for definite whether or not it would work