Skip to content

Instantly share code, notes, and snippets.

Avatar

Nicolas Besnard nicolas-besnard

View GitHub Profile
View request.json
{
"requests": {
"g0": {
"resource": "template.full.update",
"operation": "update",
"params": {
"id": 280620
},
"body": {
"ID": 280620,
View install_docker.sh
sudo apt-get install apt-transport-https
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
sudo apt-get install -y docker-ce
sudo curl -o /usr/local/bin/docker-compose -L "https://github.com/docker/compose/releases/download/1.17.0/docker-compose-$(uname -s)-$(uname -m)"
sudo chmod +x /usr/local/bin/docker-compose
# docker without sudo
View gist:c40539a3b8169ee2107bca3b543a21aa
{{ range $host, $containers := groupBy $ "Env.VIRTUAL_HOST" }}
upstream {{ $host }} {
{{ range $index, $value := $containers }}
{{ with $address := index $value.Addresses 0 }}
server {{ $address.IP }}:{{ $address.Port }};
{{ end }}
{{ end }}
}
@nicolas-besnard
nicolas-besnard / elasticsearch.sh
Last active Mar 12, 2018
Nginx + Puma + Rails + Capistrano on Ubuntu 14.04
View elasticsearch.sh
#!/usr/bin/env bash
install_elasticsearch() {
echo " * -- Elasticsaerch -- *"
echo " * Update"
sudo apt-get -qq -y update
echo " * Install JDK"
sudo apt-get -qq -y install openjdk-7-jre-headless
echo " * Download deb (V1.4.2)"