#!/usr/bin/env ruby

require 'rubygems'
...

Ruby automatic info plist versio...

by slf, September 30, 2011 11:30, No refactoring, tagged with ruby, git, xcode, plist

I hacked up a script to aut...

098e5c1a565b47e9860539fbebc3fa98 Talk

Ruby On Dynamic Vertices Generation

by slf, March 16, 2010 16:08

FYI the workaround was to a...

098e5c1a565b47e9860539fbebc3fa98 Talk
def make_verts(n, r)
  # assume centerpoint of 0,0 for now
  xc = 0.0
...

Ruby On Dynamic Vertices Generation

by slf, March 09, 2010 13:53

I think I've corrected the ...

098e5c1a565b47e9860539fbebc3fa98 Talk
def make_verts(s, r)
  a = Math::PI/s
  b = Math::PI/(s/2)
...

Ruby Dynamic Vertices Generation

by slf, March 08, 2010 22:46, 2 refactorings, tagged with ruby math

Can somebody check my math?...

098e5c1a565b47e9860539fbebc3fa98 Talk

C# On Looking for a pattern to ha...

by slf, March 27, 2009 19:48

Very nice, clean and concis...

098e5c1a565b47e9860539fbebc3fa98 Talk

C# On Looking for a pattern to ha...

by slf, March 24, 2009 18:43

@uvw, I like it. Kind of r...

098e5c1a565b47e9860539fbebc3fa98 Talk

C# On Looking for a pattern to ha...

by slf, March 24, 2009 14:49

Maybe a psuedo-registry pat...

098e5c1a565b47e9860539fbebc3fa98 Talk
String foo = Request.QueryString["foo"];
if (!String.IsNullOrEmpty(foo))
{
...

C# Looking for a pattern to ha...

by slf, March 24, 2009 14:44, 8 refactorings, tagged with patterns

There is a page in a C# web...

098e5c1a565b47e9860539fbebc3fa98 Talk

JavaScript On Format Currency

by slf, March 02, 2009 17:12

If you like jspec you might...

098e5c1a565b47e9860539fbebc3fa98 Talk

JavaScript On Format Currency

by slf, January 26, 2009 17:15

I especially like the unshi...

098e5c1a565b47e9860539fbebc3fa98 Talk
function formatCurrency(num) {
	var stripped = num.toString().replace("$","").replace(",",""); // strip off the $ and thousands seperators
	var n = (isNaN(stripped)) ? 0 : stripped*1; // coerce into a number, default to zero
...

JavaScript On Format Currency

by slf, January 22, 2009 18:29

Probably does not need to d...

098e5c1a565b47e9860539fbebc3fa98 Talk
function formatCurrency(num) {
    num = num.toString().replace(/\\$|\\,/g,'');
    if (isNaN(num)) num = '0';
...

JavaScript Format Currency

by slf, January 20, 2009 20:01, 7 refactorings, tagged with math, regex, formatting

During a code review we fou...

098e5c1a565b47e9860539fbebc3fa98 Talk