Skip to content

Instantly share code, notes, and snippets.

View heijmerikx's full-sized avatar

Rutger Heijmerikx heijmerikx

View GitHub Profile
@heijmerikx
heijmerikx / forcessl.rb
Created February 23, 2012 12:39 — forked from dodeja/forcessl.rb
Root Domain to WWW redirection in Rails 3.1 before forcing SSL on Heroku
# in config/environments/production.rb
# config.force_ssl = true
# config.middleware.use "Forcessl"
# Make sure redirection happens before forcing ssl
# config.middleware.insert_before 'Rack::SSL', 'Forcessl'
# in lib/forcessl.rb
# change *. to your domain
class Forcessl
@heijmerikx
heijmerikx / Capistrano-Deployment-Recipe.rb
Created October 16, 2012 08:54 — forked from mrrooijen/Capistrano-Deployment-Recipe.rb
a "base" Capistrano Rails Deployment Recipe. Use it to deploy your Rails application. It is also easily expandable. So feel free to grab this Recipe and add your own tasks/customization!
# Guide
# Configure the essential configurations below and do the following:
#
# Repository Creation:
# cap deploy:repository:create
# git add .
# git commit -am "initial commit"
# git push origin master
#
# Initial Deployment:
# Guide
# Configure the essential configurations below and do the following:
#
# Repository Creation:
# cap deploy:repository:create
# git add .
# git commit -am "initial commit"
# git push origin master
#
# Initial Deployment:
#!/bin/bash
libs=( "/usr/local/lib/libmacfuse_i32.2.dylib" \
"/usr/local/lib/libosxfuse_i32.2.dylib" \
"/usr/local/lib/libosxfuse_i64.2.dylib" \
"/usr/local/lib/libmacfuse_i64.2.dylib" \
"/usr/local/lib/libosxfuse_i32.la" \
"/usr/local/lib/libosxfuse_i64.la" \
"/usr/local/lib/pkgconfig/osxfuse.pc" )
'use strict';
angular.module('reusableThings')
.directive('fileDropzone', () ->
restrict: 'A'
scope: {
file: '='
fileName: '='
}
link: (scope, element, attrs) ->
# If you are running more than one instances of graylog2-server you have to select one of these
# instances as master. The master will perform some periodical tasks that non-masters won't perform.
is_master = true
# The auto-generated node ID will be stored in this file and read after restarts. It is a good idea
# to use an absolute file path here if you are starting graylog2-server from init scripts or similar.
node_id_file = /etc/graylog2-server-node-id
# You MUST set a secret to secure/pepper the stored user passwords here. Use at least 64 characters.
# Generate one by using for example: pwgen -s 96
##################### ElasticSearch Configuration Example #####################
# This file contains an overview of various configuration settings,
# targeted at operations staff. Application developers should
# consult the guide at <http://elasticsearch.org/guide>.
#
# The installation procedure is covered at
# <http://elasticsearch.org/guide/en/elasticsearch/reference/current/setup.html>.
#
# ElasticSearch comes with reasonable defaults for most settings,
# graylog2-server REST URIs (one or more, comma separated) For example: "http://127.0.0.1:12900/,http://127.0.0.1:12910/"
graylog2-server.uris="http://[the ip address of your graylog2 server]:12900/"
# Learn how to configure custom logging in the documentation:
# http://support.torch.sh/help/kb/graylog2-web-interface/configuring-web-interface-logging
# Secret key
# ~~~~~
# The secret key is used to secure cryptographics functions. Set this to a long and randomly generated string.
# If you deploy your application to several instances be sure to use the same key!
@heijmerikx
heijmerikx / Installing and configuring Postfix Dovecot Spamassasin.md
Last active June 5, 2018 00:33
Postfix Dovecot Spamassassin Roundcube installation/configuration

#Installing configuring Postfix/Dovecot/Spamassassin/Roundcube

I've documented the steps in short to help me reproduce all the steps. Published it here for improvement and as a reference for others. Of course feel free to comment to improve this document.

This Gist is quite big and not all details are fully explained. But if you're going to run a mailserver you should be able to fill in the missing parts. The most important are covered. But be sure to read up to understand the meaning of all the stuff you configure. Since I used a lot of references of other sources (See at the end) I left out a lot of explanation in this document.

Don't forget that I'm not a Postfix/Dovecot/Spamassasin pro either. I just got it working the way I wanted to.

  • Used Ubuntu 12.04 LTS.
  • Set a root password.