I hereby claim:
- I am stephenhowells on github.
- I am howells (https://keybase.io/howells) on keybase.
- I have a public key whose fingerprint is 5B56 3BC1 82E1 B949 0D8D C359 4901 4837 D2FF E5EA
To claim this, I am signing this object:
| <?php | |
| /* | |
| By Marco Arment <[email protected]>. | |
| This code is released in the public domain. | |
| THERE IS ABSOLUTELY NO WARRANTY. | |
| Usage example: | |
| // In a registration or password-change form: |
| def no_widows(arg) | |
| if arg.strip.count(" ") >= 2 | |
| arg.split[0...-1].join(" ") + " #{arg.split[-1]}" | |
| else | |
| arg | |
| end | |
| end | |
| #Example usage: |
| <html> | |
| <head> | |
| <title>S3 POST Form</title> | |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> | |
| <script> | |
| var bucketName = 'MY_BUCKET_NAME'; | |
| var AWSKeyId = 'MY_AWS_KEY_ID'; | |
| var policy = 'MY_POLICY'; | |
| var signature = 'MY_SIGNATURE'; |
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| import base64, hmac, sha | |
| private_key = 'YOUR PRIVATE KEY' | |
| input = open("policy.txt", "rb") | |
| policy = input.read() | |
| policy_encoded = base64.b64encode(policy) | |
| signature = base64.b64encode(hmac.new(private_key, policy_encoded, sha).digest()) |
| #! /usr/bin/python | |
| from sys import argv | |
| from os.path import exists | |
| from os import makedirs | |
| from os import symlink | |
| import getopt | |
| # | |
| # Show Usage, Output to STDERR |
| #!/usr/bin/env bash | |
| # Check that /usr/local/bin comes before /usr/bin in your PATH | |
| brew install python | |
| brew install cmake | |
| brew install libgit2 |
| module.exports = function(grunt) { | |
| grunt.initConfig({ | |
| pkg: grunt.file.readJSON('package.json'), | |
| watch: { | |
| livereload: { | |
| files: ['_site/*'], | |
| options: { | |
| livereload: true | |
| } | |
| }, |
| #! /usr/bin/python | |
| from sys import argv | |
| from os.path import exists | |
| from os import makedirs | |
| from os import symlink | |
| from os import system | |
| import getopt | |
| # |
| //## Moment.JS Holiday Plugin | |
| // | |
| //Usage: | |
| // Call .holiday() from any moment object. If date is a US Federal Holiday, name of the holiday will be returned. | |
| // Otherwise, return nothing. | |
| // | |
| // Example: | |
| // `moment('12/25/2013').holiday()` will return "Christmas Day" | |
| // | |
| //Holidays: |
I hereby claim:
To claim this, I am signing this object: