Skip to main content


Showing posts from June, 2016

Advantages of External JavaScript

Placing JavaScripts in external files has some advantages:It separates HTML and codeIt makes HTML and JavaScript easier to read and maintainCached JavaScript files can speed up page loads

JavaScript Output

JavaScript can output data in different ways:

Writing into an alert box, using window.alert().Writing into the HTML output using document.write().Writing into an HTML element, using innerHTML.Writing into the browser console, using console.log().

Linux top command - Show Processes Sorted

To Show Processes Sorted by any Top Output Column – Press O  By default top command displays the processes in the order of CPU usage.  When the top command is running, press M (upper-case) to display processes sorted by memory usage. To sort top output by any column, Press O(upper-case O) , which will display all the possible columns that you can sort.

JVM heap dump analysiss

It is easy to generate and analyze a JVM heap dump. But JVM heap dump analysis should not be seen as a replacement for profiling & JVM analysis tools such asJProfiler orPlumbr but complementary. It is particularly useful when troubleshooting Java heap memory leaks and java.lang.OutOfMemoryError problems.

Java performance analyzing

Load testing, profiling your application and analyzing Java heap dumps (ex: captured during a load test or production problem) are important for your application. It allows you to achieve the following goals:Reduce risk of performance problems post production implementationProvide extra guidance & facts to the production and capacity management team; allowing them to take proper IT improvement actionsAnalyze the root cause of memory leak(s) or footprint problem(s) affecting your client IT production environment

When to analyzing JVM heap dumps

Analyzing JVM heap dumps can be a time consuming analysis process. It should not be done every time you are facing a Java heap problem. The following are suitable scenarios:The need to understand & tune your application and / or surrounding API or Java EE container itself memory footprintJava heap memory leak troubleshootingJava classloader memory leaksSudden Java heap increase problems or trigger events (has to be combined with thread dump analysis as a starting point)

Limitations of Java heap dump analysis

JVM heap dump generation is an intensive computing task which will hang your JVM until completed. Proper diligence is required in order to reduce impact to your production environmentAnalyzing the heap dump will not give you the full Java process memory footprint e.g. native heap. For this purpose, you will need to rely on other tools and OS commands for that purpose

How to trigger JVM heap dumps automatically

If you are using the HotSpot Java VM 1.5+ or JRockit R28+ then you will need to add the following parameter below at your JVM start-up:-XX:+HeapDumpOnOutOfMemoryErrorThe above parameter will enable to HotSpot VM to automatically generate a heap dump following an OOM event. The heap dump format for those JVM types is HPROF (*.hprof).If you are using the IBM JVM 1.4.2+, heap dump generation as a result of an OOM event is enabled by default. The heap dump format for the IBM JVM is PHD (*.phd).

AWS Certificate Manager is a new service that lets you easily provision, manage, and deploy Secure Sockets Layer/Transport Layer Security (SSL/TLS) certificates for use with AWS services

SSL/TLS certificates are used to secure network communications and establish the identity of websites over the Internet. AWS Certificate Manager removes the time-consuming manual process of purchasing, uploading, and renewing SSL/TLS certificates. With AWS Certificate Manager, you can quickly request a certificate, deploy it on AWS resources such as Elastic Load Balancers or Amazon CloudFront distributions, and let AWS Certificate Manager handle certificate renewals. SSL/TLS certificates provisioned through AWS Certificate Manager are free. You pay only for the AWS resources you create to run your application.

Dropbox - File Syncing and Sharing to the cloud

The simplicity of using Dropbox has made it to one of the most known cloud storage and syncing services on the web, with an almost insultingly high valuation just short of 10 billion USD. Setting it up is really simple: just create an account, install Dropbox on a machine and you end up with a working system.

Bandwidth limits of Dropbox

Dropbox Basic (free) accounts:

The total amount of traffic that all of your links and file requests together can generate without getting banned is 20 GB per day.The total number of downloads that all of your links together can generate is 100,000 downloads per day.Dropbox Pro and Dropbox Business accounts:
The total amount of traffic that all of your links and file requests together can generate without getting banned is about 200 GB per day.There's no daily limit to the number of downloads that your links can generate. If your account hits our limit, we'll send a message to the email address registered to your account. Your links will be temporarily disabled, and anyone who tries to access them will see an error page instead of your files. Dropbox does not offer a way to buy an additional bandwidth allowance for your account.

How to enable Google Analytics site search for WordPress

