July 31, 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—HSTS prevents 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.

Facebook Profit Nearly Triples on Mobile Ad Sales and New Users

Amazon’s Profits Grow More Than 800 Percent, Lifted by Cloud Services

The next big update to Windows 10 brings extensions and more.

Early versions of Microsoft’s new browser did not include support for extensions.

July 29, 2016

Clinton Campaign Computers Are Said to Be Hacked, Apparently by Russians

The FBI and Justice Department are investigating a computer hack of the Clinton campaign in addition to its examination of intrusions of other Democratic Party organizations

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.

With DevOps, sysadmins, DBAs, network folks, developers, QA, are all the same team.

Puppet is one of the most popular DevOps tool

At least on the job market:

http://job.i88.ca/index.jsp?keys=Devops%2C+puppet

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. 

How to block someone from sending you iMessages on iPhone/iPad

  1. Open the Settings app.
  2. Scroll down and tap on Messages.
  3. Now, scroll down again and tap on Blocked.
  4. To add a person to this list, tap on Add New..
  5. Choose the contact and tap on Done.

July 28, 2016

Google Sheets, the free spreadsheet companion app to Google Docs

Google Sheets is a great tool to start out with spreadsheets. It's free, easy to use, comes packed with hundreds of functions and the core tools you need, and lets you share spreadsheets and collaborate on them with others.

July 27, 2016

Most IT security teams know they need to prioritize their worst vulnerabilities.

However, with the overload of vulnerability disclosures it has become an extremely challenging task.

A secure web server isn’t really secure if the infrastructure supporting it remains vulnerable.

Unless you implement infrastructure protection, your non-HTTP assets are vulnerable and you may not be as protected as you think you are.

Maintaining your own servers with do-it-yourself security is a lot like stashing your life savings in your mattress.

It may seem safe, but banks do a much better job.

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.

A recent study by AMI-Partners suggests that digital security is a top priority among Canadian small business owners.

A recent study by AMI-Partners suggests that digital security is a top priority among Canadian small business owners.

Choosing to host your data and apps in the cloud is the single biggest thing you can do to safeguard your business, immediately and significantly.

Analysis of emails registering is keys to identify and onboard potential high-value commercial customers.

Analysts say the global cloud-computing business will be worth $67 billion by 2020

Apple Sales Continue to Drop

Robert Fano, 98, Died

He was an engineer who helped develop Interactive Computers

July 25, 2016

Google Phone app with spam protection

Google Phone app with spam protection on #Nexus and #AndroidOne devices can warn you about potential spam callers and give you the ability to block and report these numbers. 

If you already have Caller ID turned on, spam protection will be available on your phone once your app updates to the latest version. Learn more: https://goo.gl/FFRCP1

July 23, 2016

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.

Driving a car is legal in some states starting at the age of 16.

On average, children are getting their first smartphones around age 10.

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 WordPress.com 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.
  1. Open Chrome.
  2. In the top right, click the icon you see: Menu Menu or More More.
  3. Click Settings.
  4. At the bottom, click Show advanced settings.
  5. Under the section 'Reset settings', click Reset settings.
  6. 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.

Codenvy 4.5 has been released, it includes all the features and fixes from Eclipse Che 4.5 and adds an additional 27 resolved issues.

This release includes the following features from Eclipse Che:
• New workspace URL schema
• Configurable Docker API version
• JGit implementation for git features
• New resources manager
UX improvements:
• Refresh explorer
• Side-by-side terminals
• Machine outputs

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 continue their active Internet use without interruption.

Breadth First Traversal graph vs Breadth First Traversal tree

Breadth First Traversal for a graph is similar to Breadth First Traversal of a tree. 

The only catch here is, unlike trees, graphs may contain cycles, so we may come to the same node again. To avoid processing a node more than once, we use a boolean visited array.

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. 

Apple will sell limited edition Apple Watch bands for the Olympics as sales stall

Apple says Pokémon Go is the most downloaded app in a first week ever

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.


July 22, 2016

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 Language

julialang.org/

CoffeeScript allows developers to write simpler code than traditional JavaScript, which is then converted to the JavaScript language preferred by Web browsers.

