Skip to content

Instantly share code, notes, and snippets.

@v-thomp4
v-thomp4 / gist:03e2c3e2456fece14848
Created March 28, 2016 03:10
lftp Fatal error: Certificate verification: Not trusted
vim ~/.lftp/rc
set ssl:verify-certificate no
#! coding: utf-8
import sys
import socket
import time
import commands
import datetime
GOOD_IPv4_PREFIXES = [
yum install -y postgresql-libs python-psycopg2 psycopg2 postgresql-lib \
postgresql-devel libxml2-devel python-devel libxslt-devel gcc libffi-devel openssl-devel
yum install centos-release-SCL
yum install python27
scl enable python27 bash
pip install -U sentry
@v-thomp4
v-thomp4 / gist:355bead4633363a4ca9b72eacae57c57
Created August 1, 2016 07:11
Unity: external links are opened as blank tabs in new browser window
In file: $HOME/.local/share/applications/google-chrome.desktop
find the line: Exec=/opt/google/chrome/chrome
and add a space and %U: Exec=/opt/google/chrome/chrome %U
then save the file .
@v-thomp4
v-thomp4 / gist:97a67affe560ffb716fc0a9b45be2c47
Last active August 10, 2016 10:54
Jira: Detected URL scheme, 'http', does not match expected scheme 'https'

update file server.xml

<!-- Lines added to solve the URL scheme mismatch -->
        scheme="https"
        proxyName="example.org"
        proxyPort="443"
/>
@v-thomp4
v-thomp4 / gist:c35c352c7067daa8b1c63c949d368a1c
Created September 5, 2016 04:56
rancher: ERROR: https://SERVER_IP:8080/v1 is not accessible
cat /usr/lib/firewalld/services/rancher.xml
<?xml version="1.0" encoding="utf-8"?>
<service>
<short>rancher</short>
<description>Rancher is an open source project that provides a complete platform for operating Docker in production.</description>
<port protocol="tcp" port="8080"/>
<port protocol="udp" port="4500"/>
<port protocol="udp" port="500"/>
</service>
199.47.216.0 - 199.47.219.255
108.160.160.0 - 108.160.175.255
205.189.0.0 - 205.189.0.255
@v-thomp4
v-thomp4 / gist:e190c50262ecd048f351d9e64f6ffd68
Created October 25, 2016 08:17
wordpress https nginx proxy_pass
wp-config.php
```
// If WordPress is behind reverse proxy
// which proxies https to http
if ( (!empty( $_SERVER['HTTP_X_FORWARDED_HOST'])) ||
(!empty( $_SERVER['HTTP_X_FORWARDED_FOR'])) ) {
// http://wordpress.org/support/topic/wordpress-behind-reverse-proxy-1
$_SERVER['HTTP_HOST'] = $_SERVER['HTTP_X_FORWARDED_HOST'];
1. Backup
sudo gitlab-ctl stop unicorn
sudo gitlab-ctl stop sidekiq
sudo gitlab-ctl stop nginx
sudo gitlab-rake gitlab:backup:create
Back-ups are stored in /var/opt/gitlab/backup
2. Upgrade
sudo yum install gitlab-ce
@v-thomp4
v-thomp4 / installation.sh
Created November 30, 2016 15:00 — forked from mikhailov/installation.sh
nginx+passenger (real production config)
# NOTICE: to get Nginx+Unicorn best-practices configuration see the gist https://gist.github.com/3052776
$ cd /usr/src
$ wget http://nginx.org/download/nginx-1.2.1.tar.gz
$ tar xzvf ./nginx-1.2.1.tar.gz && rm -f ./nginx-1.2.1.tar.gz
$ wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.30.tar.gz
$ tar xzvf pcre-8.30.tar.gz && rm -f ./pcre-8.30.tar.gz
$ wget http://www.openssl.org/source/openssl-1.0.1c.tar.gz