Skip to main content


Showing posts from July, 2016

WordPress Press This

Press This is a special browser bookmarklet which can be dragged and dropped into a browser's bookmark bar. When browsing an interesting web page, a user can click on the bookmarklet in their browser's bookmark bar to quickly post a link and their commentary about the page they were visiting.

Install the Press This bookmarklet from the Tools menu in the WordPress Administration Panel.

HTTP Strict Transport Security—HSTS

HTTP Strict Transport Security—HSTSprevents people from accidentally navigating to HTTP URLs by automatically converting insecure HTTP URLs into secure HTTPS URLs. Users might navigate to these HTTP URLs by manually typing a protocol-less or HTTP URL in the address bar, or by following HTTP links from other websites.

Slowing China Sales of Apple

Apple suffered a steep 33 percent decline in revenues to $8.85 billion from $13.23 billion in China from the same period a year ago. According to the latest report from research firm Canalys, the company’s ranking in the Chinese market has slipped to fifth behind local smartphone makers. Apple now trails Huawei, Oppo, Vivo, and Xiaomi.

How to create a Strong Password

To create a strong password, we recommend using numbers, symbols and a mix of lower and uppercase letters. Even better, use a combination of all of the above to create a memorable passphrase, like “iL0vePUPPIES&allofthethingsgreen!”This is much stronger than the commonly used password (password123) or the name of your favorite pet.

The Container Disruption of DevOps

Containers are changing the nature of DevOps and transforming infrastructure. 
They make tooling and environments consistent by providing common building blocks reusable in any development stage. 
For tools, containers provide a disposable, reusable unit that modularizes the delivery pipeline. For environments, they extend the write once-deploy anywhere abstraction to infrastructure.

There’s no single, one-size-fits-all DevOps tool.

Contrary to what some vendors tell you, there’s no single, one-size-fits-all DevOps tool. Rather, the most effective results come from standardizing on a toolchain that maps directly to best practices such as version control, peer review, and continuous delivery.

The free Windows 10 upgrade offer ends July 29.

If you’re running a Windows 7 or Windows 8.1 device and you have yet to take advantage of your free upgrade to Windows 10‚ it’s time to act. The offer ends on July 29‚ 2016.

Java ArrayList ConcurrentModificationException

If Java ArrayList is structurally modified at any time after the iterator is created, in any way except through the iterator’s own remove or add methods, the iterator will throw a ConcurrentModificationException. 
In the face of concurrent modification, the iterator fails quickly and cleanly, rather than risking arbitrary, non-deterministic behavior at an undetermined time in the future.

Three types visitors and customers of your business

First are your regular customers, who want your product or service to solve their problem. They have zero influence to help you grow your business. You must appreciate them and encourage them to stay with your business for long time. 
Second are your readers, visitors, regular followers and those who drop by from different sources. They might love to follow your work, but their sphere of influence is very small.  
Third are your business boosters or  influencers. Your business boosters have the tools, resources, networks and power to push your business to the next level. They might be bloggers, journalists, content creators or social media lovers.

Update your iOS as soon as possible

iOS v9.3.3- contains a “very high severity issue” that could let hackers steal passwords with nothing more than a text message. Meanwhile, a second vulnerability allows snoops to exploit FaceTime and listen in on your calls.  
Apple has issued patches for both problems and you need to UPDATE YOUR SOFTWARE to 9.3.3.

How to import from blogger to wordpress

To find the importer, log in to and then add /wp-admin to the end of your home page URL. Then go to Tools → Import and pick Blogger. Click Choose File find the .xml file you just saved, and select it. Then, click Upload the file and import.

How to Reset Google Chrome browser settings to default

You can restore your browser settings in Chrome at any time. You might need to do this if apps or extensions that you installed changed your settings without your knowledge. Your saved bookmarks and passwords won't be cleared or changed. Open Chrome.In the top right, click the icon you see: Menu  or More .Click Settings.At the bottom, click Show advanced settings.Under the section 'Reset settings', click Reset settings.In the box that appears, click Reset. ​ These steps won't provide a full reset. For example, some settings like fonts or accessibility won't be deleted. To completely delete all settings, create a new user profile.

How to check how much data does an app on iOS use

