Clean Up Rusty Cast Iron with Coca-Cola (and Other Chemistry Hacks)

This video from the American Chemical Society explains the science behind several life hacks, such as using salt to fix bitter coffee, and introduces us to a new one: easily getting the rust off of cast iron with a little bit of Coke.

Coke, the video reveals, contains phosphoric acid, which is used industrially as a rust and tarnish remover. It makes the rust easier to remove. So if you ever accidentally leave your cast iron pan covered in water, just grab a bottle of Coke and get your cast iron looking brand new again (after you season the pan, that is).

Thank you, chemists.

Chemistry Life Hacks (Vol. 1) – Reactions | YouTube via Business Insider


via Lifehacker
Clean Up Rusty Cast Iron with Coca-Cola (and Other Chemistry Hacks)

10 MySQL settings to tune after installation

When we are hired for a MySQL performance audit, we are expected to review the MySQL configuration and to suggest improvements. Many people are surprised because in most cases, we only suggest to change a few settings even though hundreds of options are available. The goal of this post is to give you a list of some of the most critical settings.We already made such suggestions in the past here on this blog a few years ago, but things have changed a lot in the MySQL world since then!Before we start…Even experienced people can make mistakes that can cause a lot of trouble. So before blindly applying the recommendations of this post, please keep in mind the following items:Change one setting at a time! This is the only way to estimate if a change is beneficial.Most settings can be changed at runtime with SET GLOBAL. It is very handy and it allows you to quickly revert the change if it creates any problem. But in the end, you want the setting to be adjusted permanently in the configuration file.A change in the configuration is not visible even after a MySQL restart? Did you use the correct configuration file? Did you put the setting in the right section? (all settings in this post belong to the [mysqld] section)The server refuses to start after a change: did you use the correct unit? For instance, innodb_buffer_pool_size should be set in MB while max_connection is dimensionless.Do not allow duplicate settings in the configuration file. If you want to keep track of the changes, use version control.Don’t do naive math, like “my new server has 2x RAM, I’ll just make all the values 2x the previous ones”.Basic settingsHere are 3 settings that you should always look at. If you do not, you are very likely to run into problems very quickly.innodb_buffer_pool_size: this is the #1 setting to look at for any installation using InnoDB. The buffer pool is where data and indexes are cached: having it as large as possible will ensure you use memory and not disks for most read operations. Typical values are 5-6GB (8GB RAM), 20-25GB (32GB RAM), 100-120GB (128GB RAM).innodb_log_file_size: this is the size of the redo logs. The redo logs are used to make sure writes are fast and durable and also during crash recovery. Up to MySQL 5.1, it was hard to adjust, as you wanted both large redo logs for good performance and small redo logs for fast crash recovery. Fortunately crash recovery performance has improved a lot since MySQL 5.5 so you can now have good write performance and fast crash recovery. Until MySQL 5.5 the total redo log size was limited to 4GB (the default is to have 2 log files). This has been lifted in MySQL 5.6.Starting with innodb_log_file_size = 512M (giving 1GB of redo logs) should give you plenty of room for writes. If you know your application is write-intensive and you are using MySQL 5.6, you can start with innodb_log_file_size = 4G.max_connections: if you are often facing the ‘Too many connections’ error, max_connections is too low. It is very frequent that because the application does not close connections to the database correctly, you need much more than the default 151 connections. The main drawback of high values for max_connections (like 1000 or more) is that the server will become unresponsive if for any reason it has to run 1000 or more active transactions. Using a connection pool at the application level or a thread pool at the MySQL level can help here.InnoDB settingsInnoDB has been the default storage engine since MySQL 5.5 and it is much more frequently used than any other storage engine. That’s why it should be configured carefully.innodb_file_per_table: this setting will tell InnoDB if it should store data and indexes in the shared tablespace (innodb_file_per_table = OFF) or in a separate .ibd file for each table (innodb_file_per_table= ON). Having a file per table allows you to reclaim space when dropping, truncating or rebuilding a table. It is also needed for some advanced features such as compression. However it does not provide any performance benefit. The main scenario when you do NOT want file per table is when you have a very high number of tables (say 10k+).With MySQL 5.6, the default value is ON so you have nothing to do in most cases. For previous versions, you should set it to ON prior to loading data as it has an effect on newly created tables only.innodb_flush_log_at_trx_commit: the default setting of 1 means that InnoDB is fully ACID compliant. It is the best value when your primary concern is data safety, for instance on a master. However it can have a significant overhead on systems with slow disks because of the extra fsyncs that are needed to flush each change to the redo logs. Setting it to 2 is a bit less reliable because committed transactions will be flushed to the redo logs only once a second, but that can be acceptable on some situations for a master and that is definitely a good value for a replica. 0 is even faster but you are more likely to lose some data in case of a crash: it is only a good value for a replica.innodb_flush_method: this setting controls how data and logs are flushed to disk. Popular values are O_DIRECT when you have a hardware RAID controller with a battery-protected write-back cache and fdatasync (default value) for most other scenarios. sysbench is a good tool to help you choose between the 2 values.innodb_log_buffer_size: this is the size of the buffer for transactions that have not been committed yet. The default value (1MB) is usually fine but as soon as you have transactions with large blob/text fields, the buffer can fill up very quickly and trigger extra I/O load. Look at the Innodb_log_waits status variable and if it is not 0, increase innodb_log_buffer_size.Other settingsquery_cache_size: the query cache is a well known bottleneck that can be seen even when concurrency is moderate. The best option is to disable it from day 1 by setting query_cache_size = 0 (now the default on MySQL 5.6) and to use other ways to speed up read queries: good indexing, adding replicas to spread the read load or using an external cache (memcache or redis for instance). If you have already built your application with the query cache enabled and if you have never noticed any problem, the query cache may be beneficial for you. So you should be cautious if you decide to disable it.log_bin: enabling binary logging is mandatory if you want the server to act as a replication master. If so, don’t forget to also set server_id to a unique value. It is also useful for a single server when you want to be able to do point-in-time recovery: restore your latest backup and apply the binary logs. Once created, binary log files are kept forever. So if you do not want to run out of disk space, you should either purge old files with PURGE BINARY LOGS or set expire_logs_days to specify after how many days the logs will be automatically purged.Binary logging however is not free, so if you do not need for instance on a replica that is not a master, it is recommended to keep it disabled.skip_name_resolve: when a client connects, the server will perform hostname resolution, and when DNS is slow, establishing the connection will become slow as well. It is therefore recommended to start the server with skip-name-resolve to disable all DNS lookups. The only limitation is that the GRANT statements must then use IP addresses only, so be careful when adding this setting to an existing system.ConclusionThere are of course other settings that can make a difference depending on your workload or your hardware: low memory and fast disks, high concurrency, write-intensive workloads for instance are cases when you will need specific tuning. However the goal here is to allow you to quickly get a sane MySQL configuration without spending too much time on changing non-essential MySQL settings or on reading documentation to understand which settings do matter to you.The post 10 MySQL settings to tune after installation appeared first on MySQL Performance Blog.
via Planet MySQL
10 MySQL settings to tune after installation

