Delete all Docker containers and images

Posted by Stanislav Furman on September 10, 2016

First time I heard about Docker was beginning of 2016. Finally, I got a chance to try Docker in "wild nature".

One of the most common things you might need from time to time is to stop or remove all your Docker images in one shot. Here are some simple and useful commands to stop or remove all of Docker containers:


$ docker stop $(docker ps -a -q)
$ docker rm $(docker ps -a -q)

Also there is a nice untility to clean your Docker images, volumes and networks. It's called Docker Clean.


Find domain names in just a few seconds

Posted by Stanislav Furman on April 10, 2015

Recently, I have searched for a an online service that suggests available domain name by keywords. I was really impressed by one website that I found.

Continue reading

Microsoft launches MS-DOS Mobile

Posted by Stanislav Furman on April 1, 2015

Spam with animated email subject

Posted by Stanislav Furman on January 23, 2015

Yesterday received into my Gmail inbox a couple of SPAM messages with animated email subject! Didn't it's possible, have never seen it before...

From very first look it seems like a big secirity whole in gmail!

Interesting...


Russian hackers steal 1.2 billion user credentials. Is this true?

Posted by Stanislav Furman on August 6, 2014

News agencies reported yesterday and today that a group of Russian hackers has stolen a huge number (1.2 billion!) of usernames and passwords using a botnet. This is apparently could be the largest collection of stolen user credentials in the history (if this fact is actually truth).

According to the news, the theft was discovered by an american security company called Hold Security. They did not disclose exactly what web sites have been attacked, but it was mentioned that it is a number of websites from small to big ones.

I am scratching my head trying to understand two things: 1) How did they discover this theft? 2) How do they know that it was Russian group of hackers?

Continue reading

How to use optional parameters in URI path in Yii framework

Posted by Stanislav Furman on July 10, 2014

Yii - is one of my favorite frameworks. I've done a few projects using this framework and have been always satisfied with its functionality, flexibility, performance and community support. This post starts a series of "how to" articles where I will give some tips, advises and best practices.

If you need to use optional parameters in URLs here is how you can do it in UrlManager:

Continue reading

Securing a directory with 777 or 775 permissions

Posted by Stanislav Furman on July 6, 2014

If in your project you have a publicly accessible directory that has full permissions (777), then it may cause serious security issues. An attacker may put an executable script or binary on your host and then run it remotely. This is a major security whole and it may lead to major problems if someone decides to attack your website.

However, sometimes on some shared webhosting servers you need have a folder that has risky 777 permissions (or, if possible, 775 which is a little bit better). As an example you can consider a folder where website users can upload their photos or images. In this case it opens a security whole for potential attackers. But, there are a few techniques that can help you to keep your website safe.

Continue reading

Shared web hosting Vs VPS hosting Vs dedicated servers

Posted by Stanislav Furman on June 23, 2014

Are you a web developer or/and web site owner? Then you definitely have shopped around for a website hosting!

Unlike 90s and beginning of 2000s when Yahoo! GeoCities was pretty much the only choice, today, there are a lot of choices for web developers: shared web hosting, virtual private servers, and dedicated servers.

So, which Hosting is right for You? Let's compare the 3 main types of hosting.

Continue reading

Responsive website Vs standalone mobile version

Posted by Stanislav Furman on June 16, 2014

We all use mobile devices every day. Well, at least most of us. All those smartphones, tablets, gadget-watches, etc. Most of us cannot imagine life without these things. Of course, these devices are used a lot to access the Internet. Howerver, not all websites will look the same on different screens. In fact, a lot of websites will look really bad on smaller screens. I'd even say most of web sites!

In the modern web design there is very common dilemma whether to create mobile standalone website, or create responsive design. As usual each option has its pros and cons. In this article I will look at both options and show a sort of comparison.

Comparison

Continue reading

Regular expressions? What's that? Part 2.

Posted by Stanislav Furman on June 2, 2014

Thanks to nightbloos I can continue posting funny code samples that developers meet/write from time to time. :)

Here is another good example of how NOT to do! Please, do not try this at home! This stunt was performed by untrained professionals.  :)


<?php
$forReplace = array(",","."," ","-", "+", "#""/");
foreach($forReplace as $repl){
	$find = str_replace($repl,'',$find)
}

Obviously, in this case a regular expression function must have been used.

If you have another good examples of a funny code samples, please leave it in the comments. ;)