Check to see how much data you've used with your app on your phone when you follow the steps below:
Tap on your phone's Settings > Cellular.
Scroll down and tap once you've found your app. You will see the amount of data used by application underneath the title.

Google revealed two new Chromecast devices

Both new Chromecast devices are puck-shaped - designed to build on that sublime core experience and expand the media streamer’s usefulness into the audio realm. Both new Chromecast models pack some handy speed-and-feed tweaks. The devices support blazing-fast 802.11ac Wi-Fi now. That probably won’t matter much when you’re using streaming video services—your ISP’s speed tends to be much more of a bottleneck than your local network when it comes to Internet-based video—but it should come in handy when you’re casting browser tabs and local videos to your TV.

Wi-Fi Assist in iPhone

Wi-Fi Assist detects a weak Wi-Fi signal and automatically switches a user’s iPhone over to a stronger cellular signal, if available, so that the user doesn’t experience any of the symptoms associated with poor Wi-Fi, such as drop-outs and buffering.
One of the most common scenarios where Wi-Fi Assist will make a big difference is when a user leaves the Wi-Fi network while actively using the Internet. 
iPhone can automatically make the switch between a Wi-Fi network and your mobile carrier’s cellular data connection, but the problem is that the iPhone doesn’t always make that switch gracefully.
Most users experience a few moments of connectivity loss as they walk or drive away from their Wi-Fi network. With Wi-Fi Assist, the iPhone will detect that the user’s Wi-Fi network signal is degrading and actively switch over to the cellular connection before the complete loss of the Wi-Fi signal. This, on paper, should produce an experience that is seamless to the user and allows them to continu…

True cost of online shopping

Check out websites that offer price comparisons and then compare "apples to apples." 
Factor shipping and handling into the total cost of your purchase. 
Do not send cash or money transfers under any circumstances.

How to choose a Credit Card

You can find a wide range of credit cards with various features—but there is no one single best card. It’s a good idea to shop around and compare fees,  interest rates,  finance charges,  and benefits. 
Find a card that best suits your needs

OpenIG, a special reverse proxy service or HTTP gateway

OpenIG, a special reverse proxy service or HTTP gateway that is used to fill the gap between clients that sent incompatible requests for existing application or services that cannot be refactored or changed to handle such requests. It handles access management integration, application and API security, credential replay, network traffic control and many other features.

OpenIDM, an identity management solution

OpenIDM, an identity management solution that allows the synchronization of multiple user identities and simplify the handling of user data across multiple resources. This way, users and roles spread out in multiple data stores (LDAP, databases, etc.) can be reconciled and used homogenously.

OpenAM, an access management solution that allows operations staff to regulate access to several resources

OpenAM, an access management solution that allows operations staff to regulate access to several resources such as web pages, applications and web services that are available over the network. 
OpenAM also provides services to manage users, roles and specific rules to grant or deny access to these elements. 
OpenAM doubles as a Single Sign On (SSO) solution, which allows a user to login or authenticate only once per session and access all specific resources whether they are in different applications, servers, or locations.

Researchers have discovered a flaw in Apple’s operating systems that could allow a hacker to gain access to your Mac or iPhone by sending an iMessage.

A researcher from Cisco Talos found the vulnerability in which a hacker could send a certain type of photo file, called a .TIF, which would give the hacker access to the device’s storage and passwords.“This vulnerability is especially concerning as it can be triggered in any application that makes use of the Apple Image I/O API when rendering tiled TIF images, said Tyler Bohan from security firm Cisco Talos, according to The Guardian.“Depending on the delivery method chosen by an attacker, this vulnerability is potentially exploitable through methods that do not require explicit user interaction, since many applications (ie iMessage) automatically attempt to render images when they are received in their default configurations,” he added.

Julia is a high-level, high-performance dynamic programming language for technical computing

Julia is a high-level, high-performance dynamic programming language for technical computing, with syntax that is familiar to users of other technical computing environments. It provides a sophisticated compiler, distributed parallel execution, numerical accuracy, and an extensive mathematical function library.
The Julia

Python vs JavaScript

JavaScript is one of the most popular scripting languages. It typically runs in applications in the browser to build content such as real-time clocks and message pop-ups. Due to the enormous amount of different browsers in use around the world, JavaScript is one of the most deployed languages.

