Skip to content

Instantly share code, notes, and snippets.

View devth's full-sized avatar
Hacking on @yetibot

Trevor Hartman devth

Hacking on @yetibot
View GitHub Profile
$gateway->setCharsetHandler("mbstring","UTF-8","UTF-8");
var context:LoaderContext = new LoaderContext(true, ApplicationDomain.currentDomain);
var loader:BulkLoader = new BulkLoader("loadmystuffplskthxbye");
loader.add( someS3Url, { context: context } ); // WIN
require 'rubygems'
require 'sinatra'
require 'tempfile'
get '/audio' do
text = params['text']
temp_file = Tempfile.new 'mp3'
# generate mp3 to temp file
require 'rubygems'
require 'sinatra'
require 'app.rb'
run Sinatra::Application
# Simple SVN apache config by devth.com
# Place in /etc/apache2/sites on OS X Server
# Adding or removing permissions for a user is as simple as adding or
# removing them from "svn_users" group in Workgroup Manager
<Location /svn>
DAV svn
SVNParentPath /Library/Subversion/Repositories
<Limit GET HEAD OPTIONS CONNECT POST PROPFIND PUT DELETE PROPATCH MKCOL COPY MOVE LOCK UNLOCK>
Require group svn_users
@devth
devth / iPhone default.html
Created May 11, 2010 18:06
iPhone html template for non-scaling content
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta name = "viewport" content = "width = device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=no;">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="apple-mobile-web-app-capable" content="yes">
<style type="text/css" media="screen">
body{ margin:0; padding:0; }
</style>
</head>
-# Automatically tie views to their controllers in application.html.haml
-# Allows CSS to target view-specific styles
%body{ :class => controller.controller_name }
<script type="text/javascript">
var queueBytesLoaded = 0;
var queueBytesTotal = 0;
var myQueue = null;
var queueChangeHandler = function(queue){
// alert('Uploading Started');
myQueue = queue;
// console.log("COLLECTION CHANGE!");
var list = document.getElementById('file_todo_list');
// PRELOADER
var cache = [];
// Arguments are image paths relative to the current page.
$.preLoadImages = function() {
var args_len = arguments.length;
for (var i = args_len; i--;) {
var cacheImage = document.createElement('img');
cacheImage.src = arguments[i];
cache.push(cacheImage);