Skip to content

Instantly share code, notes, and snippets.

View pappu687's full-sized avatar

Md. Mahbubur Rahman pappu687

View GitHub Profile
@pappu687
pappu687 / amazon-scrap-schema.json
Last active November 1, 2016 04:25
Amazon Scrap Schema
{
"title" : "//*[@id='productTitle']"
}
@pappu687
pappu687 / gogs.conf
Created December 8, 2016 05:40
Supervisor Conf for Gogs (gogs Version: 0.9.99)
[program:gogs]
directory = /home/gogs/gogs-repositories
command=/usr/bin/gogs run web
autostart=true
autorestart=true
startsecs=10
stdout_logfile=/var/log/gogs/stdout.log
stdout_logfile_maxbytes=1MB
stdout_logfile_backups=10
stdout_capture_maxbytes=1MB
@pappu687
pappu687 / wp-config.php
Created November 16, 2020 18:31
WP-CONFIG modifications for Wordpress sites behind EC2 Application Load Balancer. Fixes the redirect loop when trying to access /wp-admin
<?php
define('FORCE_SSL_ADMIN', true);
if ( (isset($_SERVER['HTTP_X_FORWARDED_PORT'] ) && ( '443' == $_SERVER['HTTP_X_FORWARDED_PORT'] ))
|| (isset($_SERVER['HTTP_CF_VISITOR']) && $_SERVER['HTTP_CF_VISITOR'] == '{"scheme":"https"}')) {
$_SERVER['HTTPS'] = 'on';
}
/**
* Rest of the wp-config.php below.
*/