How cancer was created by the evolution

BBC has a rather lengthy article on how cancer was created by the evolution.  The gist of it is not very cheerful:

But a more telling reason for the rise is that humans, on average, live a lot longer than they used to. “If you live long enough you will get cancer,” says Biankin.

“If we decide that we all want to live to more than 70, then we have to accept that sooner or later we will get some sort of cancer,” says Bardelli. It is inevitable because our cells have not evolved to maintain their DNA for as long as we now live, he says.

However, there is some really amazing photography of cancer cells and the like.

CP695J Cancer cell scientific 3d illustration
CP695J Cancer cell scientific 3d illustration

RainLoop – simple, modern, and fast web-based email client

rainloop

For those of you who want something more than the classic-looking RoundCube, here’s the RainLoop – simple, modern, and fast web-based email client.  The feature list is very comparable, yet the interface is somewhat different, looking more like Gmail, than the Outlook Express.

National Cancer Institute on Cannabis and Cannabinoids

National Cancer Institute has an interesting update on cannabis … Basically, marijuana is not yet universally approved as a medical treatment for cancer (only in a few states for now), but quite a few large studies suggest that not only it’s not harmful, but quite helpful for both cancer treatment and post-treatment relief.

usa

I think this is a good step in the direction of “the world is not black and white”.  We’ve been tagging everything as just good or bad for way too long.  It’s time to start looking at benefits and side effects in a bit more detail.

WWW SQL Designer

www sql designer

I came across the WWW SQL Designer today, and I have only one thing to say…

Holy Molly!  I’ve been looking for a tool like this for a long long time!  It is a web-based database designer, which can export designs into MySQL.  It’s super easy to use and it does exactly what it is supposed to.  No non-sense.  Simply amazing!

Adobe Color CC – Color Schemes Tool

adobe color cc

If you are not a graphics or web designer by trade, but do have an occasional need for a color scheme that just works, Adobe Color CC is the tool just for you.  It’s web-based – so there is no need to install anything, it’s free, and it’s super easy to use.  It supports a variety of color rules – analogous, monochromatic, triad, complimentary, compound, and shades – just pick one, and drag the markers around the color circle, until you are happy.

I’ve seen and used a bunch of similar tools, but I think this one works the best of them all.

Deploying with git

Git is an excellent version control, but it’s more than just that.  A lot of people use it to deploy their projects as well.  Most suggestions (for example, this tutorial from Digital Ocean) around the web employ the post-commit (or other) hooks to push the code to a remote server.  While this works well, I prefer to do it differently.  I like the pull model better, where the deployment is triggered outside of git, and relies on git to fetch the code updates and run some sort of a build script, which handles database schema changes, cache resets, filesystem permissions, etc.  Such approach also allows to limit remote access to the servers (especially the production ones), and separate responsibilities of a developer and a deployer.

With the many pull, merge, fetch, and update options that git provides, it is sometimes difficult to choose what’s the right set of commands to use.  I’ve figured it out via a rather lengthy trial-and-error process.  But if you don’t want to go through all the pain of that, here’s a nice blog post that tells you exactly how to do that.  I’m copy-pasting the commands here just for the future reference.

cd "${DEPLOY_TREE}"
git fetch --all
git checkout --force "${TARGET}"
# Following two lines only required if you use submodules
git submodule sync
git submodule update --init --recursive
# Follow with actual deployment steps (run fabric/capistrano/make/etc)

And I suggest you read the full article for the explanation of why this is a better way and what are some of the issues with other strategies.

 

OpenAPI Specification

OpenAPI Specification v2.0 – formerly known as Swagger RESTful API Documentation Specification.

Swagger™ is a project used to describe and document RESTful APIs.

The Swagger specification defines a set of files required to describe such an API. These files can then be used by the Swagger-UI project to display the API and Swagger-Codegen to generate clients in various languages. Additional utilities can also take advantage of the resulting files, such as testing tools.

Explain Shell

Here’s a good resource for all of those who is trying to learn shell and/or figure out complex commands with lots of parameters and pipes – Explain Shell.

ExplainShell

You just paste the command and hit the “Explain” button, and the site will decompose the command into parts, providing relevant parts from the manual pages.  There are a few examples to try it out on too.

have i been pwned?

With all the security breaches  going around, it’s hard to keep track on which sites got broken into, what was stolen, and, most importantly, if you are affected.  have i been pwned? website provides a very simple interface to check if your account data was leaked, across more than a hundred websites.

pwned

Try it out … you might be surprised.  Like I was. :)

JavaScript debugging tips

I came across this blog post which provides some very handy tips for debugging JavaScript in the browser.  My favorite top three are:

Display an object in a table format for an easier view

var animals = [
   { animal: ‘Horse’, name: ‘Henry’, age: 43 },
   { animal: ‘Dog’, name: ‘Fred’, age: 13 },
   { animal: ‘Cat’, name: ‘Frodo’, age: 18 }
];
 
console.table(animals);

with this output:

console.table

Unminify code as an easy way to debug JavaScript

unminify

Custom console log messages

console.todo = function(msg) {
	console.log(‘ % c % s % s % s‘, ‘color: yellow; background - color: black;’, ‘–‘, msg, ‘–‘);
}
 
console.important = function(msg) {
	console.log(‘ % c % s % s % s’, ‘color: brown; font - weight: bold; text - decoration: underline;’, ‘–‘, msg, ‘–‘);
}
 
console.todo(“This is something that’ s need to be fixed”);
console.important(‘This is an important message’);

for this result:

console.log

Very handy stuff!