Log in to your Google Analytics account.Click on the ‘Admin’ tab.Select the view where you want to set up site search.Turn the ‘Site Search’ option on and – for out-of-the-box WordPress sites – enter the single letter ‘s’ as the query parameter.Start tracking what your audience is searching for on your WordPress website

How to keep your Microsoft OneDrive bonus intact

In November 2015 Microsoft announced it would slash the OneDrive allowances in quite dramatic fashion, removing the camera roll bonus and reverting back to the 5GB base storage.

If you want to keep your base storage quota and camera roll bonus, even after the changes roll out, you have to opt in by visiting and clicking the Keep your free storage button.

Creating sort index in MySQL

'Creating sort index' is the database figuring out the order of the returned values based on ‘order by’ clause. Main resources limit here would be available CPU and memory. The sort wont be done until the data is already all in memory if the result is small. 
Adding suitable index could be the query faster.

ownCloud - a self-hosted file sync and share server

Access, Sync and Share Your Data, Under Your Control!ownCloud is a self-hosted file sync and share server. It provides access to your data through a web interface, sync clients or WebDAV while providing a platform to view, sync and share across devices easily — all under your control. ownCloud's open architecture is extensible via a simple but powerful API for applications and plugins and it works with any storage.

What iOS device is compatible with Apple Pay

If you have an iPhone 6 or iPhone 6 Plus, you can use Apple Pay both in stores and while making in-app purchases. Both of Apple's latest phones have Near Field Communication (NFC) chips at the top end of the device. They also both have a separate chip called the secure element (SE). Each time you initiate a transaction, the SE generates a one-use code in lieu of transmitting your debit or credit card number.

If you have an iPhone 5S or older, your only solution is to use the Apple Watch, which also has the SE and NFC chips. The Apple Watch is tethered to your iPhone and will use your Touch ID in tandem with these chips to make a secure purchase.

The iPad Mini 3 and iPad Air 2 also get Apple Pay because they both have the SE, but only for in-app purchases, because they don't have the NFC chip. This means if you're using the Target app, for example, you'll be able to purchase an item simply by using Touch ID, but you won't be able to use it at the credit card termin…

JavaScript String Methods

MethodDescriptioncharAt()Returns the character at the specified index (position)charCodeAt()Returns the Unicode of the character at the specified indexconcat()Joins two or more strings, and returns a copy of the joined stringsfromCharCode()Converts Unicode values to charactersindexOf()Returns the position of the first found occurrence of a specified value in a stringlastIndexOf()Returns the position of the last found occurrence of a specified value in a stringlocaleCompare()Compares two strings in the current localematch()Searches a string for a match against a regular expression, and returns the matchesreplace()Searches a string for a value and returns a new string with the value replacedsearch()Searches a string for a value and returns the position of the matchslice()Extracts a part of a string and returns a new stringsplit()Splits a string into an array of substringssubstr()Extracts a part of a string from a start position through a number of characterssubstring()Extracts a part of…

Difference between substring() and slice() in JavaScript

substring() is similar to slice().

The difference is that substring() cannot accept negative indexes. If a parameter is negative, the position is counted from the end of the string.
var test=""; console.log(test.substring(2,8)); //output: .i88.cconsole.log(test.slice(-8,-2)); //output: t.i88.

Marketing using WordPress

WordPress is an open source platform that allows for maximum customization of any pre-developed theme, it gives developers the ability to use various APIs and plugins without having to build them from code and it provides the foundation for SEO best practices.

As the number-one CMS (Content Management System) in the world, WordPress has a very robust development community that makes achieving almost any functionality possible. Because it’s an open-source platform, WordPress saves developers time by giving them tools to build a comprehensive content marketing plan without spending endless hours of custom development work. For marketers, this translates into dollars saved.

Social Marketing by Wordpress
Social Marketing using WordPress

How to solve: java.lang.SecurityException: Missing required Permissions manifest attribute in main jar

You either need to lower your Java security to medium (you can bring security of Java back to high after that)


You add Java to Exception Site List:

The Exception Site List feature allows end users to run Java applets and Java Web Start applications that do not meet the latest security requirements. Rich Internet Applications that are hosted on a site in the exception site list are allowed to run with the applicable security prompts.

SaaS-based model for Global Digital Marketing

Digital marketing is not a niche marketing channel any more. High speed internet penetration is growing rapidly and usage of search and social media has grown exponentially as access to them becomes faster and simpler. Many marketing teams are switching their focus to digital as the world economic crisis has led to reduced budgets and greater accountability requirements.

