This file contains 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/bash | |
# Simple script to send an email when a server restart is required. | |
# Requires mailutils package and will send the email to the local user by default. | |
if [ ! -f /var/run/reboot-required ]; then | |
# No reboot required | |
exit 0 | |
else | |
# Reboot required, so notify by email |
This file contains 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
ssl_session_cache shared:SSL:1m; # 1MB is ~4000 sessions, if it fills old sessions are dropped | |
ssl_session_timeout 1440m; # Reuse sessions for 24hrs | |
# Redirect all traffic to SSL | |
server { | |
listen 80 default; | |
server_name www.example.com example.com; | |
access_log off; | |
error_log off; | |
return 301 https://example.com$request_uri; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
#!/usr/bin/env python | |
import json | |
geojson = json.load(open('bicycle_parking.geojson', 'r')) | |
features = geojson['features'] | |
with_capacity = [f for f in features if f['properties'].get('capacity')] | |
without_capacity = [f for f in features if not f['properties'].get('capacity')] |