Preseed apt_get for unattended_installs

Installation of some packages require user input, which breaks the entire concept of “unattended” installs. Here’s a quick fix to get around that.

First, on a setup computer, install the following:

sudo apt-get install debconf-utils

Now, install whatever packages you wish to later install in an unattended mode. Answer the questions for installation appropriately when prompted. Next we will export those answers into a “seed” file that we can use when installing the package on a new machine. For instance, I’ve installed several ldap authentication packages, so I might want to grab all of the settings those packages ask for.

sudo debconf-get-selections | grep ldap > ldap.seed

If you remember from yesterday, we created an archive that included a setup script and several config files. Place the ldap.seed file inside that archive along with the other scripts, and just before doing the apt-get install add the following line to the add2network.sh file:

debconf-set-selections ./ldap.seed

And there you have it – your apt-get won’t ask for details anymore.

Source: ossramblings

Showerloop

REAL-TIME FILTRATION, PURIFICATION & RECYCLING  SYSTEM FOR SHOWER WATEROPEN SOURCE – OPEN HARDWARE – ECOLOGICAL – ECONOMICALShowers are great, but pouring hot and almost drinkable water down the drain is not. Besides the obvious costs to the environment and your bills, there is also a conscious on unconscious psychological cost any time you create waste. To solve this problem we created Showerloop. It’s a shower that collects, cleans and reuses the water in real time while you are showering. So now you can shower for as long as you like without wasting precious resources.SHOWERLOOP VS NORMAL SHOWERNormal ShowerShowerloop90% reduction in water usage and 70-90% in energy reduction for a 10 minute shower with a flow rate of 10 l/min. Savings are dependant on user behaviour and can vary. Use Just one bucket of water for a shower of any length.  See the savings section for more information.

Source: Showerloop

MySql JSON support!

JSON support. Beginning with MySQL 5.7.8, MySQL supports a native JSON type. JSON values are not stored as strings, instead using an internal binary format that permits quick read access to document elements. JSON documents stored inJSON columns are automatically validated whenever they are inserted or updated, with an invalid document producing an error. JSON documents are normalized on creation, and can be compared using most comparison operators such as =,<, <=, >, >=, <>, !=, and <=>; for information about supported operators as well as precedence and other rules that MySQL follows when comparing JSON values, see Comparison and Ordering of JSON Values.

Image result for mysql

MySQL 5.7.8 also introduces a number of functions for working with JSON values. These functions include those listed here:

Image result for json

In MySQL 5.7.9 and later, you can use column->path as shorthand for JSON_EXTRACT(column, path). This works as an alias for a column wherever a column identifier can occur in an SQL statement, including WHERE, ORDER BY, and GROUP BY clauses. This includes SELECT, UPDATE, DELETE, CREATE TABLE, and other SQL statements. The left hand side must be a JSON column identifier (and not an alias). The right hand side is a quoted JSON path expression which is evaluated against the JSON document returned as the column value.

See Section 12.16.3, “Functions That Search JSON Values”, for more information about -> and JSON_EXTRACT(). For information about JSON path support in MySQL 5.7, see Searching and Modifying JSON Values. See also Secondary Indexes and Virtual Generated Columns.