Skip to content

Instantly share code, notes, and snippets.

View jloosfelt's full-sized avatar

Jérémie Loosfelt jloosfelt

View GitHub Profile
@mattiaslundberg
mattiaslundberg / Ansible Let's Encrypt Nginx setup
Last active June 10, 2024 01:44
Let's Encrypt Nginx setup with Ansible
Ansible playbook to setup HTTPS using Let's encrypt on nginx.
The Ansible playbook installs everything needed to serve static files from a nginx server over HTTPS.
The server pass A rating on [SSL Labs](https://www.ssllabs.com/).
To use:
1. Install [Ansible](https://www.ansible.com/)
2. Setup an Ubuntu 16.04 server accessible over ssh
3. Create `/etc/ansible/hosts` according to template below and change example.com to your domain
4. Copy the rest of the files to an empty directory (`playbook.yml` in the root of that folder and the rest in the `templates` subfolder)
@hayeah
hayeah / sidekiq.rb
Created April 30, 2013 18:50
Starting sidekiq worker process using zeus for faster testing
# adapted from bin/sidekiq
# to invoke, run: zeus runner sidekiq.rb
require 'sidekiq/cli'
begin
cli = Sidekiq::CLI.instance
cli.parse
cli.run
rescue => e
@rrrodrigo
rrrodrigo / rails-app
Created September 23, 2010 13:51
Rails production.log rolling using the standard Linux logrotate mechanism
# put this into /etc/logrotate.d/app-production
# to have a Rails app running on unicorns rotating/rolling its logs monthly
# check with logrotate -f /etc/logrotate.d/app-production
/web/app/production/shared/log/*.log {
monthly
missingok
rotate 24
compress
delaycompress