This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set ai | |
set ts=2 | |
set bs=1 | |
syntax enable | |
set shiftwidth=2 | |
set shiftround | |
set expandtab | |
set smarttab | |
set pastetoggle=<F2> | |
set showmatch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo env ARCHFLAGS="-arch x86_64" gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <Foundation/Foundation.h> | |
#import "QuartzCore/QuartzCore.h" | |
@interface RoundedCorners : NSObject { | |
} | |
+ (void) setView:(UIView *) view cornerRadius:(float) radius; | |
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /usr/lib/ruby/gems/1.8/gems/zencoder-2.1.13/lib/zencoder/http.rb | |
require 'openssl' | |
OpenSSL::SSL::VERIFY_PEER = OpenSSL::SSL::VERIFY_NONE | |
# DAMMIT! Or you can just read the docs and figure out you can do this... | |
Zencoder::HTTP.default_options.merge!(:skip_ssl_verify => true) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<% @channel.articles.each do |article| %> | |
# all values of the article are available here | |
<% end -%> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var app = $.sammy(function(){ | |
this.element_selector = '#content'; | |
this.get(/\#!\/(.*)/, function(context){ | |
this.partial('/' + this.params['splat']); | |
}); | |
}); | |
$(document).ready(function(){ | |
app.run('#!/'); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var app = $.sammy(function(){ | |
this.element_selector = '#content'; | |
this.get(/\#!\/(.*)/, function(context){ | |
this.partial('/' + this.params['splat']); | |
}); | |
}); | |
$(document).ready(function(){ | |
app.run('#!/'); | |
// We will setup all of our links in the |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
This following lines should be placed at the location on your page where you would | |
like the punndit player to appear. | |
The data-punn-id attribute should be any value that will uniquely | |
identify the video you are attaching the punndit bar to. | |
For example if you were attaching the bar to a YouTube video | |
data-punn-id could be set to the URL of the YouTube video. | |
--> |
OlderNewer