What this will cover
- Host a static website at S3
- Redirect
www.website.com
towebsite.com
- Website can be an SPA (requiring all requests to return
index.html
) - Free AWS SSL certs
- Deployment with CDN invalidation
#! /usr/bin/env ruby | |
# This script can be used to parse and dump the information from | |
# the 'html/contact_info.htm' file in a Facebook user data ZIP download. | |
# | |
# It prints all cell phone call + SMS message + MMS records, plus a summary of each. | |
# | |
# It also dumps all of the records into CSV files inside a 'CSV' folder, that is created | |
# in whatever the working directory of the program is when executed. | |
# |
license: gpl-3.0 |
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# | |
# fetch_and_combine.py | |
# | |
""" | |
Scans CloudFront logs in an S3 bucket for any that are new. Combines log files | |
into a single local file per hour. If logs for multiple CloudFront | |
distributions are present, combines them all. |
## fix "Waiting for other installations to complete." on OSX 10.6 10.7 | |
## sometimes a failed installation leaves us unable to | |
## perform an installation. The following fixes it for me | |
sudo rm /private/var/db/mds/system/mds.install.lock | |
sudo reboot |
consumer_key = 'your-consumer-key' | |
consumer_secret = 'your-consumer-secret' | |
access_token = 'your-access-token' | |
access_secret = 'your-access-secret' |
#!/bin/bash | |
# | |
# Ansible role test shim. | |
# | |
# Usage: [OPTIONS] ./tests/test.sh | |
# - distro: a supported Docker distro version (default = "centos7") | |
# - playbook: a playbook in the tests directory (default = "test.yml") | |
# - cleanup: whether to remove the Docker container (default = true) | |
# - container_id: the --name to set for the container (default = timestamp) | |
# - test_idempotence: whether to test playbook's idempotence (default = true) |
#!/bin/bash | |
files=(\ | |
'https://adaway.org/hosts.txt'\ | |
'http://winhelp2002.mvps.org/hosts.txt'\ | |
'http://hosts-file.net/.\ad_servers.txt'\ | |
'http://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&showintro=0&mimetype=plaintext'\ | |
'http://someonewhocares.org/hosts/hosts'\ | |
) |
This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.
The script is here:
#!/bin/bash
convert $1 -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 $2
<?php | |
/* | |
Adaptation by Marco Arment <[email protected]>. | |
Adapted from Portable PHP Password Hashing Framework (phpass) version 0.3: | |
http://www.openwall.com/phpass/ | |
phpass was by Solar Designer <solar at openwall.com> in 2004-2006 and is in | |
the public domain. This adaptation is also in the public domain. |