Skip to content

Instantly share code, notes, and snippets.

@jameshartig
jameshartig / gist:2357002
Created April 11, 2012 04:55
Get MP3 bit rate and sample rate in PHP
//returns an assoc array with bitRate (kbps) and sampleRate (hz)
function getMP3BitRateSampleRate($filename)
{
if (!file_exists($filename)) {
return false;
}
$bitRates = array(
array(0,0,0,0,0),
array(32,32,32,32,8),
@danielphillips
danielphillips / UILabel+dynamicSizeMe.h
Created June 2, 2011 22:54
Adjust UILabel to change it's frame according to it's content
@interface UILabel (dynamicSizeMe)
-(float)resizeToFit;
-(float)expectedHeight;
@end
@robertkhrona
robertkhrona / AutomationSample.cs
Created April 13, 2011 18:40
A simple example of web automation using Awesomium.
using System;
using System.Collections.Generic;
using System.Linq;
using AwesomiumSharp;
using System.Threading;
namespace Automation
{
class AutomationSample
{