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 | |
function get_real_ip() { | |
$proxy_headers = array( | |
'CLIENT_IP', | |
'FORWARDED', | |
'FORWARDED_FOR', | |
'FORWARDED_FOR_IP', | |
'HTTP_CLIENT_IP', | |
'HTTP_FORWARDED', |
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
find -iname '.htaccess' -exec sed 's/Deny from all//' -i {} \; |
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
#!/bin/bash | |
# Public domain license | |
# Not original author: Remigijus Jarmalavičius | |
# | |
# Usage: | |
# pomodoro "title for work" | |
filename="/home/remigijus/Kodas/smelio-deze/`date '+%Y-%m-%d'`.log" | |
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
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, ALTER, LOCK TABLES, INDEX ON db_name.* TO db_username@localhost IDENTIFIED BY 'super duper secret password'; |
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
RewriteEngine On | |
RewriteCond %{HTTP_HOST} !^www\. | |
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L] |
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
RewriteEngine on | |
RewriteCond %{REQUEST_URI} !/maintenance.html$ | |
RewriteCond %{REMOTE_ADDR} !^123\.123\.123\.123 | |
RewriteRule $ /maintenance.html [R=302,L] |
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
RewriteEngine On | |
#Replace ?mysite\.com/ with your blog url | |
RewriteCond %{HTTP_REFERER} !^http://(.+\.)?mysite\.com/ [NC] | |
RewriteCond %{HTTP_REFERER} !^$ | |
#Replace /images/nohotlink.jpg with your "don't hotlink" image url | |
RewriteRule .*\.(jpe?g|gif|bmp|png)$ /images/nohotlink.jpg [L] |
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
<FilesMatch "(install\.sql|config\.php|config\.php\.sample)$"> | |
deny from all | |
</FilesMatch> |
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
ErrorDocument 400 /errors/badrequest.html | |
ErrorDocument 401 /errors/authreqd.html | |
ErrorDocument 403 /errors/forbid.html | |
ErrorDocument 404 /errors/notfound.html | |
ErrorDocument 500 /errors/serverr.html |
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
FileETag MTime Size | |
<ifmodule mod_expires.c> | |
<filesmatch "\.(jpg|gif|png|css|js)$"> | |
ExpiresActive on | |
ExpiresDefault "access plus 1 year" | |
</filesmatch> | |
</ifmodule> |
NewerOlder