Skip to content

Instantly share code, notes, and snippets.

View objectoriented's full-sized avatar

Gareth Dismore objectoriented

  • Denver, CO
View GitHub Profile
@objectoriented
objectoriented / 0_reuse_code.js
Created July 19, 2017 17:11
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
<?php
/*
# Dynamic Image Resize .htaccess
RewriteCond %{REQUEST_URI} /resize/(\d+)x(\d+)/(.*)
RewriteRule ^(.*)$ http://www.example.com/resize.php?width=%1&height=%2&file=%3 [L]
*/
// Example Usage: http://www.example.com/resize/300x350/images/example-image.jpg
// Declare Variables
@objectoriented
objectoriented / aws_cf_invalidate.rb
Created September 28, 2010 17:37 — forked from jmlacroix/aws_cf_invalidate.rb
Ruby script to invalidate objects on Amazon's CloudFront CDN (shows status of recent requests also)
require 'rubygems'
require 'hmac-sha1' # on OS X: sudo gem install ruby-hmac
require 'net/https'
require 'base64'
#
# CHANGE ME: S3 access credentials go here, along with CloudFront Distribution ID
#
s3_access=''
s3_secret=''