Technoholik

Your Digital Companion

Friday, March 24

Why to choose yarn over npm!


Since the domination of Javascript over web began, we developers have been creating and using modules or packages in our projects which make our lives easier.

Packages save us from "reinventing the wheel" and allow reusability in code.

These packages come with their own set of dependencies (other files or libraries that the package requires to function) which may be either flat i.e. just one package or nested dependency - package requiring another package as dependency and so on.

To easily handle packages and their dependencies we have package managers. These allow packages to be installed along with their dependencies and free up our To-Do list of effort required to manage them.

In Javascript we have "package.json" a file we keep track of all packages required for project.

Until now, npm has been the de-facto package manager to be used in Node projects till Facebook introduced us to yarn. Yarn has been gaining a lot of traction mainly in projects using ReactJS.
So let's see the comparison between the two.

npm

npm stands for node pacakge manager and it claims itself to be the world's largest software repository. It is by default installed in a Node project and can manage both local dependencies in a project as well as JS tools required globally. It uses pacakge.json file in project to keep track of dependencies and their versions. The dependencies are downloaded and installed in node_modules folder inside project tree.

npm commands follow the following structure:
npm <command> [args]
Usage
To initialise a project by creating package.json file -
npm init
To install all dependencies from package.json -
npm install
To install a specific package -
npm install <package-name>
Example: npm install express

A specific version can be installed by -
npm install [package-name]@version
To uninstall a package -
npm uninstall [package-name]

Yarn

Now moving on to yarn, new kid on the block introduced to the world by Facebook on Oct'16. Facebook has been using yarn as their dependency manager on production and have now open sourced it. It's the same modules, registries of npm but a different installer - Yarn.

Apart from doing what npm does, yarn outsmarts npm by caching packages that are downloaded once on a system, so you don't have to re-download whole package tree every time you setup. Yarn also parallelises operations to maximize resource utilisation so install times are faster.

Usage
Yarn installation -
brew install yarn
To initialise a project by creating package.json file -
yarn init
To install all dependencies from package.json -
yarn install
To install a specific package -
yarn add [package-name]
To uninstall a package -
yarn remove [package-name]

Advantages of Yarn over npm 

1. Yarn has Security-centric design and verifies integrity with checksums for every package installed before execution.
2. We can install packages from either bower or npm without any hassle.
3. Yarn uses lockfile for locking all dependencies following  deterministic approach in package management, i.e. for same package.json all machines will all have same source tree of dependencies installed in their node_modules folder.
4. npm is non-deterministic package manager, which doesn't guaranteed lockfile, and deterministic algorithm for installs.
5. By using yarn we may stay assured that an working install on one system will work exactly the same way on any other system.
6. We can  selectively upgrade specific packages using "yarn upgrade-interactive"
7. Yarn is network resilient, so install won't fail because of a single failed request. Failed ones are retried later on.

Sunday, October 4

Mint Business Quiz - HOW WELL DO YOU REMEMBER ADVERTISING SLOGANS

This advertising slogan, created by Anuja Chauhan, gained mass popularity, and became a battle slogan and rallying cry. First used by Capt. Vikram Batra during the 1999 Kargil War, it was widely reported in the media. Identify.
Born Tough
✓
Yeh Dil Maange More!
Taste The Thunder
Jiyo Sar Utha Ke

This advertising slogan was coined in 1888 by the founder of which company?
Carrier
Sony
Canon
✓
Kodak

"Good things come to those who wait" was a slogan used by which company in the 1980s? The concept was that even people in a hurry would wait for the product to trickle out of its glass bottle. The same slogan was used by Guinness in the 1990s.
✓
Heinz
Wegmans
Kissan
Hunt’s

Middle East Airlines, which has a frequent flyer programme called ‘Cedar Miles’, is the national carrier of which country?
Iran
Yemen
✓
Lebanon
Jordan

Which Asian airline offers these cards for their frequent flyer programme?
✓
Thai Air
Singapore Airlines
Air Asia
Air India

Which Middle Eastern airline has a frequent flyer program called ‘Sindbad’?
Qatar Airways
Etihad
Gulf Air
✓
Oman Air

Atorvastatin is supposed to be the world's bestselling drug of all time, with more than $125 billion in sales over approximately 14.5 years. Under what trade name is it sold?
Tylenol
✓
Lipitor
Nexium
Plavix

Acetaminophen is the name generally used in the US and Japan for what commonly used medicine?
Aspirin
Cetrizine
✓
Paracetamol
Ibuprofen

Sildenafil is a drug that was initially studied for use in hypertension and angina pectoris (a heart disease), though it is now used for a different purpose. Under what brand name is it sold?
Cialis
✓
Viagra
Crestor
   Lantus