JavaScript has grown beyond this initial application and is now very popular in both desktop apps and server-side applications. Node.js is a fast-growing implementation of JavaScript in these environments. Python is object-oriented and has close compatibility with the C and C++ languages that it descended from.

JavaScript features only one numeric type, a double-precision 64-bit IEEE floating-point number. Python offers a number of numeric types. It also provides a fixed point Decimal type, useful for numbers featuring decibel points without the hazards of floating points. Some programmers believe that JavaScript is an excellent approach when scripts are small, but begins to take on inordinate c…

Python vs Java

Both Java and Python are general-purpose languages. Java's performance is faster than Python, but it takes much more code to achieve similar ends. Java is harder to learn but is very powerful for creating programs that run on multiple platforms.

 static typing vs dynamic typing A significant difference between Java and Python is that Java prefers that you define a variable’s type when first declared. After that, it will not let you change it — this is called static typing. On the other hand, Python takes an approach called dynamic typing. You can change a variable’s type, for example from string to integer or vice versa.

platform independent Another difference is that Java programs are platform independent — any mobile unit or standard computer that can run a Java Virtual Machine can launch a Java app. In contrast, Python programs must be compiled to convert your code into code that different operating systems can comprehend.

Azure Stream Analytics

Azure Stream Analytics is an event processing engine in the cloud that uncovers insights from devices, sensors, cloud infrastructure, and applications in real-time. With out-of-the-box integration to Event Hubs, the combined solution can ingest millions of events and do analytics to better understand patterns, power a dashboard, or kick off an action while data is being streamed in real-time.

OpenDJ is a directory services solution

OpenDJ is a directory services solution that supports both Lightweight Directory Access Protocol (LDAP) and Directory Services Markup Language (DSML), and also works as an identity and resource management configuration data store.

Enterprise application security mechanisms

One of the most important concerns for enterprise applications is to implement robust security mechanisms that allow developers and operation staff to easily integrate applications in a stable infrastructure and allow their users to interact with them in a seamless way. 
While many developers prefer to implement their own security mechanisms or use third-party libraries, a good alternative is to use already established products that handle authentication, authorization, confidentiality, identity, and entitlement on behalf of already developed applications.

Email SPF examples

$dig txt

"v=spf1 a mx ip4: ip4: -all"

The "a" and "mx" specify the systems permitted to send messages for the given domain.

To add ip of to the SPF so that can send email for


get ip of

Then change the SPF into

"v=spf1 a mx ip4: ip4: ip4: -all"

v=spf1SPF version 1

mxthe incoming mail servers (MXes) of the domain are authorized to also send mail for The "ip4" mechanism

The argument to the "ip4:" mechanism is an IPv4 network range. If no prefix-length is given, /32 is assumed (singling out an individual host address).

"v=spf1 ip4: -all"
Allow any IP address between and

-allall other machines are not authorized
You can use dig -x ip_address to reverse lookup the ip address.

Testing t…

Eclipse Che Installation Types

Vagrant: The quickest way to try Eclipse Che on any operating system. Server: The best performance, especially on Docker-native systems. Docker: Run Eclipse Che in a container. Yatta: A headless Che installer that also installs OS dependencies.

DNS servers can be one cause (among many) of slowness in your web browsing

DNS servers can be one cause (among many) of slowness in your web browsing if your ISP’s DNS server is overloaded and responding slowly — you may experience a delay of seconds each time you go to a web address that your computer hasn’t seen recently (and therefore has to connect to a DNS server to find out the correlating IP address).

How to open links in new tabs

Check the settings in your browser to see if there is an option to have clicked links open in new windows or tabs.  
You can also use mouse clicks and keyboard shortcuts to open the linked pages in separate tabs or windows. For instance, in many browsers, clicking the middle mouse button (the scroll wheel on some models) opens a link in a new browser tab.
You should also be able to right-click (or hold down the Control key while clicking) to see a contextual menu; this menu shows options to open the selected link either in a new tab within your current browser window or in a new browser window by itself.

Eclipse Next-Generation IDE Eclipse Che is a developer workspace server and cloud IDE.

