Skip to content

Instantly share code, notes, and snippets.

@jls
jls / Mysql Gem Error
Created May 17, 2010 14:54
Mysql Gem Error
Received this error:
uninitialized constant MysqlCompat::MysqlRes
Used this command on snow leopard:
export ARCHFLAGS="-arch i386 -arch x86_64" ; sudo gem install --no-rdoc --no-ri mysql -- --with-mysql-dir=/usr/local --with-mysql-config=/usr/local/mysql/bin/mysql_config
@jls
jls / RoundedCorners
Created April 19, 2010 00:11
RoundedCorners.h
#import <Foundation/Foundation.h>
#import "QuartzCore/QuartzCore.h"
@interface RoundedCorners : NSObject {
}
+ (void) setView:(UIView *) view cornerRadius:(float) radius;
@end
sudo env ARCHFLAGS="-arch x86_64" gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config
@jls
jls / dot_bashrc
Created September 14, 2009 15:17
set ai
set ts=2
set bs=1
syntax enable
set shiftwidth=2
set shiftround
set expandtab
set smarttab
set pastetoggle=<F2>
set showmatch
Regex longFormat = new Regex(@"^15-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{4}$");
Regex shortFormat = new Regex(@"^5-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{4}$");
return (longFormat.IsMatch(str) || shortFormat.IsMatch(str));