Skip to content

Instantly share code, notes, and snippets.

//Stephen J. Dickson III
//Michael Cohen
//Mario Muriel
//Computes and displays bank service fees for commercial checking account
#include <iostream>
#include <iomanip>
using namespace std;
@mjc
mjc / lastfm2itunes.rb
Created April 19, 2009 00:27
lastfm playcounts to itunes script. currently busted
#!/usr/bin/env ruby
require 'rubygems'
gem 'plist', '>=3.0.0'
gem 'scrobbler', '>=0.2.3'
gem 'hpricot', '>=0.8'
require 'open-uri'
require 'plist'
require 'scrobbler'
require 'hpricot'
# snippet modified from http://codesnippets.joyent.com/posts/show/1965
<?php
// This software code is made available "AS IS" without warranties of any
// kind. You may copy, display, modify and redistribute the software
// code either by itself or as incorporated into your code; provided that
// you do not remove any proprietary notices. Your use of this software
// code is at your own risk and you waive any claim against Amazon
// Digital Services, Inc. or its affiliates with respect to your use of
// this software code. (c) 2006 Amazon Digital Services, Inc. or its
// affiliates.
Process: CurseClient [63564]
Path: /Applications/CurseClient.app/Contents/MacOS/CurseClient
Identifier: com.yourcompany.CurseClient
Version: ??? (1.0)
Code Type: X86 (Native)
Parent Process: launchd [126]
Date/Time: 2008-12-20 08:08:01.970 -0500
OS Version: Mac OS X 10.5.6 (9G55)
Report Version: 6
Input #0, matroska:
Duration: 00:07:45.01, start: 0.000000, bitrate: N/A
Stream #0.0: Video: h264, yuv420p, 1920x800, 23.98 tb(r)
Stream #0.1(eng): Audio: liba52, 48000 Hz, 5:1, s16
Stream #0.2(eng): Subtitle: 0x0000
@mjc
mjc / DD32s-combine-plugin.php
Created December 5, 2008 04:38
WIP: Combine Javascript and CSS in wordpress
<?php
/*
Plugin Name: The Combiner
Plugin URI: http://dd32.id.au/wordpress-plugins/?plugin=combine-css-js
Description: Combine CSS & JS into one large monolithic file
Author: DD32
Version: 1.0
Author URI: http://dd32.id.au/
*/
$this->xml[] = '<?xml version="1.0" encoding="UTF-8"?>'."\r\n";
$this->xml[] = '<DistributionConfig xmlns="http://cloudfront.amazonaws.com/doc/2008-06-30/">'."\r\n";
$this->xml[] = "\t".'<Origin>'.$bucket.'</Origin>'."\r\n";
$this->xml[] = "\t".'<CallerReference>'.$caller_reference.'</CallerReference>'."\r\n";
$this->xml[] = "\t".'<Enabled>false</Enabled>'."\r\n";
$this->xml[] = '</DistributionConfig>'."\r\n";
$data = implode($this->xml);