Key features of Eclipse Che includePre-built environments for many languagesCustom environments defined by DockerfilesRoot access terminal and SSHCustom workspace commandsIntellisense for Java and JavaScriptBuilt-in application previewChe is a dynamically provisioned on-demand IDE that provides an open source alternative to the JetBrains IntelliJ Java IDE
Che features a workspace composed of projects and associated runtimes, or environments. Workspace configuration is persisted as versionable assets, and users can migrate workspace projects and runtimes to other Che instances, whether hosted locally or in the cloud.
A Che environment is composed of machines powered by Docker or localhost. Get Started

AWS provides a downloadable version of DynamoDB that you can run locally

This edition of DynamoDB lets you write applications without accessing the actual Amazon DynamoDB web service. Instead, the database is self-contained on your computer.

This local version of DynamoDB can help you save on provisioned throughput, data storage, and data transfer fees. In addition, you do not need to have an Internet connection while you are developing your application. When you are ready to deploy your application in production, you can make some minor changes to your code so that it uses the Amazon DynamoDB web service.

How to set up your AWS CLI installation

For general use, the aws configure command is the fastest way to set up your AWS CLI installation. $ aws configure If you have multiple profiles, you can configure additional, named profiles by using the --profile option. $ aws configure --profile i88ca
You must specify an AWS region when using the AWS CLI. For a list of services and available regions, see Regions and Endpoints.

Snappy is a fast data compression and decompression library written in C++ by Google

Snappy is a compression/decompression library. It does not aim for maximum compression, or compatibility with any other compression library; instead, it aims for very high speeds and reasonable compression. For instance, compared to the fastest mode of zlib, Snappy is an order of magnitude faster for most inputs, but the resulting compressed files are anywhere from 20% to 100% bigger. On a single core of a Core i7 processor in 64-bit mode, Snappy compresses at about 250 MB/sec or more and decompresses at about 500 MB/sec or more.

LevelDB is a fast key-value storage library written at Google that provides an ordered mapping from string keys to string values.

LevelDB is a fast key-value storage library written at Google that provides an ordered mapping from string keys to string values.
Keys and values are arbitrary byte arrays.Data is stored sorted by key.Callers can provide a custom comparison function to override the sort order.The basic operations are Put(key,value), Get(key), Delete(key).Multiple changes can be made in one atomic batch.Users can create a transient snapshot to get a consistent view of data.Forward and backward iteration is supported over the data.Data is automatically compressed using the Snappy compression library.External activity (file system operations etc.) is relayed through a virtual interface so users can customize the operating system interactions.DocumentationLevelDB library documentation is online and bundled with the source code.

What web cookies are

Cookies are files created by websites you've visited. Cookies store browsing information, like your site preferences or profile information. There are two types of cookies:

First-party cookies are set by the site shown in the address bar.Third-party cookies come from other sites that have things like ads or images embedded on the page you're visiting.
Not all cookies are bad. For example, cookies help the website remember your preferred settings so it can reload them when you revisit the site next week. Cookies can also help a website remember your location, so it can provide you with locally relevant content, like weather.

Basic search and replace in Vim

The :substitute command searches for a text pattern, and replaces it with a text string. There are many options, but these are what you probably want:

Find each occurrence of 'foo' (in all lines), and replace it with 'bar'.
Find each occurrence of 'foo' (in the current line only), and replace it with 'bar'.
Change each 'foo' to 'bar', but ask for confirmation first.
Change only whole words exactly matching 'foo' to 'bar'; ask for confirmation.
Change each 'foo' (case insensitive due to the i flag) to 'bar'; ask for confirmation.
:%s/foo\c/bar/gc is the same because \c makes the search case insensitive.
This may be wanted after using :set noignorecase to make searches case sensitive (the default).
Change each 'foo' (case sensitive due to the I flag) to 'bar'; ask for confirmation.

Microsoft Orleans A straightforward approach to building distributed, high-scale applications in .NET

Orleans is a framework that provides a straightforward approach to building distributed high-scale computing applications, without the need to learn and apply complex concurrency or other scaling patterns. It was created by Microsoft Research and designed for use in the cloud.

Orleans has been used extensively in Microsoft Azure by several Microsoft product groups, most notably by 343 Industries as a platform for all of Halo 4 and Halo 5 cloud services, as well as by a growing number of other companies.

Why Microsoft is stupid

I am stuck at least 20 minutes now. I didn't encounter this with Ubuntu.

Join in NoSQL database

With a relational database, you can use the SELECT statement to join data from multiple tables and return the results. Joins are fundamental to the relational model.

