This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Shell script to backup MySQL database | |
# Set these variables | |
MyUSER="" # DB_USERNAME | |
MyPASS="" # DB_PASSWORD | |
MyHOST="" # DB_HOSTNAME | |
# Backup Dest directory | |
DEST="" # /home/username/backups/DB |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Encrypting the password | |
$cost = 10; | |
$salt = strtr(base64_encode(mcrypt_create_iv(16, MCRYPT_DEV_URANDOM)), '+', '.'); | |
$salt = sprintf("$2a$%02d$", $cost) . $salt; | |
$hash = crypt('User Input Password', $salt); | |
// Decrypting password | |
if(hash_equals('User Input Password', crypt('Hash stored in database', 'User Input password'))) { | |
// Password matches. Proceed. | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<select class="input-block-level" id="countryCode" name="countryCode"> | |
<option data-countryCode="KE" value="254" Selected>Kenya (+254)</option> | |
<option data-countryCode="TZ" value="255">Tanzania (+255)</option> | |
<option data-countryCode="UG" value="256">Uganda (+256)</option> | |
<option data-countryCode="RW" value="250">Rwanda (+250)</option> | |
<option data-countryCode="MW" value="265">Malawi (+265)</option> | |
<option data-countryCode="ZM" value="260">Zambia (+260)</option> | |
<option data-countryCode="ZW" value="263">Zimbabwe (+263)</option> | |
<option data-countryCode="GB" value="44">UK (+44)</option> | |
<option data-countryCode="US" value="1">USA (+1)</option> |