Don't wanna be here? Send us removal request.
Text
How to use swagger in node.js hapi framework.
For project i am looking for good and effective solution for api documentation. Swagger meets my need. For hapi i used swagger-hapi . 1. Install hapi-swagger: $ npm install hapi-swagger --save 2. Add option after the creation of server object : swaggerOptions = { basePath: 'http://localhost:8000', apiVersion: pack.version }; server.pack.register({ plugin: require('hapi-swagger'), options: swaggerOptions }, function (err) { if (err) { server.log(['error'], 'Plugin "hapi-swagger" load error: ' + err) }else{ server.log(['start'], 'Swagger interface loaded') } }); 4. Add details in api : server.route({ method : 'GET', path: '/fav' , handler : function(req,res){ res("Wow finally executed fav ") }, config: { description: 'Add', tags: ['api'], notes: ['Adds together two numbers and return the result'], validate: { params: { a: joi.number() .required() .description('the first number'), b: joi.number() .required() .description('the second number') } } } }) 3. Add swagger-ui : Move "swagger-ui" folder from "/node_modules/hapi-swagger/public" to new folder "/static" server.route({ method: 'GET', path: '/{path*}', handler: { directory: { path: './static', listing: false, index: true } } })
5. Hit "localhost:8088/swaggerui/" 6. Enter localhost:8088/docs" in search options.
0 notes
Text
Quick command for python-django
How to create New project : 1. Install django 2. django-admin.py startproject How to create new App : python manage.py startapp How to run server : ./manage.py runserver How to syncdb/ create db : ./manage.py syncdb How to activate admin : To do this, open the polls/admin.py file, and edit it to look like this: admin.site.register()
0 notes
Text
3 Must-Have Android Apps.
After upgrading my phone from ginger bread to jelly beans i am trying news app frequently. In this trying i found 3 app which i am using from last 2 months and these are must have app for your phone. 1. Aviate (Launcher) I tried lots of launcher like go launcher , nova, smartlauncher ..etc but aviate is simple and easy to use. It change your android experience. Why i like aviate : 1. Less customization. 2. More categorization. 3. Increase productivity. Yes it is!
Tips for new user : It is whole new concept in launcher so initially you find it is very annoying. But try it for at-least 7 days. Believe me you are going to love it. 2. Wunderlist (Todo) In this category i tried lots of todo like any.do , google keep, todist , evernote. But for me wunderlist is the todo which complete my necessity .
My use case for Todo lists : 1. Keep my daily todo (Office todo separately ) 2. Keep my recursive (monthly) todo 3. Keeping my notes. 4. It should be available in every platform. So for above all cases wunderlist is best option. 3.Pocket ( read it later) This app help me to save my article to read it later. Before pocket i tried to save link in one sheet or i make it bookmark, that is horrible and i never read that links. Pocket is filling this gap.
How pocket is useful to me 1. I can save article using browser plugin or from my mobile for read it later. 2. It works with my twitter too. (Web and yes with twitter mobile app) 3. Yo ! It is available for my laptop and android too. 4. I am using this pocket as a rss reader. Thanks to ifttt.
PS: All apps helps me to increase my productivity
0 notes
Text
How to create chrome webapp shortcut in ubuntu.
Chrome web app gives the native app feels for website. You can create a shortcut either desktop or application menu and use app like native app in separate window. Step 1 : Right click on app icon . Select "Open as window" .
Step 2 : Click on "Create Shortcuts" . This will create shortcut in your application menu.
Step 3: Wanted to launch app . Click on dash search and type "app name".
Note : You can install chrome apps from chrome app store if it is not available then you can create it own .
0 notes
Text
How To Create a Chrome Web App from any website
Chrome web app gives the native app feels for website. You can create a web app for any website on the Internet. Step 1 : You need to create a plain text file with the following contents. Rename/edit the contents as per your web app.
{ "name": "App Name", "description": "App description (132 characters or less, no HTML)", "version": "1.0.0", "manifest_version": 2, "icons": { "128": "icon_128.png" }, "app": { "urls": [ "http://www.justunfollow.com/" ], "launch": { "web_url": "http://www.justunfollow.com/" } } }
Step 2 : Saved the file, renaming it to “manifest.json” (make sure the .txt file extension is gone).
Step 3 : In this same folder, download/create an icon for the app (it needs to be a 128×128 PNG file), rename it “icon_128.png”.
Step 4 : Open the ‘Extensions’ page from Chrome’s Settings menu. Tick “Developer Mode”. Click “Load Unpacked Extension” and select the web app folder.
Step 5 : Your app will be available at Chrome app section.
Source : http://www.omgchrome.com/how-to-create-a-chrome-web-app/
0 notes
Text
Understanding Linux File Permissions :Basic File Permissions
Permission Groups :
Each file and directory has three user based permission groups:
owner - The Owner permissions apply only the owner of the file or directory, they will not impact the actions of other users. group - The Group permissions apply only to the group that has been assigned to the file or directory, they will not effect the actions of other users. all users - The All Users permissions apply to all other users on the system, this is the permission group that you want to watch the most.
Permission Types :
Each file or directory has three basic permission types: read - The Read permission refers to a user's capability to read the contents of the file. write - The Write permissions refer to a user's capability to write or modify a file or directory. execute - The Execute permission affects a user's capability to execute a file or view the contents of a directory
Command to viewing the permissions : "ls -l"
The permission in the command line is displayed as: _rwxrwxrwx 1 owner:group
User rights/Permissions
The first character that I marked with an underscore is the special permission flag that can vary.
First set ( three characters ) : owner permissions.
Second set ( three characters ) : Group permissions.
Third set (three characters ) : All Users permissions.
Following that grouping since the integer/number displays the number of hardlinks to the file.
The last piece is the Owner and Group assignment formatted as Owner:Group.
Modify Permissions Command : chmod
The Permission Groups used are:
u - Owner
g - Group
o or a - All Users
Assignment Operators are + (plus) and - (minus); these are used to tell the system whether to add or remove the specific permissions.
The Permission Types that are used are:
r - Read
w - Write
x - Execute
To make this modification you would invoke the command: chmod a-rw file1 To add the permissions above you would invoke the command: chmod a+rw file1
Using Binary References to Set permissions :
For example : chmod 640 file1, which means
owner : read and write permissions
group : read permissions,
all other user : no rights to the file.
Representation of numbers in permission :
First number represents : Owner permission
Second represents : Group permissions
Last number represents : permissions for all other users.
The numbers are a binary representation of the rwx string.
r = 4
w = 2
x = 1
So to set a file to permissions on file1 to read _rwxr_____, you would enter chmod 740 file1.
Full article : Read More
0 notes
Text
How to Install Numix 2.0 & Icon theme in Ubuntu 13.10.
Numix is a modern flat theme with a combination of light and dark elements. It supports Gnome, Unity, and more. Screenshot :
Gnome 3.8 "Show Application" in numix theme with icons
Gnome 3.8 Browser , Music player and File Manager in numix theme with flat design
Numix theme in unity
Steps to install in Ubuntu 13.10: 1. Open terminal 2. Add PPA sudo add-apt-repository ppa:numix/ppa 3. sudo apt-get update
2. sudo apt-get install numix-gtk-theme numix-icon-theme numix-wallpaper-saucy
0 notes
Text
How To Enable WebGL In Chrome On Ubuntu ?
For WebGL to work in Google Chrome, Here are the steps to enable WebGL in Google Chrome. Step 1: Open Google Chrome
Step 2: Type chrome://flags in the address bar
Step 3: Press Ctrl + f and type ” Rendering list “, “Override software rendering list” should come up,Now click on Enable and restart the browser.
Now check chrome://gpu/
Source : http://askubuntu.com/questions/299345/how-to-enable-webgl-in-chrome-on-ubuntu
0 notes
Text
How to remove an icon from Unity Dash?
Sometimes after uninstalling software the icon is still there in your unity dash. So a question pops up in my mind , How can it be completely removed from my system ?
Dash picks up its entries from .desktop files placed , so if we remove it from there it will solve the problem.
Steps to remove :
Delete .desktop file corresponding to your program (in this case skype.desktop) from
1. /usr/share/applications and
2. ~/.local/share/applications.
0 notes
Text
How to install wunderlist in ubuntu 13.04
Wunderlist is a beautiful and simple to-do list from 6Wunderkinder. You can get it for free at wunderlist website. It is available for almost all devices like Android , ios , windows, mac and linux.
Steps to install in Ubuntu 13.04 : 1 .Firstly, download Wunderlist for Linux:
32bit
64bit
Extract it and copy its folder to /opt , and please do not rename the Wunderlist folder.
2. Download script (archive also includes some .so files for Ubuntu 12.04 and 12.10) :
cd wget http://webupd8.googlecode.com/files/wunder-0.2.5.tar.gz
3. Extract it
tar -xvf wunder-0.2.5.tar.gz
4. Run the script:
./wunderinstall
And that's it. Wunderlist should now show up in your menu / Dash and you should be able to run it.
0 notes
Text
How to switch between different display manager in Ubuntu
You have both LightDM and GDM (in case you installed gnome-shell this GDM display managers installed on your computer ). As in Ubuntu LightDM is default but you want to switch to GDM - to do this, run the command below in a terminal:
sudo dpkg-reconfigure gdm
Display something like this :
Select the display manager you want to use by default and hit enter. Then, restart your computer.
0 notes
Text
Ubuntu versions naming convention
Version number :
Each Ubuntu release has a version number that consists of the year and month number of the release.
Ubuntu 13.04
here 13 is from 2013 and 04 from April
Version code name : Ubuntu releases are also given alliterative code names, using an adjective and an animal (e.g., "Dapper Drake" and "Intrepid Ibex"). With the exception of the first three releases, code names are in consecutive alphabetical order, allowing a quick determination of which release is newer. "We might skip a few letters, and we'll have to wrap eventually." says Mark Shuttleworth while describing the naming scheme.
List of all versions :
sources :
1. https://wiki.ubuntu.com/DevelopmentCodeNames
2. http://en.wikipedia.org/wiki/Ubuntu_(operating_system)
0 notes
Text
How we use Open-source/free software in our Day to day life
How we use Open-source/free software in our Day to day life from Deepak Jain
0 notes
Text
How to install mongodb using mongoctl in Ubuntu 12.10
MongoDB (from "humongous") is an open source document-oriented database system developed and supported by 10gen. It is part of the NoSQL family of database systems.
Steps to install in Ubuntu 12.10:
1.install pip
2.install mongoctl using pip
3.install mongodb using mongoctl.
How to install pip in Ubuntu 12.10
1.$ sudo apt-get install python-pip python-dev build-essential 2.$ sudo pip install --upgrade pip
How to install mongoctl using pip in Ubuntu 12.10
1. $ sudo pip install mongoctl
How to install mongodb using mongoctl in Ubuntu 12.10
1. $ mongoctl install-mongodb
0 notes
Text
How to revert back to official version after updating package in Ubuntu 12.10
There is one command line tool known as ppa-purge.With the help of this we can easily revert back to official version of package even after updating.
Steps to install ppa-purge
1. Open Ubuntu Software Center
2. Install "ppa-purge".
OR
Click here to download ppa-purge
Step to use ppa-purge 1. Open terminal 2. Type "sudo ppa-purge ppa:" for eg: sudo ppa-purge ppa:gnome3-team/gnome3
0 notes
Text
How to install Mechanig in Ubuntu 12.10
Recently i found one tool by which we can customize our unity desktop environment in very detailed manner. It was Mechanig.
"It is really very user friendly tool"
Steps to install in Ubuntu 12.10 :
sudo add-apt-repository ppa:freyja-dev/mechanig-daily��
sudo apt-get update
sudo apt-get install mechanig
0 notes