The SaaS-based model for digital marketing offers a pay-per-use model, along with one-time set up fee for the software, maintenance, upgrade and lifetime support. Hence, the Global Digital Marketing Software market is witnessing a trend where many vendors in the market have begun to offer their solutions through the SaaS-based model to expand their services and enter new markets.

In addition, digital marketing solutions are becoming increasingly popular, as they enable businesses to securely store, access, and maintain digital records, images, text, and data. This is leading to an increased adoption of SaaS-based soluti…

AWS Certificate Manager

AWS Certificate Manager is a new service that lets you easily provision, manage, and deploy Secure Sockets Layer/Transport Layer Security (SSL/TLS) certificates for use with AWS services. SSL/TLS certificates are used to secure network communications and establish the identity of websites over the Internet. AWS Certificate Manager removes the time-consuming manual process of purchasing, uploading, and renewing SSL/TLS certificates. With AWS Certificate Manager, you can quickly request a certificate, deploy it on AWS resources such as Elastic Load Balancers or Amazon CloudFront distributions, and let AWS Certificate Manager handle certificate renewals. SSL/TLS certificates provisioned through AWS Certificate Manager are free. You pay only for the AWS resources you create to run your application.

Google AdWord Campaign Quality Score

When you run an AdWord Campaign Google assigns a Quality Score to each of the keywords you choose. This is a score that can either have a positive or negative effect on the performance of your campaign. In basic terms, a good score can give you an edge over your competitors so you want to consider doing what you can to increase that score as

Google awards the advertisers who offer the best experience for searchers. This score is a variable that can either go up or down as the campaign progresses and a score is assigned to each of the keywords you use. This score affects the way your ad ranks and the cost per click you pay, so the higher the score the lower your cost.

Open Live Writer - a desktop blog-publishing application

Open Live Writer (also known as OLW) is a fork of Windows Live Writer, which is developed by Microsoft and is part of the Windows Live range of products. Open Live Writer features WYSIWYG authoring, photo-publishing and map-publishing functionality.

Open Live Writer is like Word for your blog. Open Live Writer is a powerful, lightweight blog editor that allows you to create blog posts, add photos and videos then publish to your website. You can also compose blogs posts offline and then publish on your return. Open Live Writer works with many popular blog service providers such as WordPress, Blogger, TypePad, Moveable Type, DasBlog and many more.

Kompozer - One of the Best Free Multiple Plateform WYSIWYG HTML Editors

Kompozer supports tabbed editing—WYSIWYG in one tab, raw HTML in the other—on-the-fly editing via the built-in FTP site manager, and a highly customizable interface with easily modified toolbars. Kompozer has a markup cleaner and a W3C call function to validate your HTML against current standards. It's free, available on Windows, Mac, and Linux machines, and it has a strong focus on standards compliance and clean code.

Amazon and Microsoft are entering Canadian cloud market

Amazon has announced its plans to enter the Canadian market in 2016. Amazon is not the only public cloud vendor going after Canadian government clients and companies looking to avoid data sovereignty concerns.

In June 2015, Microsoft announced its plans to enter the Canadian business market in 2016.  Microsoft's plans include two Canadian Azure data centers. Both data centers will be in eastern Canada, with plans to launch in Toronto, Ontario and Quebec City, Quebec.

How to Set Hostname on CentOS (RHEL)

How to Set / Change Host Name in CentOS 7 / RHEL 7 / Oracle Linux 7
See also: How to fix: unable to resolve host in Ubuntu
To temporarily set the host name of centos, use hostname command.
However, once the server is rebooted, the hostname will revert to it's previous setting.To permanently change the hostname, you need to edit the network file at /etc/sysconfig/network.
HOSTNAME=<value>, where <value> should be the Fully Qualified Domain Name (FQDN), such as, but can be whatever hostname is necessary.

You can also edit /etc/hosts:   myhostname localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         myhostname localhost localhost.localdomain localhost6 localhost6.localdomain6

The /etc/sysconfig/network file in CentOS / RedHat / Oracle Linux

The /etc/sysconfig/network file The /etc/sysconfig/network file is used to specify information about the desired network configuration on your server. Following is a example /etc/sysconfig/network file:
NETWORKING=yes FORWARD_IPV4=yes GATEWAY= GATEWAYDEV= The following values may be used: NETWORKING=answer, where answer is yes or no -Configure networking or not to configure networking.FORWARD_IPV4=answer, where answer is yes or no -Perform IP forwarding or not to perform IP forwarding.HOSTNAME=hostname, where hostname is the hostname of your server.GATEWAY=gwip, where gwip is the IP address of the remote network gateway -if available.GATEWAYDEV=gwdev, where gwdev is the device name eth# you use to access the remote gateway.