Friday, June 26

Updating MySQL and phpmyadmin passwords in WAMP Server


WampServer is a popular software stack used for Web development for the Microsoft Windows operating system. Created by Romain Bourdon, it consists of the Apache web server, OpenSSL for SSL support, MySQL database and PHP programming language.

By default on installing WAMP server on a Windows machine,  user  - "root" is created with no passwords.
So  access can be made without any password in this manner:

  • Open the MySQL console in following way -

  • Press ENTER -
  • Which takes to the following view -

To solve this, first of all, password of MySQL root user needs to be updated.
  • Open the MySQL console
  • Run the following command
SET PASSWORD FOR root@localhost = PASSWORD(' <yourpassword> ');

After this, the root user for WAMP MySQL service will be updated with a password and access will require a password.
Similarly, phpnyadmin can be configured for access with a password as:
  • Navigate to WAMP installation directory, generally it is
    C:\wamp\apps\phpmyadmin4.1.14 

  • Open config.inc.php 

  • Update values
$cfg['Servers'][$i]['password'] = '';
$cfg['Servers'][$i]['AllowNoPassword'] = false;
to

$cfg['Servers'][$i]['password'] = ' <yourpassword> ';
$cfg['Servers'][$i]['AllowNoPassword'] = true;
After this, the access to phpmyadmin panel will be password restricted.

Friday, May 29

Getting started with the Shell

Shell in Linux (or Command prompt for Windows) refers to CLI (Command Line Interface) for providing commands or instructions to Computer.

The definition of Shell goes like this:
A shell is a program that provides the traditional, text-only user interface for Linux and other Unix-like operating systems. Its primary function is to read commands that are typed into a console (i.e., an all-text display mode) or terminal window (an all-text window) in a GUI (graphical user interface) and then execute (i.e., run) them.
CLI has been the conventional way of executing instructions on a computer before the folks at Xerox invented the GUI (Graphical User Interface) which later tickled Steve Jobs and Bill Gates to gift the world with Macintosh and Windows based on GUI.
GUI revolutionized Computing because anyone by simple Point-and-Click can get their job done.

If you are a geek and want to boast  your technical prowess CLI is by far the easiest way to do it, just punch in some words and Voila! job is done!!!
Need I tell you that no matter how intuitive or easy GUI is, CLI is way way faster.
Apart from that Shell is very powerfull tool too, you can

  • Install/Uninstall a Software
  • Manage your files/folder
  • Fire up an application
and do a lot of other things.

So lets jump right into the Terminal.
In this tutorial we are going to learn how to gain access or start the terminal, subsequent actions will be covered in later posts.

Starting the terminal in Linux
Just search  for "Terminal" in the Application drawer of your Linux distro and run it, you are good to go!


Starting Command prompt in Windows

  • Search for "Command" in Start menu


  • Press "Windows Key + R" to get the Run dialog box, there in type "cmd" and hit enter

 

So, now we have started the terminal, we will learn about the various commands in upcoming posts.


Monday, October 27

[git] Add git PATH to Windows

Please ensure msysgit is installed on your local machine.
For setting up PATH, the path to git install is required which is generally "C:\Program Files (x86)\Git"
It can be slightly different depending on type of Machine (x86/x64). Check yours before continuing.

Now open Windows Environment Variables/Path Window

  • Right-Click on My Computer
  • Click Advanced System Settings link from the left side column
  • Click Environment Variables in the bottom of the window
  • Then under System Variables look for the path variable and click edit
  • Add the pwd to git's bin and cmd at the end of the string like this:
;C:\Program Files (x86)\Git\bin;C:\Program Files (x86)\Git\cmd
Test it out in PowerShell; type git and see if it recognizes the command.

Tuesday, September 16

cygwin : Developing for UNIX (POSIX Environment) on Windows


Cygwin is free software that provides a Unix-like environment and software tool set to users of any modern versions of MS-Windows (XP with SP3/Server 20xx/Vista/7/8).

Thursday, April 10

The Heartbleed Bug


The Heartbleed Bug is a serious vulnerability in the popular OpenSSL cryptographic software library. This weakness allows stealing the information protected, under normal conditions, by the SSL/TLS encryption used to secure the Internet. SSL/TLS provides communication security and privacy over the Internet for applications such as web, email, instant messaging (IM) and some virtual private networks (VPNs).
The Heartbleed bug allows anyone on the Internet to read the memory of the systems protected by the vulnerable versions of the OpenSSL software. This compromises the secret keys used to identify the service providers and to encrypt the traffic, the names and passwords of the users and the actual content. This allows attackers to eavesdrop on communications, steal data directly from the services and users and to impersonate services and users.

