Skip to content

Instantly share code, notes, and snippets.

View lorello's full-sized avatar
🏠
Working from home

LoreLLo lorello

🏠
Working from home
View GitHub Profile
@lorello
lorello / puppet-ezidea
Created January 28, 2014 11:02
Puppet example to manage Ez Publish sites
node "frontend[0-9]+" inherits frontends {
}
node frontends {
/*
One rule to manage them all:
- create path /var/www/comunebello2013/web on front-end's localstorage
- create shared path on /storage/www/comunebello2013
- pull the code from tag '2.0' in git://myrepos/openpa/ezcore... or svn://...
@lorello
lorello / kickstart
Last active August 29, 2015 14:01
Customizing for my need: localized setup for Italian site (locales, timezone, ubuntu mirror...)
# Ubuntu Kickstart file for Ubuntu 12.04 on XenServer
#
# Source: http://invalidlogic.com/2012/05/01/deploying-ubuntu-12-04-on-xenserver-made-easy/
#
# Usage:
# simply add
# ks=http://url/to/your/kickstart
# to the beginning part of “advanced OS boot parameters” option when selecting the installation media.
#
### Keybase proof
I hereby claim:
* I am lorello on github.
* I am lorello (https://keybase.io/lorello) on keybase.
* I have a public key whose fingerprint is D3AC 0480 E6FF 82F9 13D5 56BD 4F84 A064 DCAB 3226
To claim this, I am signing this object:
@lorello
lorello / dkim-domain.sh
Created October 18, 2014 09:23
Add DKIM to IspConfig3 domain on Ubuntu Pricise 12.04 LTS
DOMAIN=$1
PEMPATH=/var/db/dkim
cd $PEMPATH
amavisd-new genrsa $DOMAIN.key.pem
chown amavis:amavis $PEMPATH/$DOMAIN.key.pem
echo "Add to /etc/amavis/conf.d/51-dkim"
#!/bin/bash
#
# Disable UFW
ufw disable
# Cleanup to shrink vagrant images.
#apt-get update
#apt-get upgrade -y
apt-get -y autoremove
apt-get -y clean
dd if=/dev/zero of=/EMPTY bs=1M
@lorello
lorello / gitlab-ci-runner.pp
Created March 3, 2015 23:25
puppet-gitlab-ci-runner
Exec {
path => $path,
}
file { '/home/gitlab-runner':
ensure => directory,
}->
user { 'gitlab-runner':
shell => '/bin/false',
@lorello
lorello / octohost-cookbook-setup.sh
Last active August 29, 2015 14:17
octohost cookbook setup
apt-add-repository ppa:brightbox/ruby-ng
apt-get install git curl vim unattended-upgrades build-essential ruby2.1 ruby-switch ruby2.1-dev libxml2-dev libxslt-dev zlib1g-dev
ruby-switch --set ruby2.1
gem install bundle rake
# libgecode 4.x broken on trusty
apt-get install -y -q libqtcore4 libqtgui4 libqt4-dev libboost-dev
wget "http://us.archive.ubuntu.com/ubuntu/pool/universe/g/gecode/libgecode30_3.7.1-3_amd64.deb"
wget "http://us.archive.ubuntu.com/ubuntu/pool/universe/g/gecode/libgecode-dev_3.7.1-3_amd64.deb"
wget "http://us.archive.ubuntu.com/ubuntu/pool/universe/g/gecode/libgecodegist30_3.7.1-3_amd64.deb"
@lorello
lorello / after_push
Created May 25, 2015 22:44
GIT-Push Deploy scripts
#!/usr/bin/env bash
set -e
OLDREV=$1
NEWREV=$2
run() {
[ -x $1 ] && $1 $OLDREV $NEWREV
}
@lorello
lorello / puppet-masterless-setup.sh
Last active August 29, 2015 14:21
Puppet masterless setup (not inside a vagrant host)
#!/bin/bash
# Setup ricette vagrant su una macchina non vagrant
#
# mi aspetto di fare il clone di repository stile vagrant
#
# /Puppetfile
# /setup/manifests/default.pp
# /setup/modules
# /setup/hiera/*.yaml
#
@lorello
lorello / gist:17becc4834159bacda6e
Created June 3, 2015 14:06
API Verbs from RFC 7231
+---------+-------------------------------------------------+-------+
| Method | Description | Sec. |
+---------+-------------------------------------------------+-------+
| GET | Transfer a current representation of the target | 4.3.1 |
| | resource. | |
| HEAD | Same as GET, but only transfer the status line | 4.3.2 |
| | and header section. | |
| POST | Perform resource-specific processing on the | 4.3.3 |
| | request payload. | |
| PUT | Replace all current representations of the | 4.3.4 |