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
-- Preview the currently active iA Writer document using Marked. | |
tell application "iA Writer" | |
activate | |
-- Ask iA Writer for it's active document. | |
set the_document to document 1 | |
-- Save the document or prompt if not previously saved. | |
save the_document | |
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
# do not allow .git version control files to be issued | |
<Directorymatch "^/.*/\.git+/"> | |
Order deny,allow | |
Deny from all | |
</Directorymatch> | |
<Files ~ "^\.git"> | |
Order allow,deny | |
Deny from all | |
</Files> |
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
//## 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: |
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
module.exports = function(grunt) { | |
grunt.initConfig({ | |
pkg: grunt.file.readJSON('package.json'), | |
watch: { | |
livereload: { | |
files: ['_site/*'], | |
options: { | |
livereload: true | |
} | |
}, |
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 bash | |
# Check that /usr/local/bin comes before /usr/bin in your PATH | |
brew install python | |
brew install cmake | |
brew install libgit2 |
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/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 |
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 | |
# -*- 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()) |
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
defmodule Text do | |
def widows(some_str) do | |
title_list = some_str |> String.split(" ") |> Enum.map(&String.capitalize/1) | |
title_str = Enum.join(title_list, " ") | |
if Enum.count(title_list) > 2 do | |
String.replace(title_str, ~r/\s+\S*$/, " " <> List.last(title_list)) | |
else | |
title_str | |
end | |
end |
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
<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'; |
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
def no_widows(arg) | |
if arg.strip.count(" ") >= 2 | |
arg.split[0...-1].join(" ") + " #{arg.split[-1]}" | |
else | |
arg | |
end | |
end | |
#Example usage: |
NewerOlder