With TOR, you can specify the country of exit nodes to test a particular website from a specific country.
Just add these 4 lines in the torrc file.
ExitNodes {jp}
StrictNodes 1
GeoIPExcludeUnknown 1
AllowSingleHopCircuits 0
<?php | |
add_action('wp_loaded', function() { | |
remove_post_type_support('posts', 'comments'); | |
remove_post_type_support('posts', 'trackbacks'); | |
add_filter('comments_array', function() { return []; }, 20, 2 ); | |
add_filter('comments_open', function() { return false; }, 20, 2 ); | |
add_filter('pings_open', function() { return false; }, 20, 2 ); | |
if (is_admin()) { | |
add_action('admin_menu', function() { |
version: '3' | |
networks: | |
proxy: | |
external: | |
true | |
services: | |
app: | |
image: [IMAGE] |
<?php | |
add_filter('wp_get_attachment_url', function($url) { | |
if (getenv('USE_S3_UPLOADS')) { | |
$url = 'https://' . getenv('AWS_S3_BUCKET') . '.s3.amazonaws.com' . str_replace(WP_CONTENT_URL, '', $url); | |
} | |
return $url; | |
}); | |
add_filter('wp_calculate_image_srcset', function($sources) { |
<?php | |
/* | |
By default, wordpress create thumbnails of uploaded media, but doesn't resize the original one. | |
With this simple hook, original image (only jpg allowed) will be resized and compressed | |
*/ | |
add_action('wp_handle_upload', function($data) { | |
$max_width = 1800; | |
$max_height = 1800; |
#!/bin/bash | |
images=$(find uploads -type f | egrep -v "\-[0-9]+x[0-9]+\." | egrep "\.(jpg|png)") | |
for f in $images; do | |
echo $f | |
convert "$f" -strip -quality 86 -resize "1800x1800^>" "$f" | |
done |
<?php | |
$headers = []; | |
foreach (explode("\r\n", substr($response, 0, strpos($response, "\r\n\r\n"))) as $i => $line) { | |
if ($i === 0) continue; | |
list ($key, $value) = explode(': ', $line); | |
$headers[$key] = $value; | |
} |
With TOR, you can specify the country of exit nodes to test a particular website from a specific country.
Just add these 4 lines in the torrc file.
ExitNodes {jp}
StrictNodes 1
GeoIPExcludeUnknown 1
AllowSingleHopCircuits 0
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | |
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | |
sudo apt-get update | |
apt-cache policy docker-ce | |
sudo apt-get install -y docker-ce | |
sudo curl -o /usr/local/bin/docker-compose -L "https://github.com/docker/compose/releases/download/1.11.2/docker-compose-$(uname -s)-$(uname -m)" | |
sudo chmod +x /usr/local/bin/docker-compose |
#!/bin/bash | |
CONTAINER="/var/www/html" | |
DOMAIN="kopiro.it" | |
PUBLIC_DIR="$CONTAINER/public" | |
BACKUP_DIR="$CONTAINER/conf/backup/$(date +%s)" | |
mkdir -p "$BACKUP_DIR" | |
cp -v $CONTAINER/conf/*.pem "$BACKUP_DIR/" |
### Keybase proof | |
I hereby claim: | |
* I am kopiro on github. | |
* I am kopiro (https://keybase.io/kopiro) on keybase. | |
* I have a public key whose fingerprint is 3579 CA25 0F27 FED2 BF3F D0DF EDE5 1005 D982 268E | |
To claim this, I am signing this object: |