Watch Steve Jobs Show Off the Mac in Footage Unseen Since 1984

Watch Steve Jobs Show Off the Mac in Footage Unseen Since 1984

30 years ago, the landscape of personal computing was vastly different. It hardly even existed, compared to what it is today. Footage of the Mac’s initial unveil is out there, but this second, more polished run—a presentation for the Boston Computer Society—hasn’t been available since the event itself back on January 30th 1984.

via Gizmodo
Watch Steve Jobs Show Off the Mac in Footage Unseen Since 1984

Watch Steve Jobs Demo the Mac, In 1984

VentureBeat is one of the many outlets featuring recently surfaced video of Steve Jobs doing an early demo of the Macintosh, 30 years ago. I remember first seeing one of these Macs in 1984 at a tiny computer store in bustling downtown Westminster, Maryland, and mostly hogging it while other customers (or, I should say, actual customers) tapped their feet impatiently.

Share on Google+

Read more of this story at Slashdot.


    




via Slashdot
Watch Steve Jobs Demo the Mac, In 1984

Review: Comparison Canon 5D MarkIII vs the Canon 6D

Now that Canon has two semi-professional full-frame cameras, the EOS 5D Mark III and EOS 6D, naturally photographers wonder which is the best model for them. As a former Technical Editor of EOS Magazine (the best magazine Canon owners could possible buy) I would like to share my insights. But first, if you’re in the […]

The post Review: Comparison Canon 5D MarkIII vs the Canon 6D by appeared first on Digital Photography School.

via Digital Photography School
Review: Comparison Canon 5D MarkIII vs the Canon 6D

