All posts by PF

How to generate a .htpasswd password with PHP?!

This worked for me.

$new_password = password_hash($old_password, PASSWORD_BCRYPT);

password_hash() creates a new password hash using a strong one-way hashing algorithm. password_hash() is compatible with crypt().
Therefore, password hashes created by crypt() can be used with password_hash().

PASSWORD_BCRYPT – Use the CRYPT_BLOWFISH algorithm to create the hash.
This will produce a standard crypt() compatible hash using the “$2y$” identifier. The result will always be a 60 character string, or FALSE on failure. Supported Options:

http://php.net/manual/en/function.password-hash.php

Remove Apache 2.4 version signature @ Ubuntu 15.04

Forbidden

You don’t have permission to access /galleries/ on this server.

 

Ubuntu 15.04
Apache/2.4.10 (Ubuntu)

Remove Apache version signature
nano /etc/apache2/conf-enabled/security.conf

On ServerTokens uncomment the line with ServerTokens Prod or add it.
Uncomment the ServerSignature Off entry or add it.

Remove PHP version from headers

I guess that by default they are disabled, but in any case you can remove it by editing the php.ini and set expose_php to off.

sudo nano /etc/php5/apache2/php.ini

online.com gifts!

Two weeks ago, ONLINE.NET sent me some gifts.

  • stickers
  • pen
  • tshirt – we host porn –
  • key chain

BTW, I’m a online.net’s client since 29/04/2014.

pjrfigueiredo@sd-696969:~$ uptime
 13:20:17 up 211 days, 21:51, 1 user, load average: 0.57, 0.50, 0.46

This is a uptime from my second machine @ online.net.

graph-yearly_bandwidth-137849

 

fotografia (3) fotografia (1) fotografia

Today, on a work for a client, i’v found Bugsnag.

error-list.3bd75e54

Detect and diagnose crashes in your applications

Bugsnag’s cross platform error monitoring helps you ship with confidence

  • Full-stack crash detection

    Add a line of code to your web framework, mobile app or JavaScript to start capturing crashes in real-time

  • Alerts & workflow integration

    Email, SMS, plus integrations with chat systems and issue trackers that keep you in the know, wherever you are

  •  Advanced crash diagnostics

    Get to the root cause of crashes faster with detailed stacktraces, device and request information, and more

 

atom.io – toggle tree view and remote-ftp

I’m using atom.io for a days now…
It’s awesome BUT it has some small UX problems that need to be fixed.

screenshot-main-f609d95c29e5190787970f8c83762fcb

OK!, the two problems that I’v faced and how I managed to solve them – they are basically the same -.

Tree view from atom.io and remote tree-view from remote-ftp weren’t opening some times.

The solution is easy!, we need to have a project open on the current atom.io window.

More readings https://github.com/atom/atom/issues/2551

If we trying to save a remote file, with remote-ftp, and we don’t have permissions to do it, no error is returned… :/

userstats.com

Found today userstats.com.

The Solution – UserStats™ shows your visitors instant and real time usage statistics – putting their mind at rest and allowing you to grow conversions, engagement and sales.

casestudy_tweetstork casestudy_dllfiles

“Companies from Basecamp to eBay use social proof statistics in some form or another, but what UserStats™ is attempting to do with their tools is make it easy to implement and accessible to everyone in terms of cost. ”
Search Engine Watch

userstats.com is from hotjar.com.