Skip to content

Instantly share code, notes, and snippets.

@rcravens
rcravens / auto-loader.php
Created June 22, 2013 13:37
PHP autoloader
<?php
if ( ! class_exists( 'DigLabs_Auto_Loader' ) )
{
class DigLabs_Auto_Loader
{
private $prefix;
private $base_folder;
private $folders = array();
private $paths_looked = array();
@rcravens
rcravens / html5_drag_drop_file_upload.php
Created March 1, 2013 20:50
HTML5 Drag & Drop File Upload A demonstration of some features.
<?php
/*
HTML5 Drag & Drop File Upload with Progress
Borrowed from these original sources:
http://webstandardssherpa.com/reviews/dissecting-gmails-email-attachments/
http://www.script-tutorials.com/html5-drag-and-drop-multiple-file-uploader/
@rcravens
rcravens / gist:3193766
Created July 28, 2012 15:38
HTTP REST-like API Design Notes
Notes:
1. API Keys: private, public
- Every user will be issued a API keys (public and private) that can be used to access the API on their behalf. Requests via the API keys have the same priviledges as requests by the user.
2. API implements a HTTP based REST-like interface
- Root URL (e.g. https://example.com/api/1)
- HTTP Verbs:
* Create - POST
* Read - GET
@rcravens
rcravens / msbuilder.py
Created July 19, 2011 19:06
Python Script to Automate MSBuild Tasks
# Generic build script that builds, tests, and creates nuget packages.
#
# INSTRUCTIONS:
# Update the following project paths:
# proj Path to the project file (.csproj)
# test Path to the test project (.csproj)
# nuspec Path to the package definition for NuGet.
#
# delete any of the lines if not applicable
#