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 | |
cd /usr/share/GeoIP | |
wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz || { echo 'Could not download GeoLiteCountry, exiting.' ; exit 1; } | |
#wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz || { echo 'Could not download GeoLiteCity, exiting.' ; exit 1; } | |
gunzip -f GeoIP.dat.gz | |
#gunzip -f GeoLiteCity.dat.gz | |
echo "y" | |
#|mv GeoLiteCity.dat GeoIPCity.dat |
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
#!/usr/bin/php | |
<?php | |
if( "cli"!==php_sapi_name() ) exit; | |
if( !isset($argv,$argv[1]) ){ | |
cli_error("usage: ./".basename(__FILE__)." <path>"); | |
cli_error("example: ./".basename(__FILE__)." /data/sites/example.com/fat-images/"); | |
exit; | |
} |
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
<?php | |
// affects (but not limited to) stock PHP 7.0x on Ubuntu 16.04.3 | |
// source: https://bugs.php.net/bug.php?id=71187 | |
// assuming we are using memcached for session store | |
ini_set("session.save_handler", "memcached"); | |
ini_set("session.save_path", "localhost:11211"); | |
// we need to extend and override the read method to force it to return string value | |
// in order to comply with PHP 7's more strict type checking |
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
server { | |
listen 80; | |
server_name some-example-domain.com; | |
return 301 https://some-example-domain.com$request_uri; | |
} |
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 | |
sudo iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-ports 3000 |
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
<meta name="viewport" content="width=device-width, minimal-ui, user-scalable=no, initial-scale=1"> | |
<meta name="format-detection" content="telephone=no"> |
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
/* basic reset */ | |
html,body,p,ul,ol,dl,li,dt,dd,h1,h2,h3,h4,h5,h6 { | |
margin:0;padding:0; | |
} | |
html { | |
-webkit-text-size-adjust: none; | |
} | |
ul,ol { | |
list-style:none | |
} |
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
.fifty{ | |
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";/*IE8*/ | |
filter:alpha(opacity=50);/*IE5-7*/ | |
opacity:.5;/*good browsers*/ | |
} |
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/sh | |
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/\ | |
LaunchServices.framework/Versions/A/Support/\ | |
lsregister -kill -r -domain local -domain user |