Go is statically typed language from Google is similar to C but has the ease-of-use that you get with a dynamic scripting language.

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 complexity when projects grow much larger.

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.

Python has advantages of power, versatility, flexibility, and ease of programming

Python has long been a go-to language for developers creating cutting-edge web applications. However, Python’s advantages of power, versatility, flexibility, and ease of programming have made it a favorite language in a multitude of applications, industries, and niches.

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. 

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.

Google domain features included at no additional cost

Features included at no additional cost

  • Whois privacy
  • Domain forwarding and subdomain forwarding
  • Email forwarding (forwarding of email aliases @<your domain>)
  • Google nameservers with 10 million DNS resolutions per year
  • Support via help center, email, chat, or phone.

See Google Domains features for a list of features with descriptions.

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).

Data retention for legal matters and investigations.

Your business may face a lawsuit someday. Vault keeps you prepared by letting you preserve users’ Gmail data beyond standard retention periods.

What happens to data in deleted accounts?

If you delete a user, all data associated with the user's account will be removed from Google. As a best practice, Google recommends suspending user accounts instead of deleting them.

July 21, 2016

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 include

  • Pre-built environments for many languages
  • Custom environments defined by Dockerfiles
  • Root access terminal and SSH
  • Custom workspace commands
  • Intellisense for Java and JavaScript
  • Built-in application preview
Che 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.

July 20, 2016

How to Find Current Timezone Command on CentOS / RHEL / Oracle Linux

$ date
Wed Jul 20 19:24:17 EDT 2016

Or

$ grep ZONE /etc/sysconfig/clock
ZONE="America/Toronto"

How to get the current time zone of MySQL?

mysql> SELECT @@global.time_zone, @@session.time_zone;
+--------------------+---------------------+
| @@global.time_zone | @@session.time_zone |
+--------------------+---------------------+
| SYSTEM             | SYSTEM              |
+--------------------+---------------------+

July 19, 2016

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.

http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DynamoDBLocal.html

How to use the AWS CLI to load data into the dynamodb tables

$ aws dynamodb batch-write-item --request-items file://Reply.json

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.

The Dow Jones Industrial average gained 25.96 points to 18,559.01 - a 6th record high and 8th straight winning session.

The S&P 500 composite index declined slightly 3.11 points to 2,163.78 and the Nasdaq faded 19.41 points to 5,036.37.

On the Toronto Stock Exchange, the S&P/TSX composite index was barely changed, down 7.79 points to 14,524.61.

In DynamoDB, you use the UpdateItem action to modify a single item.

If you want to modify multiple items, you must use multiple UpdateItem operations.

July 18, 2016

One of the risks facing any company is that someone could bring product liability claims against it.

You should ensure that your dataase indexes are actually being used by your application, and not simply taking up space.

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.

Documentation

LevelDB 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:

:%s/foo/bar/g
Find each occurrence of 'foo' (in all lines), and replace it with 'bar'.
:s/foo/bar/g
Find each occurrence of 'foo' (in the current line only), and replace it with 'bar'.
:%s/foo/bar/gc
Change each 'foo' to 'bar', but ask for confirmation first.
:%s/\<foo\>/bar/gc
Change only whole words exactly matching 'foo' to 'bar'; ask for confirmation.
:%s/foo/bar/gci
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).
:%s/foo/bar/gcI
Change each 'foo' (case sensitive due to the I flag) to 'bar'; ask for confirmation.
:%s/foo\C/bar/gc is the same because \C makes the search case sensitive.

This may be wanted after using :set ignorecase to make searches case insensitive.
The g flag means global – each occurrence in the line is changed, rather than just the first. This tip assumes the default setting for the 'gdefault' and 'edcompatible' option (off), which requires that the g flag be included in%s///g to perform a global substitute. Using :set gdefault creates confusion because then %s/// is global, whereas %s///g is not (that is, g reverses its meaning).

July 17, 2016

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.

A cache in front of cloud hosted database is boosting performance and saving costs.

Especially true for read-intensive and spiky workloads.

There are only two hard things in Computer Science: cache invalidation and naming things. - Phil Karlton

July 16, 2016

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.

July 15, 2016

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 welcome email 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.

