Skip to content

Instantly share code, notes, and snippets.

@anthonator
anthonator / client.js
Created Nov 11, 2014
Superagent wrapper with base URL support
View client.js
var request = require("superagent");
/**
* Superagent wrapper for easily making AJAX requests. Provides a layer of
* convenience by adding a base URL to each request. The base URL is derived
* from the ```API_URL``` environment variable.
*/
module.exports = {
/**
* DELETE relative `path` with optional callback `fn(res)`.
@anthonator
anthonator / s3-user-policy
Created Jul 29, 2014
S3 limited user policy
View s3-user-policy
{
"Statement": [
{
"Sid": "Stmt1361481566727",
"Action": [
"s3:AbortMultipartUpload",
"s3:DeleteObject",
"s3:DeleteObjectVersion",
"s3:GetBucketAcl",
"s3:GetBucketLocation",
@anthonator
anthonator / .emacs
Last active Sep 30, 2015
Emacs config for Rails dev
View .emacs
(push "/usr/local/git/bin" exec-path)
(setq make-backup-files nil)
(setq auto-save-default nil)
(setq-default tab-width 2)
(setq-default indent-tabs-mode nil)
(setq inhibit-startup-message t)
(setq linum-format "%d ")
(fset 'yes-or-no-p 'y-or-n-p)