Make a DIY Microwave Heat Bag

Make a DIY Microwave Heat Bag

When it’s a super cold day or you have aching joints, nothing quite beats the soothing heat a microwave heat bag can deliver. With some basic sewing skills, you can make your own right at home.

Lizziecharlton over at Instructables has put together a step-by-step guide to creating your own DIY microwave heat bag. All you need some cotton material, thread, and some filing for the bag. Fillings can include rice, wheat, feed corn, beans, or several other items. Optionally, you can add some essential oils if you like your bag to have a scent when heated. That, plus being able to choose a fabric that suits your tastes, is what elevates these bags over their store-bought counterparts.

Hit up the full post at Instructables to see how to make one for yourself.

Making A Microwave Heat Bag | Instructables


via Lifehacker
Make a DIY Microwave Heat Bag

How Can I Keep Up on News When I Don’t Have a Lot of Time?

How Can I Keep Up on News When I Don’t Have a Lot of Time?

Dear Lifehacker,
I like to keep up on current events, but I simply don’t have the time to read every news story every day. Do you have any suggestions for keeping up on the news when I don’t have a lot of time?

Sincerely,
Just the News

Dear JN,
It’s true, keeping up to date on current events is basically a full time job. RSS readers are great for people who have the time to go through them, but they’re not that good for just getting a summary of world news. Thankfully, you actually have a few great options for keeping up on the news without spending a lot of time.

Find a Daily Summary You Like

How Can I Keep Up on News When I Don’t Have a Lot of Time?

If you’re a fan of watching or listening to the news, most news outlets have an hourly summary they run throughout the day that includes all of the most important news jammed into a quick, five to 10 minute slot. This is a great way to easily catch up on everything you miss.

You have a few different choices for news outlets depending on the type of news you prefer. Here are a few bulletin services that offer always up-to-date news summaries:

Of course, the above picks aren’t the only options, but they do offer simple, always updating news summaries so you can keep yourself up to date without spending time digging into it. Mac users might want to check out Hourly News, an app that stuffs the above hourly newscasts into your menu bar. Most news services also have podcasts you can subscribe to and integrate into your daily playlists.

Use Wikipedia’s Current Events Portal

How Can I Keep Up on News When I Don’t Have a Lot of Time?

While Wikipedia isn’t exactly the most accurate source of news information, it is a surprisingly good way to quickly get a synopsis of what’s going on in the world.

You have two different ways to do this. As we’ve mentioned before, Wikipedia’s Current Events page is an incredibly simple way to drop in, see what’s going on in the news, and read more if you’re interested. If you need to just get caught up on what you’ve missed while you were on vacation or otherwise off the grid, type the month and year into Wikipedia’s search and you’ll get a synopsis of all the important news that happened that month.

Use a Service that Sums Up the News for You

How Can I Keep Up on News When I Don’t Have a Lot of Time?

If you’re looking for just a quick and easy to read summary of the news in digestible little bits, your smartphone can help you out quite a bit.

We like Circa as a service that condenses all the important news from a ton of different sources, and then summarizes the main points for you. Circa does a good job of keeping things unbiased with a variety of sources so you get a pretty good overall view of what’s happening in the world in a short amount of time. The popular digest-style apps like Flipboard are also good for this as well, although they’ll cater to you specifically so you might miss some of the broader news out there.

If an app isn’t your thing, Skim That does the same thing by just sending you a daily email with news summaries.

Curate Your Social Media Feeds

How Can I Keep Up on News When I Don’t Have a Lot of Time?

Two very simple places where you probably already get the news can be made a little better. Both Twitter and Facebook are great sources for popular news articles, but they need a little work to make them usable.

Twitter’s great as a replacement to RSS feeds if you use lists. Tested’s Will Smith uses Twitter lists as a means to get curated news and it works really well. Just add a handful of news outlets to a list, and periodically check in on that list to see what’s going on. Facebook doesn’t have quite the same filtering ability as Twitter lists, but when you like a news station, you’re usually shown the biggest, best, and most important news stories of the day.

Information overload is usually bad enough as it is, but it’s possible to keep up on the news without overwhelming yourself.

Good luck,
Lifehacker

Photos by Charles Taylor and Morrison77.


via Lifehacker
How Can I Keep Up on News When I Don’t Have a Lot of Time?

MySQL Simplified

