sudo apt-get install python3-pip
sudo pip3 install virtualenv
#!/usr/bin/env python | |
''' | |
Send an multipart email with HTML and plain text alternatives. The message | |
should be constructed as a plain-text file of the following format: | |
From: Your Name <your@email.com> | |
To: Recipient One <recipient@to.com> | |
Subject: Your subject line | |
--- |
This is without any reasonable idea about SOLR configuration. It just happens to work here. It is also specific to my server, you might severly damage yours if you copy & paste this blindly!
All commands to be executed as root.
apt-get remove --purge solr-common
Version numbers should be the ones you want. Here I do it with the last ones available at the moment of writing.
The simplest way to install elixir is using your package manager. Sadly, at the time of writing only Fedora shows
the intention to keep its packages up to date. There you can simply sudo dnf install erlang elixir
and you are good to go.
Anyway, if you intend to work with several versions of erlang or elixir at the same time, or you are tied to
a specific version, you will need to compile it yourself. Then asdf
is your best friend.
When hosting our web applications, we often have one public IP
address (i.e., an IP address visible to the outside world)
using which we want to host multiple web apps. For example, one
may wants to host three different web apps respectively for
example1.com
, example2.com
, and example1.com/images
on
the same machine using a single IP address.
How can we do that? Well, the good news is Internet browsers
#!/bin/bash | |
# Install script for LEMP Web Server on CENTOS 6.5 by Majid Arif Siddiqui | |
# Init | |
echo "Initializing..." | |
sudo yum -y update | |
sudo yum -y groupinstall "Development Tools" | |
sudo yum -y install screen |
sudo su postgres | |
psql | |
update pg_database set datistemplate=false where datname='template1'; | |
drop database Template1; | |
create database template1 with owner=postgres encoding='UTF-8' | |
lc_collate='en_US.utf8' lc_ctype='en_US.utf8' template template0; | |
update pg_database set datistemplate=true where datname='template1'; |
/*jshint browser:true */ | |
/*global DS:true, io:true, App:true */ | |
(function() { | |
'use strict'; | |
// Initializer for Models | |
window.Models = {}; | |
console.warn("Don't pollute the global namespace with Models!"); |
sudo apt-get install pgbouncer | |
# edit /etc/pgbouncer/pgbouncer.ini file | |
# edit /etc/default/pgbouncer file and set START=1 | |
sudo service pgbouncer start | |
contents of /etc/pgbouncer/pgbouncer.ini file | |
[databases] | |
drupal = host=127.0.0.1 port=5432 dbname=drupal |