Optimized MySQL Server Docker images

Optimized MySQL Server Docker images, created and maintained by the MySQL team at Oracle.
https://hub.docker.com/r/mysql/mysql-server/

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.

How to modify/edit Local DNS on Windows (/etc/hosts equivalent)

%SystemRoot%\System32\drivers\etc\hosts

How to run as administrator from Windows command line

runas.exe /savecred /user:administrator "your-command here"

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.

Documentation

  • ChangeLog -- List of interesting changes in each release
  • FAQ -- Frequently Asked Questions
  • Hacking -- 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:

update wp_usermeta set meta_value='a:1:{s:6:"author";b:1;}' where meta_value='a:1:{s:10:"subscriber";b:1;}'
#vise versa
update wp_usermeta set meta_value='a:1:{s:10:"subscriber";b:1;}' where meta_value='a:1:{s:6:"author";b:1;}'

July 14, 2016

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

SELECT 
    COUNT(DISTINCT p.id)
FROM
    wp_posts p
        LEFT JOIN
    wp_postmeta m ON m.post_id = p.id AND meta_key = 'views'
WHERE
    m.meta_value IS NULL
        AND DATE_ADD(CURRENT_DATE,
        INTERVAL - 88 DAY);

DELETE p FROM wp_posts p
        LEFT JOIN
    wp_postmeta m ON m.post_id = p.id AND meta_key = 'views' 
WHERE
    m.meta_value IS NULL
    AND DATE_ADD(CURRENT_DATE,
    INTERVAL - 88 DAY);

Example to bulk delete/clean WordPress post meta data MySQL query

SELECT 
    COUNT(DISTINCT meta_id)
FROM
    wp_postmeta m
        LEFT JOIN
    wp_posts p ON m.post_id = p.id
WHERE
    p.id IS NULL;

DELETE m FROM wp_postmeta m
        LEFT JOIN
    wp_posts p ON m.post_id = p.id 
WHERE
    p.id IS NULL;

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.)

How to get Information About Amazon DynamoDB Table

DescribeTable returns information. about

  • TableName
  • KeySchema
  • indexes on the table
  • provisioned throughput settings
  • an approximate item count
  • and other metadata.


The only parameter is the table name.

DescribeTable I88Sample

You do not need to specify a Amazon DynamoDB table's storage requirements because storage allocation is managed entirely by DynamoDB.

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 a web service, and interactions with it are stateless.

Applications do not need to maintain persistent network connections. Instead, interaction with DynamoDB occurs using HTTP(S) requests and responses.

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.

NoSQL is a term used to describe non-relational database systems that are highly available, scalable, and optimized for high performance.

Instead of the relational model, NoSQL databases use alternate models for data management, such as key-value pairs or document storage.

Atlassian acquires StatusPage

Atlassian has acquired StatusPage, a Y Combinator-incubated service that allows online businesses to keep their users updated about the status of their online services.

Cloud9 Acquired by Amazon (c9.io)

Cloud9 will be joining the Amazon Web Services family

https://c9.io/blog/great-news/

"I started to think if I could do anything to build women up, rather than the constant tear down, I’m going to do it." Melissa McCarthy

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.

July 13, 2016

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 to be extracted from the archive. If this argument is not present, the Jar tool will extract all the files in the archive.
As usual, the order in which the x and f options appear in the command doesn't matter, but there must not be a space between them.

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.

Java : getResourceAsStream Example

InputStream inputStream = 
        getClass().getClassLoader().getResourceAsStream("config.properties");

new Properties().load(inputStream);

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).
Event LevelLoggerConfig Level
TRACEDEBUGINFOWARNERRORFATALOFF
ALLYESYESYESYESYESYESNO
TRACEYESNONONONONONO
DEBUGYESYESNONONONONO
INFOYESYESYESNONONONO
WARNYESYESYESYESNONONO
ERRORYESYESYESYESYESNONO
FATALYESYESYESYESYESYESNO
OFFNONONONONONONO

Featured Post

Check which window manager is running on Linux

In the terminal type  env  to see all environment variables. Some of them are: XDG_CURRENT_DESKTOP  - Tells you what Windows Manager you...