To ensure that joins execute efficiently, the database and its applications should be performance-tuned on an ongoing basis. Joins are most effective where the database tables are normalized and the relationships among the tables are clear. However, if you join too many tables in one SELECT statement application performance can be affected. You can work around such issues by using database replication, materialized views, or query rewrites.

A non-relational NoSQL database does not support table joins. Instead, applications read data from one table at a time.
If you are migrating an existing application from a relational database to non-relational NoSQL database, you need to denormalize your data model to eliminate the need for joins.

Serverless Microservice on AWS

The combination of AWS Lambda and Amazon API Gateway allows us to operate a REST endpoint without the need of any virtual machines.
You can use Amazon DynamoDB as your database, Amazon CloudWatch for metrics and logs, and AWS CodeCommit and AWS CodePipeline as your delivery pipeline.

Relational databases vs DynamoDB Performance

Relational databases are optimized for storage, so performance generally depends on the disk subsystem. Developers and database administrators must optimize queries, indexes, and table structures in order to achieve peak performance.

DynamoDB is optimized for compute, so performance is mainly a function of the underlying hardware and network latency. As a managed service, DynamoDB insulates you and your applications from these implementation details, so that you can focus on designing and building robust, high-performance applications.

Exponential backoff algorithm

Exponential backoff algorithm is for better flow control of Error Retries. The concept behind exponential backoff is to use progressively longer waits between retries for consecutive error responses.

For example, up to 50 milliseconds before the first retry, up to 100 milliseconds before the second, up to 200 milliseconds before third, and so on. However, after a minute, if the request has not succeeded, the problem might be need more investigation.

Error Retries

Numerous components on a network, such as DNS servers, switches, load balancers, and others can generate errors anywhere in the life of a given request.

The usual technique for dealing with these error responses in a networked environment is to implement automatic retries in the client application. This technique increases the reliability of the application and reduces operational costs for the developer.

For application that requires a fail-fast strategy, retries may not allow in case of an error.

Amazon DynamoDB Data Types

DynamoDB supports many different data types for attributes within a table. They can be categorized as follows: Scalar Types – A scalar type can represent exactly one value. The scalar types are number, string, binary, Boolean, and null. Document Types – A document type can represent a complex structure with nested attributes—such as you would find in a JSON document. The document types are list and map. Set Types – A set type can represent multiple scalar values. The set types are string set, number set, and binary set.

How to send / implement welcome email for new customer on Amazon cloud

Create a Customers table that contains customer information in Amazon DynamoDB. To send an welcomeemail to each new customer, you could enable a stream on that table, and then associate the stream with a Lambda function. The Lambda function would execute whenever a new stream record appears, but only process new items added to the Customers table. For any item that has an EmailAddress attribute, the Lambda function would invoke Amazon Simple Email Service (Amazon SES) to send an email to that address.

Amazon Cloud DynamoDB database supports two kinds of indexes

Global secondary index – an index with a partition key and sort key that can be different from those on the table. Local secondary index – an index that has the same partition key as the table, but a different sort key. You can define up to 5 global secondary indexes and 5 local secondary indexes per table.

Docker has three different ways of providing persistent storage.

The default is by using data volumes. This writes data to a directory on the host system using Docker’s internal volume management.The second way is by specifying a directory on the host system that will be mounted into a specified location inside the container.A third way is by creating a data volume container. Basically, this lets you create a shared container whose data volumes can be used by other containers.

Toad for MySQL on Amazon RDS

Use of proprietary relational database technologies is expected to continue to increase for the foreseeable future. However, open-source databases are finally becoming accepted as viable alternatives for new enterprise application development projects. Dell Toad for MySQL can connect not only to MySQL but also to nascent variants of that technology, such as MariaDB and Amazon Aurora, and it enables you to easily manage both on-premises (MySQL, MariaDB) and hosted (MySQL, Amazon Aurora) MySQL databases.

SecureShell (nassh) SecureShell (nassh) is a Chrome App that combines hterm with a NaCl build of OpenSSH to provide a PuTTY-like app for Chrome users.

SecureShell (nassh) SecureShell (nassh) is a Chrome App that combines hterm with a NaCl build of OpenSSH to provide a PuTTY-like app for Chrome users. DocumentationChangeLog -- List of interesting changes in each releaseFAQ -- Frequently Asked QuestionsHacking -- Developing the SecureShell source

