Category Archives: Uncategorized

WordPress – backup and restore!

 

Export/Backup your MySQL database to a .sql
mysqldump -u [uname] -p db_name > ~/db_backup.sql
Copy the .sql file for other server

Copy the generated file, on your user’s home to the new server with scp.

scp ~/db_backup.sql [email protected]:/home/username
Create a new database to import it into

Login into the mysql

mysql -u root -p

Create the database

create database database_name;
Import/Recover your .sql files to mysql
mysql> use database_name;
mysql> source /full/path/your_file.sql;
Create and grant privileges for your NON ROOT user
CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';
Grant privileges for your NON ROOT user use it.
grant all privileges on database.* to username@localhost identified by 'password';
FLUSH PRIVILEGES;

 

Redis Autocomplete – 8 millions of entries

This is a demo of the new ZRANGEBYLEX Redis command. It autocompletes the query field using all the 8 millions of unique lines of the Linux kernel source code as autocompletion dictionary. 

Every time the user types something, the page sends a request to a small PHP snippet called search.php which sends a query to Redis, and returns the result to the web page as a JSON array.
As you type in the input field below, you’ll see the list of suggestions appearing. 

http://autocomplete.redis.io/
http://redis.io/commands/zrangebylex

https://gist.github.com/antirez/11126283
http://jqueryui.com/autocomplete/#remote

Two great posts about OpenStack

“cover what I had neglected previously: performance considerations. Here, I will focus solely on the compute part of OpenStack”
Making the most of your application performance on OpenStack Cloud
by Piotr Siwczak

  • Get to know your potential workload
  • Choose the right proportions for OpenStack compute resources
  • Choosing the right hypervisor for OpenStack
  • Hypervisor and guest optimizations
  • Choosing the right compute node
  • Choosing the right user data storage
  • Networking Capacity in OpenStack
  • Avoid “enterpriseness” and shared resources

 

It turns out that in OpenStack, “controller node” and “compute node” can have variable meanings given how flexibly OpenStack components are deployed
Understanding your options: Deployment topologies for High Availability (HA) with OpenStack
by Piotr Siwczak

 

  • Endpoint node: This node runs load balancing and high availability services that may include load-balancing software and clustering applications. A dedicated load-balancing network appliance can serve as an endpoint node. A cluster should have at least two endpoint nodes configured for redundancy.
  • Controller node: This node hosts communication services that support operation of the whole cloud, including the queue server, state database, Horizon dashboard, and possibly a monitoring system. This node can optionally host the nova-scheduler service and API servers load balanced by the endpoint node. At least two controller nodes must exist in a cluster to provide redundancy. The controller node and endpoint node can be combined in a single physical server, but it will require changes in configuration of the nova services to move them from ports utilized by the load balancer.
  • Compute node: This node hosts a hypervisor and virtual instances, and provides compute resources to them. The compute node can also serve as the network controller for instances it hosts, if a multihost network scheme is in use. It can also host non-demanding internal OpenStack services, like scheduler, glance-api, etc.
  • Volume node: This is used if you want to use the nova-volume service. This node hosts thenova-volume service and also serves as an iSCSI target.

 

 

 

Data is KING

The Washington Post has been reporting on the U.S. intelligence community’s top-secret “black budget” after obtaining it from former intelligence contractor Edward Snowden.

The information has revealed insights about the CIA, the raid that killed Osama bin Laden, and the uneasy relationship between America and Pakistan.

Martin Grandjean has an created an overall visualization of the data, which reveals the funding of the U.S. intelligence agencies.

Read more: http://www.businessinsider.com/data-visualization-of-the-black-budget-2013-9#ixzz2dvce8kBJ