Sunday, April 6

Google Now, now on your desktop !

From now on you can get the Google Now experience on your PC as well. Google Now is Google's response to Apple Siri - the voice assistant  and was earlier limited to Android & iOS devices only.
Users can experience the same on their Desktops and Laptops running Windows/OSX as well through Google Chrome.Google Now on Chrome shows a subset of the Now cards on our mobile device, and uses device's location.

Saturday, April 5

Review :: Samsung Galaxy Note Pro ::

 Bigger Displays and trimmed bezel has been the common trait in every series of Samsung devices, be it S-Series phones, tabs and now the Note Tab. Samsung's Galaxy Note clearly personifies that bigger can be better. Back in 2012, with debut of Galaxy Note smartphone in 2012, the world got to experience a new range of devices termed as “Phablet” or the 5 incher devices. And Samsung plans to do the same in Tablets with Note
Pro.

Wednesday, March 26

Connecting your Blogger blog to Google Analytics

You can track traffic to your Blogspot domain on Blogger with Google Analytics. Follow these steps to add the tracking code.
  1. Log in to your Blogger account.
  2. Navigate to your blog's Settings > Other tab.
  3. If you already have a Google Analytics account, simply enter your blog's Google Analytics tracking ID.
  4. Click Save to finish.
Once you complete the steps above, you should see data in your Analytics account within 24 hours. However, you can also check your account within a few hours to see if data has begun to appear. To do this, go to your report and change the date range to the current day (by default, the ending date range is set to the previous day). If you see pageviews appear in your reports, your property is collecting data.Data will be visible normally after 24 hours.

Saturday, November 9

Twitter Quick Guide, Better to have before it goes public !

Celebrity updates n connection, increasing followers, rivalry in every celeb to get more followers !!
Now that Twitter with it's growing popularity is going public, still you find yourself alienated from the Microblogging site. Well here is a Quick guide that will help you to get to know Twitter Better:

Tweet
That 140-character message sent out on Twitter. Also, the sound a small bird makes.

Follow
Find an account you like? Click "follow" to have their tweets show up in your feed.

RT
Stands for retweet, or resubmitting someone else's tweet to your followers.

HT
Hat Tip, means you are sharing a link or idea someone else shared first, so you're giving them credit. Not quite a retweet.

DM
Direct Message, a private message sent to another user. You can send it only to people who follow you.

@
Add before someone's name to reply to them publicly. It's only shown in the feeds of those who follow both of you.

Egg
Unless you upload a profile photo, an egg will show up in its place. Often a sign of a spam account, or someone new to Twitter.

#
Hashtags are a way to make posts searchable by topic. Just insert in front of a word, but these days #-less words are indexed, too.

FF
Follow Friday, Twitter tradition where users recommend other accounts that people should follow. Happens on Friday.

Trends
Popular topics people are talking about on Twitter at any given time, but not the most popular ever. Can change based on location.

Promoted tweet
Advertisements. Distinguished by an orange arrow and the word "Promoted" next to a tweet, trend or topic.

Saturday, April 6

Pointing Device Update ~ 3D Fingertip Mouse

This gadget doesn't need a flat surface to operate, instead this wearable piece of tech enables more intuitive interaction.


Thursday, April 4

Requirements for Setting up LAN

LAN stands for Local Area Network , as we all know , LAN is set up for Resource Sharing viz. Internet Sharing & Printer Sharing among a group of computers & other functionalities.

In order to set up a computer network in the enclosed premises of Sally and John’s home-cum office it is suggested that the following hardware be purchased:
:: Click Read More ::




Tuesday, March 26

Tata Crucible Patna City Final Questions