How to change Wordpress user role from Database

User role fields are under $prefix_options table with the option name $prefix_user_roles and the role is assign via user_metadata. To change the user role, update it in user_metadata table. For example, to convert all users from subscriber to author:

updatewp_usermetaset meta_value='a:1:{s:6:"author";b:1;}'where meta_value='a:1:{s:10:"subscriber";b:1;}'#vise versaupdatewp_usermetaset meta_value='a:1:{s:10:"subscriber";b:1;}'where meta_value='a:1:{s:6:"author";b:1;}'

Example to bulk delete non-popular WordPress posts by MySQL query

SELECTCOUNT(DISTINCT FROM wp_posts p LEFT JOIN wp_postmeta m ONm.post_id=p.idAND meta_key ='views'WHEREm.meta_value IS NULLAND DATE_ADD(CURRENT_DATE, INTERVAL -88 DAY); DELETE p FROM wp_posts p LEFT JOIN wp_postmeta m ONm.post_id=p.idAND meta_key ='views'WHEREm.meta_value IS NULLAND DATE_ADD(CURRENT_DATE, INTERVAL -88 DAY);

How to read Data From a Amazon DynamoDB Table

DynamoDB provides the following operations for reading data: GetItem – Retrieves a single item from a table. This is the most efficient way to read a single item, because it provides direct access to the physical location of the item. (DynamoDB also provides BatchGetItem operation, allowing you to perform up to 100 GetItem calls in a single operation.) Query – Retrieves all of the items that have a specific partition key. Within those items, you can apply a condition to the sort key and retrieve only a subset of the data. Query provides quick, efficient access to the partitions where the data is stored.  Scan – Retrieves all of the items in the specified table. (This operation should not be used with large tables, because it can consume large amounts of system resources.)

DynamoDB ProvisionedThroughput

ProvisionedThroughput is Number of reads and writes per second that you need for this table. DynamoDB reserves sufficient storage and system resources so that your throughput requirements are always met. You can use the UpdateTable action to change these later, if necessary.

DynamoDB is schemaless.

Every table must have a primary key to uniquely identify each data item, but there are no similar constraints on other non-key attributes. DynamoDB can manage structured or semi-structured data, including JSON documents.

How to change Quora's font size on small iPhone screen

So you want to change Quora's font size in iPhone because you feel it is too small. After your search, you get the answer that they keep the font size fix for user experience.
It's really funny to get rid of user’s choice of font size for user experience. I cannot believe it. It's the biggest joke I have today.

how to copy file out of jar file from command prompt

Suppose you want to extract the TicTacToe class file and the cross.gif image file. To do so, you can use this command: jar xf TicTacToe.jar TicTacToe.class images/cross.gif This command does two things: It places a copy of TicTacToe.class in the current directory.It creates the directory images, if it doesn't already exist, and places a copy of cross.gif within it. The original TicTacToe JAR file remains unchanged.
The basic command to use for extracting the contents of a JAR file is: jar xf jar-file [archived-file(s)] Let's look at the options and arguments in this command: The x option indicates that you want to extract files from the JAR archive.The f options indicates that the JAR file from which files are to be extracted is specified on the command line, rather than through stdin.The jar-file argument is the filename (or path and filename) of the JAR file from which to extract files.archived-file(s) is an optional argument consisting of a space-separated list of the files t…

How to update/modify a file inside a jar

The Jar tool provides a u option which you can use to update the contents of an existing JAR file by modifying its manifest or by adding files. The basic command for adding files has this format: jar uf jar-file input-file(s) In this command: The u option indicates that you want to update an existing JAR file.The f option indicates that the JAR file to update is specified on the command line.jar-file is the existing JAR file that is to be updated.input-file(s) is a space-delimited list of one or more files that you want to add to the JAR file. Any files already in the archive having the same pathname as a file being added will be overwritten.
See Updating a JAR File.

Apache Log4j2 log levels and order

The table below illustrates how Level filtering works. In the table, the vertical header shows the Level of the LogEvent, while the horizontal header shows the Level associated with the appropriate LoggerConfig. The intersection identifies whether the LogEvent would be allowed to pass for further processing (Yes) or discarded (No).