This file contains 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
uasort($array_to_sort, function($a, $b) | |
{ | |
return $a['order'] - $b['order']; | |
}); |
This file contains 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
/* CSS Document */ | |
html { | |
-webkit-filter: invert(100%) hue-rotate(270deg) brightness(100%) contrast(100%); | |
background: #222; | |
} |
This file contains 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
<?PHP | |
use ReCaptchaSecureToken\ReCaptchaToken as ReCaptchaToken; | |
require_once("ReCaptchaToken.php"); | |
//Generate recaptcha token | |
$recaptcha_config = [ | |
'site_key' => 'your-site-key', | |
'site_secret' => 'your-site-secret-key' | |
]; | |
$recaptcha_token = new ReCaptchaToken($recaptcha_config); |
This file contains 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
$lang = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2); | |
echo $lang; |
This file contains 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
//.htaccess code | |
RewriteEngine On | |
RewriteBase / | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule ^(.*)$ index.php?url=$1 [L,QSA] | |
//PHP part |
This file contains 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
Just use: | |
CTRL + C |
This file contains 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
tar cvpzf backup.tgz --exclude='dir_to_exculde/*' * | |
tar cvpzf backup.tgz --exclude='dir_to_exculde/*' | |
--exclude='dir_to_exculde' * | |
//The last asteric means that the current dir is used. Keep in mind that files with a dot aren't included. | |
//The secound example excludes also the directory from being included otherwise it would be included as empty one... |
This file contains 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
mv myfolder/.* . | |
So for example if the data was in /home/myuser/myfolder then from /home/myuser/ run the command. | |
Found here: | |
http://unix.stackexchange.com/questions/19344/move-folder-content-up-one-level/19345#19345 |
This file contains 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
tar -zxvf my_file.tar.gz | |
Found here: | |
http://www.computing.vt.edu/kb/entry/233 |
This file contains 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
du -h |