My ultimate goal is to simply edit the package.json file to add the momentjs library so I can access it my node red app running in bluemix, but my question is even more fundamental.
My setup:
I have a bluemix nodejs app running a simple node red app I created. I want to use the moment.js library to do some date math and understand I need to update the dependencies file in the package.json file.
Question:
When I go to my Bluemix console runtime screen for node.js I can see the package.json file and can click on it to see the contents, but can't edit. I have tried creating projects/Git and can't see this file. I can use CLI using CF and get to the file and view it but again I just don't know how to edit it.
I would really like to understand how I can see these files and edit/source code control them using the Web IDE and just can't figure it out. I do fundamentally understand source code control just don't understand how to set this all so I can specifically see this file.
Main goal is simply to update the package.json file in the app directory.
In your Bluemix Dashboard,click on your APP and in the APP Overview you will see ADD GIT BUTTON(top right corner).
Click on it and once you've added your project to GIT, you will get a GIT URL.
Go to that URL and click on EDIT CODE( you can update your package.json) and then commit the changes.
Related
I've build my electronJS application with electron-packager and after the build finished, when I launched it, every data was gone. And I got an error that I've never got before on the dev app. (C.F screenshot)
paths are right because it's working on my dev app with the same configuration.
How can I fix this quickly please.
I've tried to change the directory to full path, change inside of the config.js file.
C.F : https://imgur.com/gallery/VN17hNf
Get all my data and my application work correctly. (get all data, add data, display data)
I've finally found the problem. When you build your app, you need to use relative paths. Like path.join(xxx). The app doesn't understand the ./your_path.
And next problem that I've solved, if you use json file and write data inside of it, you need to have a unpacked app w/ .asar file.
I want to edit GS (google app script) files in a decent editor (Emacs or VIM) and keep it under git, so I need to be able to install it to run it.
Right now I copy the whole file and paste it into the code window in the browser, which is clearly suboptimal.
I wonder if there is a way to do it.
For some reason, Edit With Emacs does not work with the script editor.
The google apps script
Importing and Exporting Projects guide details using the Drive REST API
Note: Import/Export of scripts is limited to Standalone scripts
Only standalone scripts can be imported or exported. Container-bound scripts cannot be accessed through the Google Drive REST API.
This Google repo details how to work with scripts in a local dev environment
It uses node-google-apps-script which is really all you need to import/export your script project to a local machine and back to Google
It is a little bit of work setting it up; there are quite a few steps to work through
Despite this question is a bit old, I consider it could be useful for someone still wanting to edit App Scripts outside the browser.
There is a tool named clasp which aims to provide a way to edit an app script project in a local environment: https://github.com/google/clasp.
You just need to install via:
npm install -g #google/clasp
And enable the Google Apps Script API: https://script.google.com/home/usersettings
To use it, you should include a package.json via npm init (tested with version 2.4.0) and then make:
clasp login
clasp clone "projectID"
Afterwards, you could edit the files with your favorite editor. Finally, you could push the changes via:
clasp push
For more information, please check the repository of the project, pointed out above.
I messed up. I needed to reset my computer and wipe it clean. In doing so, I mistakenly committed incorrect code (a lot of it) to source control. Now, going to retrieve it and discovering its the wrong stuff. I have the correct code published - Is it at all possible to get this code that's up in Azure?
You can download a copy of the deployed code via the KUDU interface. Please note that this is the deployed code, and it won't be the source if you are using a compiled language such as C#.
Please see this blog for details on how to access the KUDU interface. If you click on debug console and then powershell, you will see a file browser (picture shown at bottom of blog post). There is a download button for each folder. Simply navigate to where your files are stored and download.
Yup. Assuming you want the repo not the deployed (compiled) code- Go into Kudu/DebugConsole and grab the repository folder from /site/.
It has a clone of your local git repo in it.
I am looking at the cruisecontrol web dashboard. I can see one farm and one server. However, I don't see any way to add a project?
Is this something I can do with the UI or do I need to edit the config file by hand?
You'll need to edit the ccnet.config file by hand (located within the CruiseControl directory) to add projects. There are some graphical tools to help you do this however you do get used to doing it by hand fairly quickly - just have the documentation near by!
Update: An example of one such tool is http://www.codeplex.com/ccnetconfig
You can use CCNETConfig to edit the config file through an UI although it doesn't support higher version > CruiseControl.NET 1.4.
You have to basically edit the configuration file by hand, however I have it setup so that the raw config file is split into different include files, each of which is setup in my source control system. Then I created a project for the configuration, and then for the whole config. So when something changes in the config, CC.NET itself pulls out the changes, recreates it's config files and the refreshes the system configuration.
This means that anyone can edit the config (if they can access the files in sourcecontrol), and no-one has to go into the program files directory of the CC.NET machine itself.
Not sure whether this answers the question you asked, but this is how our setup works
I want to change look and feel of liferay using css. i am very new to liferay. Can any give me any idea to do the changes. Thanks in advance
The step-by-step seems complicated, but it's not that bad .....
1a) download and unpack the plugins sdk for the version of liferay you want to use. All the downloads are on the sf page http://lportal.sourceforge.net/
1b) make sure you have the latest version of ant and the JDK version that matches your liferay version (1.5.x or 1.6.x)
2) there are a few main folders in the kit. Change into the "themes" folder and run the create script there in this format (on linux or mac you'll need to make the .sh files executable)
c:\liferay\plugins\themes >create my-name "My Theme Description"
linux/mac $>./create.sh my-name "My Theme Description"
This will create a skeleton theme in a folder called my-name-theme and a folder within it called _diff.
Make whatever modifications you want WITHIN THE _diff FOLDER. (except changes to the properties file within WEB-INF)
Once you've made changes run "ant compile" from within the my-name-theme folder and the sdk will run through it's paces and spit out a .war file to the "dist" folder in the sdk root. You can upload this to the site using the plugin installer
OR ... if you configure the sdk to know where your development server is you can run "ant deploy" from the theme's folder and let the autodeploy magic in liferay do the work.
Once the theme is installed just assign it using the "look and feel" tab in the "manage pages" tool.
TIP : Make most of your changes to the custom.css file .... keeps things easy to upgrade.
TIP : Development is really slow for CSS if you do this for every change .... so if you're running a dev server add a style tag just before the end of the head tag that points into your _diffs/css folder. href="file:///...../_diffs/custom.css". This way whatever edits you make will be compiled into the next version of the war and will override the currently installed version without reuploading. make sure to remove the link before you put it on a live server.
The liferay.com documentation is great and there's a "themer's guide" i can't find the link to right now that got me started.
We've done a number of LifeRay customizations for various companies but your question is too vague for us to answer. If you are just looking to change a few colours and fonts then editing the CSS is fine, but if you are looking to completely change the layout then you need to delve in to the template files and start working with the XHTML.
Provide more details and we might be able to prod you in the right direction :D
IMO theme development for liferay can be quite slow to start with. I have found two different approach quite useful. It works for me, might work for you as well.
If you edit files inside _diff folder AFAIK you have to deploy every
time two see the changes , which can be quite frustrating for
front-end developers. An approch can be edit the css file directly
in tomcat/themename folder. Copy the changed every couple of hours
or so in the _diff folder and deploy. In my case the CSS stays in
C:\liferay-portal-6.1.0\tomcat-7.0.23\webapps\\css\
Also if you are aware liferay supports Sass now. So it you are writing Sass "deploy" may be you most likely option. But I have also figured out a way to speed up that process. Install ruby (if you are in windows, in Mac its preinstalled) > Install Compass > and create a blank compass project. Start "compass watch" . Open bothe scss file and the compiled css file in your IDE. "compass watch" will poll for changes in your scss file and put the compiled output in the css file. Every while you may copy the css output in the css file in theme folder or directly in firebug or web-inspector in chrome/safari.
I have found these are faster dev practice than deploying everytime or completely developing on firebug/web-inspector.
Also if anyone know of better method, specially things like only CSS/JS deploy (or simple copy for that matter if one is not writing Scss), please let us know.
You can make your custom style with the liferay plugins sdk, which can be found here: http://www.liferay.com/downloads/liferay-portal/additional-files
There is a themes folder included, in which you can create a new theme. Liferay generates here a basic theme as a boilerplate, which then you can customize and deploy to your liferay installation.
You can
mvn archetype:generate
then select “liferay-theme-archetype (Provides an archetype to create Liferay themes.)” et voilà you are ready tu customize your theme.
Best practice recommends that you make all your custom themes using only the custom.css file, and that you not override any of the templates unless absolutely necessary. This will make future upgrades far easier, as you won't have to manually modify your templates to add support for new Liferay features.
Deploy the newly created theme using
mvn clean package liferay:deploy