Skip to content

Instantly share code, notes, and snippets.

@mattiaslundberg
mattiaslundberg / Ansible Let's Encrypt Nginx setup
Last active April 19, 2024 16:03
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)
@n8henrie
n8henrie / dbox_sync.py
Last active November 14, 2021 14:44
One-way sync of local directory to Dropbox using Dropbox API V2 and python3.
"""dbox_sync.py
One-way sync of local directory to Dropbox using Dropbox API V2 and python3.
Dependencies:
- dropbox (`pip3 install dropbox`)
Minimal modifications from:
https://github.com/dropbox/dropbox-sdk-python/blob/master/example/updown.py
@gigablah
gigablah / ansible-container.yml
Created November 11, 2015 08:17
Update Docker containers with Ansible
---
- name: Spin up a container
hosts: localhost
connection: local
gather_facts: False
sudo: False
vars:
base_image: gigablah/alpine-python
container_name: ansible_test
tasks:
@brock
brock / psql-with-gzip-cheatsheet.sh
Last active April 10, 2024 10:53
Exporting and Importing Postgres Databases using gzip
# This is just a cheat sheet:
# On production
sudo -u postgres pg_dump database | gzip -9 > database.sql.gz
# On local
scp -C production:~/database.sql.gz
dropdb database && createdb database
gunzip < database.sql.gz | psql database
@jamtur01
jamtur01 / ladder.md
Last active April 14, 2024 22:28
Kickstarter Engineering Ladder
@jwinder
jwinder / sonic-pi-tutorial.md
Last active September 22, 2023 20:12
Sonic Pi in-app tutorials concatenated - last synced 27-08-2023 - https://sonic-pi.net/tutorial.html - https://github.com/samaaron/sonic-pi - All credit & thanks to Sam Aaron!

1 Welcome to Sonic Pi

Welcome friend :-)

Welcome to Sonic Pi. Hopefully you're as excited to get started making your own sounds as I am to show you. It's going to be a really fun ride where you'll learn all about music, synthesis, programming, composition, performance and more.

@shiffman
shiffman / recordinglist.md
Last active September 13, 2019 15:53
A list of ideas for #CodingRainbow Video topics: https://www.youtube.com/user/shiffman
@straversi
straversi / bookmarklet.js
Created July 28, 2015 18:50
remove sidebar on reddit
javascript:(function()%7Bdocument.getElementsByClassName(%27side%27)%5B0%5D.style.display%3D%27none%27%3B%7D)()%3B
@Stealthii
Stealthii / company_custom.conf
Created May 5, 2015 13:52
PFsense custom unbound rules
###
# Companyname Custom config
###
## LANcache config ##
server:
# Steam
local-zone: "steampowered.com." transparent
@nl5887
nl5887 / transfer.fish
Last active March 22, 2022 09:07
Bash and zsh alias for transfer.sh. Transfers files and directories to transfer.sh.
function transfer
if test (count $argv) -eq 0
echo "No arguments specified. Usage:\necho transfer /tmp/test.md\ncat /tmp/test.md | transfer test.md"
return 1
end
## get temporarily filename, output is written to this file show progress can be showed
set tmpfile ( mktemp -t transferXXX )
## upload stdin or file