How to start MySQL directly for debuging

Starting up the MySQL server directly could provide you more information for debugging, instead of
sudo -i service mysql start  or
sudo -i /etc/init.d/mysql start You could do something similar to:
shell> /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --user=mysql --log-error=/extra/mysql2/db1-err.log --open-files-limit=8192 --pid-file=/var/lib/mysql/ --socket=/var/lib/mysql/mysql.sock --port=3306

summernote - Super simple WYSIWYG editor

summernote is Super simple WYSIWYG editor See also: How to highlight bash/shell code in markdown
Easy to Install
Simply download and attach your js, css with bootstrap.

Customize by Initializing various options and modules.

See all useful features of summernote in action.

Open Source
Summernote is licensed under MIT and maintained by the community on.

Integrate it with any back-end. 3rd parties available in django, rails, angular.

Support bootstrap 3.x.x
Lightweight (js+css: 80Kb)
Smart User Interaction
Safari, Chrome, Firefox, Opera
Internet Explorer 9+ (IE8 support coming soon)

Using GitHub Gist as a Syntax Highlighter for Your Blog or Website

GitHub Gist is a simple way to share snippets and pastes with others. All gists are Git repositories, so they are automatically versioned, forkable and usable from Git.

After you create your Gist, you will be presented with a confirmation page. Click the show embed link and copy/paste the script tag on to your website.

Now, when your page is loaded, your code will be pulled in from Github and automatically formatted. The syntax highlighting is auto-detected based on the extension of the file name that you enter, so be sure you add the appropriate level of detail.

The importance of tracking your marketing campaign

Whether it's Facebook ads, Google Adwords, email marketing, guest blogging or product reviews, there are a lot of different methods to market your products. However, marketing only represents part of the equation. The second part, and arguably more important, is tracking your efforts. Without proper tracking and analysis, you'll always just be guessing the true success of your campaigns.

Netbeans feature: Print to HTML

To put formatted code for web page using Netbeans: Print to HTML. It’s under the File menu.
Open your source in NetbeansClick Print to HTML under the File menuChoose between “Print to File” and “Print to Clipboard

A new approach to SEO is needed.

With the steady rise of social media as the “starting point” for most online users, and mobile’s increasing lead against conventional desktops for internet access, a new approach to SEO is needed.

Tell me about a time when you failed

Integrity and problem-solving skills
The interview question “Tell me about a time when you failed” is popular with hiring managers. 
The key here is to frame it in a way that focuses on the solution, not the problem. Use it as an opportunity to show both integrity and your successful problem-solving skills.

YouTube marketing

Every day, YouTube users in the United States watch over 8000 years of content.
But only 9% of small businesses have bothered to start their own YouTube channels. 
As YouTube usage continues to soar, don't let your business be one of the ones that are left behind.

Website software

WordPressJoomla!DrupalBloggervBulletinTumblrDataLife EngineMagentoPrestashopBitrixGoogle SitesTypepad SquarespaceWix

How to prevent your site from being hacked

Keep your site safe from hackers Keep your site safe from hackers by updating any software on your site regularly.  If your website management tools send security announcements, make sure you’re on the mailing lists so you can promptly make security updates.  Choose a reliable hosting provider that will offer support when a security issue arises.  You can also set up a Google Alert for your site such as [ (viagra|cialis|casino|payday loans)] to be notified when these types of spam-related keywords are detected on your site.

How to solve: netstat: command not found

netstat has been deprecated in favor of ss
For example:
$ sudo ss -a | grep nfs
tcp    LISTEN     0      64                   *:nfs                   *:*       
tcp    LISTEN     0      64                  :::nfs                  :::*  

$ ss --help
Usage: ss [ OPTIONS ]
       ss [ OPTIONS ] [ FILTER ]
   -h, --helpthis message
   -V, --versionoutput version information
   -n, --numericdon't resolve service names
   -r, --resolve       resolve host names
   -a, --alldisplay all sockets
   -l, --listeningdisplay listening sockets
   -o, --options       show timer information
   -e, --extended      show detailed socket information
   -m, --memory        show socket memory usage
   -p, --processesshow process using socket
   -i, --infoshow internal TCP information
   -s, --summaryshow socket usage summary
   -b, --bpf           show bpf filter socket information

   -4, --ipv4          display only IP version 4 sockets
   -6, --ipv6          display only IP version 6 sockets
   -0, --pa…

Samsung Galaxy Tab: Install Google Play Store (Android Market) Via APK

