This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
server_name www.adamwalz.net; | |
return 301 $scheme://adamwalz.net$request_uri; | |
} | |
server { | |
server_name adamwalz.net *.adamwalz.net; | |
root /home/adamwalz/Sites/adamwalz.net; | |
access_log /var/log/nginx/adamwalz.net/access.log; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* | |
*/ | |
/** | |
* Class MCF_Templater | |
* | |
* Based on work by Harri Bell-Thomas <https://github.com/HarriBellThomas> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# GIT aliases for ~/.gitconfig file | |
# @author Grzegorz Korba <[email protected]> | |
# Credits: Miscellaneous places on the Internet... | |
# GitFlow related sections | |
[gitflow "branch"] | |
master = master | |
develop = develop | |
[gitflow "prefix"] | |
feature = feature/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace :db do | |
require "sequel" | |
Sequel.extension :migration | |
DB = Sequel.connect(ENV['DATABASE_URL']) | |
desc "Prints current schema version" | |
task :version do | |
version = if DB.tables.include?(:schema_info) | |
DB[:schema_info].first[:version] | |
end || 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<label> Your Name (required) | |
[text* your-name] </label> | |
<label> Your Email (required) | |
[email* your-email] </label> | |
<label> Your Phone (required) | |
[tel* your-phone] </label> | |
<label> Subject |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Duplicity wrapper | |
# | |
# add to crontab: | |
# 0 0 * * * /bin/sh /usr/local/sbin/backup-host.sh | |
set -e | |
PASSPHRASE="long_passphrase" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'sinatra' | |
require 'fileutils' | |
require 'cgi' | |
require 'drb' | |
TmpDir = './tmp/' | |
ServiceFile = 'services.txt' | |
def local_get(url) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'routing' | |
class Layout | |
include Clearwater::Component | |
include Routing | |
def render | |
div([ | |
nav([ | |
Link.new({ href: '/' }, 'Home'), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'opal' | |
require 'clearwater' | |
require 'routing' | |
class Layout | |
include Clearwater::Component | |
include Routing | |
def render | |
div([ |