MySQL is the little engine that could. It powers sites like Facebook, YouTube, Twitter, and thousands of blogs, CMSes, and e-commerce sites. Its value to the world and to the development community could be measured in the hundreds of billions, and yet it’s free, and you can use it just by downloading it. Almost every programming language has drivers for it and it can run on so many operating systems and architectures, there’s really no limit on it.
Yet there’s a dark side. MySQL is full of gotchas and bugs, and it lacks features that sometimes call into question its status as a real database. The documentation is often open-ended and confusing, with gaps in key parts. If you want to run it, you have the option of using it on Linux, Mac, Solaris, or Windows and every hosting company or provider like Amazon AWS has their own managed service, each with its own quirks and limitations. The user community has also produced thousands of projects, with varying degrees of completeness and support.
A simple question like “how do I back my system up?” has at least 5 good answers, each with their own advocates, tutorials, and scripts. In short, the MySQL world is a crazy bazaar that is at times overwhelming.
I want to cut through confusion
I’m writing a book to help take away the confusion and provide an opinionated guide that cuts through the confusion and provides you knowledge you need to get back to your other job(s). Your boss, your team, and your customers don’t want to hear “I’m researching 5 possible solutions.” They want to hear, “I have a great solution and I’ve implemented it.” This book is your fast-track through the most common issues I’ve encountered in MySQL.
Every time I read about team giving up on MySQL because MongoDB is easier, I cry a little bit. MySQL is so simple and easy, it’s been tested and debugged over decades, and there’s so much community support from utilities, scripts, blogs, and tutorials. I want to convince you that with a little knowledge, MySQL is easier than Mongo, and it will help you and your company make money.
Another trouble is with proprietary databases. Many people are under the impression that Oracle or SQL Server have the corner on performance, that they are not bounded by the laws of computer science. While Oracle and SQL Server have pretty awesome technology that lets them sort out horrific queries, with good schema design and well-written queries, MySQL can churn out tens of thousands of requests a second (and some benchmarks put that up to hundreds of thousands), which for most workloads is plenty.
My background is that I’m a senior DBA who’s worked on MySQL with small teams. I came from a Microsoft background and decided I wanted to go over to Linux/MySQL side of the house. I’m now writing the book I wish I had when I first started. I want to empower MySQL users who like me are under pressure but who want to take those steps that will pay off in the end, like good schema design and a solid backup and recovery plan.
I started writing when I saw a pattern of confusion and lack of knowledge among my coworkers or people on StackOverflow, Reddit, and HackerNews. I’ve helped my team understand and use MySQL, and I think I can help you too.
Throughout my career, I’ve made mistakes that I want to give you a chance to avoid. I’ll also guide you through those mistakes that you can recover from (writing a badly performing query) to those that might be a career limiting move (forgetting to monitor a production server).
Audience
The first audience for this book is those who’ve used MySQL but want to get a solid foundation. There are some things that you must do if you’re developing on MySQL or if you’re in charge of a MySQL server, and I want to give you a simple guide to the essentials, as well as pointers to further research if you want to go deeper.
Another value I want to add is pep talks throughout urging you not to give into short-term laziness when it buys you long-term trouble. I won’t nag you, but I want to give you motivation to do those things that don’t have an immediate payout but in the long run are well worth it.
This guide was also meant for entrepreneurs who are focused on building a product. I created a blueprint for using MySQL effectively for you to read quickly, apply what you’ve learned, and get back to work. I want to save you time and sleepless nights.
The benefit
Why should you get this book? Two main reasons: it will reduce the risks of using MySQL while maximizing its power. Effective backups, scalable queries, and well-defined schema save you costs down the road. The end result is that you play less for your database (yes, even though MySQL is free, it still has a price). On the other hand, it will increase your revenue. I’m basing this off of a simple principle that the faster you can release a feature, the faster you can sell it to customers, and the more revenue you get. This book will show you those things you can do to complete your features faster. What’s faster than fast? How about no time at all. I want to show you the tools that are already complete, ready for your use.
I’m not going to claim I know everything about MySQL and this guide will be the end all, be all of MySQL books. I’m still learning, but I wanted to provide a way for others to benefit from what I’ve already learned. If you’ve read this far, sign-up below and get updates on the book.
Want to hear more about my book and what I’ve learned about MySQL? You can subscribe below and I’ll send you updates. I’ll also send out stuff on MySQL like tips and tutorials.
Email
Your Name
 No spam
via Planet MySQL
MySQL Simplified