Some versions of the Samsung Galaxy Tab don’t have the Google Play Store (Android Market) included with it. Here is a way to do it using a Windows PC and the Android SDK. Your alternative choice is to install Amazon Appstore for Android or you can install from F-droid Widgets
Note: You have to have root access to perform these steps. You can refer this link to root your device.
1. Open Settings and select Applications. 2. Check Unknown sources. 3. Download and install the Android SDK.  4. Download and install the Android USB Drivers. 5. Download and install Root Explorer. (Since you don’t have Android Market, you’ll have to search for a Root Explorer APK file you can install on your device. Google it, and be sure to buy the app to support the developers. It’s totally worth $4.) 6. From your computer, download Vending-3.5.16.apk  (another download link)and GoogleServicesFramework.apk (another download link). 7. Mount the Galaxy Tab to your computer via USB cable and copy the  V…

What is the difference between 1.x and 2.x of jquery

Versions of 2.x leave behind the older Internet Explorer 6, 7, and 8 browsers. In return they are smaller, faster, and can be used in JavaScript environments where the code needed for old-IE compatibility often causes problems of its own. The jQuery team still supports the 1.x branch which does run on IE 6/7/8. You can (and should) continue to use jQuery 1.x on web sites that need to accommodate older browsers.

How to fix: df shows no file systems processed on Linux

If you run df command and get the following output:

df: no file systems processed

At the same time you have no problem with "du" or "ls" commands.

One possible reason is that your disk run out of space. You need to delete some files to recover. You cannot fix it if it is caused by other reason. But this is the first thing you want to do when it happens.

See also:

Solution to Disk Full in production serverFind and delete Files depends on modify days on Linux

Google Cloud Launcher

Build and manage production-grade solutions on Google Cloud Platform.
Google Cloud Launcher now incorporates many new features that make it easier to build and manage production-grade solutions. Launch everything from analytics platforms to operating systems directly in your GCP console with just a few clicks.BUILD, MANAGE, AND UPDATE SOLUTIONS.Integration with Deployment Manager gives you the ability to create and manage your Cloud Launcher deployments using a standardized, declarative template language. Templates can be used with GCP, third-party, or private templates as components to build other solutions.GAIN SUPPORT FOR MULTI-RESOURCE DEPLOYMENTS.With more open-source and commercial solutions that support both multi-VM and multi-resource deployments, Cloud Launcher offers the scale and reliability required for production applications.RECEIVE NOTIFICATIONS TO KEEP APPS EVERGREEN AND SECURE.Post-deployment, you’ll be automatically notified when a security update is available. With …

RFC 3339 of date-time format

To comply with RFC 3339 date-time format, here are examples of valid RFC 3339 date-times:



India is to spend more than $7.3 billion over the next five years to ensure more than 100 cities are “smart cities”.

Successful marketing

Successful marketing teams are masters of both marketing and technology. With an increasing demand for cross-functional collaboration and personalized experiences, marketers must leverage technology to address the growing number of segments, personalized messages, and communication channels. It’s an exciting time to be a marketer, particularly because the shift towards technology-driven marketing is opening up the door to new personalities and roles within the marketing department.

"Empathy is uniquely human. It cannot be mastered without face-to-face conversations."
Richard Wellins

How to set up a custom domain for Tumblr

Click "Settings" under the account menu at the top of the dashboard, then choose the blog you’d like to update.Click the pencil to the right of the username section (Tumblr URL section for secondary blogs) and enable "Use a custom domain."Enter your domain (e.g., or subdomain (e.g.,, then click “Test your domain.”Correct any problems if the test finds any, and click “Test your domain” until the test is successful.Hit “Save.”

Java Calendar iCal4j example

iCalendar is a computer file format which allows Internet users to send meeting requests and tasks to other Internet users, via email, or sharing files with an extension of .ics. Recipients of the iCalendar data file (with supporting software, such as an email client or calendar application) can respond to the sender easily or counter-propose another meeting date/time.

iCalendar is used and supported by a large number of products, including Google Calendar, Apple Calendar (formerly iCal), IBM Lotus Notes, Yahoo! Calendar, Evolution (software), eM Client, Lightning extension for Mozilla Thunderbird and SeaMonkey, and partially by Microsoft Outlook and Novell GroupWise.

iCalendar is designed to be independent of the transport protocol. For example, certain events can be sent by traditional email or whole calendar files can be shared and edited by using a WebDav server, or SyncML. Simple web servers (using just the HTTP protocol) are often used to distribute iCalendar data about an event…