Monday, 15 May 2017

Python - Clear shell screen

In windows

import os
cls = lambda: os.system('cls')
cls()
==============================================

Quickest and easiest way without a doubt is Ctrl+L.
This is the same for OS X on the terminal.


===========================================================

Node js



1) Install node

https://nodejs.org/en/


2) cmd >  node main.js

==========================================================

var http= require("http");

http.createServer(function(request,response){
       
 response.writeHead(200,{'ContentType':'text/plain'});
response.end('hello world');
       
}).listen(8081);

console.log("server running at .......... localhost:8081 ");



======================================================



Saturday, 13 May 2017

Terminal - Shortcut for Mac

Using Automator to Automate

This is coming to the thread a few years late BUT here goes...

I use Automator to launch any application by keyboard shortcut. Must be using Snow Leopard

Steps:

1. Launch Automator from the Applications folder
2. Choose Service
3. The line that states "Service receives selected" change it to "no input"
4. From the Action side drag to the workflow side "Launch Application"
5. For the pull down in the Launch Application action select the application you would like to launch. For Terminal you will have to go to the bottom and select "Other" and find it in the Utilities folder.
6. Save the Service giving it a unique name like Launch Terminal
7. Goto Keyboard Shortcuts tab within the Keyboard System Preferences
8. Select Services from the left pane and scroll down to General in the right pane. You should see your Service.
9. It's not so obvious, but double click to right side of your Services row. This allows you to enter a key combination for the shortcut. 
10. Enter a key combination and close System Preferences.

10 steps but really it takes less than a minute to do. Enjoy!


=========================================================

Calibre - convert books to support kindle


1) Install calibre

https://calibre-ebook.com/download_osx

2) download drm removal tools from github

https://github.com/apprenticeharper/DeDRM_tools/releases

extract drm zip


3)After installing calibre


preferences > change calibre behavior > advanced > plugins >load plugin from file


4) after installing plugin restart calibre


5) click on file type plugins from the installed plugins


6) double click on DeDRM plugin


7) it opens DeDRM customise window


8) select  elink kindle ebooks


9) paste your kindle serial number


G090 G105 5346 0URR

























Thursday, 11 May 2017

Installing Python in windows


https://www.python.org/downloads/


=> install python

=> set the path in enviroment variables as
   C:\Users\mobigesture\AppData\Local\Programs\Python\Python36\Scripts\
  C:\Users\mobigesture\AppData\Local\Programs\Python\Python36\



=> to exit from interpretor

    exit()
     ctrl+z   Enter





=========================================================

Saturday, 6 May 2017

Top 5 JavaScript Frameworks 2017

This is MY top 5 front end JavaScript Frameworks of 2017. This list took many things into factor such as ease of use, popularity, features, syntax, performance and more

#5 - Polymer
#4 - Ember
#3 - Angular 2+
#2 - React
#1 - Vue.js


https://www.youtube.com/watch?v=_vL8s5ayuFk#t=808.761694

Wednesday, 3 May 2017

Java -point to remember


Interface method header overriding caution

When you implement an interface method (by overriding the interface's method header), remember that all of the methods whose headers are declared in the interface are implicitly declared public. If you forget to include public in the implemented method's declaration, the compiler will report an error informing you that you're attempting to assign weaker access to the implemented method.
========================================================