Hello guys , I have just been through the City finals of Tata Crucible'13 @ Patna .
The questions asked were easy as a surprise but needed one to be very alert on
Current Business Affairs .
Well in the end IIT-BHU's emerged victorious with 3 teams on stage and 2 grabbing top two spots
Here Are the questions (sorry guys I don't have all ) :
Prelims :
1.Which hang out spot offers menu options like fresh'n'ground , beverages etc ?
Ans. CCD
2.NGEN a media outsourcing agency is a JV between Genpact & ?
Ans. NDTV Group
4.Solar Energy , Wind Energy & all other alternative energy sources are clubbed under
which Stock Genre ?
Ans. Green Chip Companies ( Inspired from blue chip )
11.Name the hotel group which is mostly confused with a  clelebrity surname & has passed ownership from 3 organisations ( names i don remember ) ?
Hilton Group
12.Which airline company has slogan "People.They Make an Airline " ?
Cathay Pacific ( I was among the 5 teams who knew this among all teams that came )
13.Pic of Anil Agarwal from Vedanta Group
14.PIc of Vertu Mobile , asked to identify parent company ?
Nokia

Will update more prelim questions as i get'em
Tie Breaker round (for wildcards ) :
1.If 31 is for Baskin Robbins then 57 represents ?
Heinz
2. Bharat Silk Mills is largely known for some other product , what is it ?
Sintex water tanks
3.The name of media house by Subhash Ghai ?
Mukta Arts
4.One thing common between Superman & Tintin ?
They both are news reporters
5. Conceptualized by Elisha a worker in  this company for vertical displacement ?
Lifts by Otis
6.Name the footwear company in India which is also the name of a Community & City in Pakistan ?
Lakhani
7.Which Company is the largest buyer of oranges in world (Hint : Its part of Pepsico ) ?
Tropicana
8. forgot !!!!
Guys stay tuned for more after Holi !!!!
Enjoy :)

Wednesday, January 23

Fireox OS live n kicking , Developer Phones are here

Firefox OS is a new mobile operating system built entirely using open web standards.
In Firefox OS, HTML5 apps can do “phone things” – they can make the phone vibrate,
make a phone call or send a text message.
Mozzila Foundation has announced Developer phones for their Platform ,
Details of which I have posted below :

Keon All you need to begin.

  • CPU : Qualcomm Snapdragon S1 7225AB 1Ghz.
  • 3G Network : UMTS 2100/1900/900 (3G HSPA). 
  • GSM Network : GSM 850/900/1800/1900 (2G EDGE).
  • Screen : 3.5" HVGA Multitouch.
  • Camera  : 3 MP (No Flash ).
  • Internal Memory : 4 GB (ROM) and 512 (RAM), Expandable via MicroSD .
  • Connectivity  & Sensors : Wifi N, Light & Prox. Sensor, G-Sensor, GPS, MicroUSB.
  • Battery : 1580 mAh.

Peak One step beyond.

  • CPU : Qualcomm Snapdragon S4 8225 1.2Ghz x2.
  • 3G Network : UMTS 2100/1900/900 (3G HSPA). 
  • GSM Network : GSM 850/900/1800/1900 (2G EDGE).
  • Screen : 4.3" qHD IPS Multitouch.
  • Camera : 8 MP (back) + 2 MP (front).
  • Internal Memory : 4 GB (ROM) and 512 (RAM), Expandable via MicroSD.
  • Connectivity  & Sensors : Wifi N, Light & Prox. Sensor, G-Sensor, GPS, MicroUSB, Flash (camera).
  • Battery : 1800 mAh.
These developer phones are being developed by Geeksphone in partnership with Telefonica.

:: Configuring AIRTEL Broadband In Linux & Fedora ::


Many of my friends or I must say "Techies" :P are desperate to switch from Windows Platform to Freedom of Linux.But one thing that keep them from doing so is "RECONFIGURATION" !!
In order to ease them out a bit I have come with this post .


Configuring Airtel Broadband in Linux :

Friday, November 30

Microsoft to start shipping Surface Pro tablet in January no info on pricing


Microsoft has finally announced the pricing and some availability details for the Surface Pro tablet which runs on Windows 8 and supports all legacy Windows applications. The 64GB variant is priced at $899 (Rs. 49,184 approx) and the 128GB variant is priced at $999 (Rs. 54,645 approx). Microsoft has also announced that these tablets will start shipping in January 2013.

Tuesday, November 27

Asha 205 and Asha 206 feature phones From Nokia

Following the back to back launches of Entry level Indian dubbed Chinese Androids Nokia has announced two new feature phones for the global market - the Asha 206 and Asha 205. Both the phones will come in single and dual-SIM variants, the Asha 206 will feature an alphanumeric keypad while the Asha 205 will have a QWERTY keypad.

Monday, November 26

:: Windows 8 Crack slmgr KMS Activation ::


KMS : Key Management service of Windows which allows activation of Windows.
You can know more about it by typing:
"slmgr /?"  on Command Prompt

IMPORTANT

1.Unistall the Previous Activators which You could have used (coz of which u r here :) )
By Running "sfc/scannow" on Command Prompt . ( As Admin , which fixes System Files )
::Click to READ More ::

Tuesday, October 9

Micromax Sold More Than Apple And Samsung In Q2

n















In a CyberMedia Research it has been revealed that Micromax leads the Indian tablets market with 18.4 percent share in the second quarter of 2012. Samsung is in second position with 13.3 percent market share. Apple has a market share of 12.3 percent in terms of unit shipments during the 2Q 2012.