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
// change thematic's default nav to be category based instead of page based | |
// Create #access | |
// In the header div | |
function mytheme_access() { ?> | |
<div id="access"> | |
<div class="skip-link"><a href="#content" title="<?php _e('Skip navigation to the content', 'thematic'); ?>"><?php _e('Skip to content', 'thematic'); ?></a></div> | |
<!-- list categories instead, see args here: http://codex.wordpress.org/Template_Tags/wp_list_categories --> | |
<?php wp_list_categories('orderby=name&show_count=1&exclude=10'); ?> | |
</div><!-- #access --> |
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
# Are you ready to Tumblllllllllllllllllllllllllllllllle? | |
sudo gem install gemcutter | |
gem tumble |
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
# include this in application controller | |
module Authentication | |
protected | |
# Inclusion hook to make #current_user and #signed_in? | |
# available as ActionView helper methods. | |
def self.included(base) | |
base.send :helper_method, :current_user, :signed_in?, :authorized? if base.respond_to? :helper_method | |
end | |
# Returns true or false if the user is signed in. |
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
require 'rubygems' | |
require 'twitter' | |
h = Twitter::HTTPAuth.new 'username', 'password' | |
twitter = Twitter::Base.new(h) | |
source_user = 'username' | |
source_slug = 'list-name' | |
target_user = 'username' | |
target_slug = 'list-name' |
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 up .gitignore | |
file '.gitignore', <<-GITIGNORE | |
config/database.yml | |
log/*.log | |
tmp/**/* | |
.DS\_Store | |
.DS_Store | |
db/test.sqlite3 | |
db/development.sqlite3 | |
/log/*.pid |
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
def twitter_auto_link(text) | |
text = auto_link(text) | |
# autolink @ tags reference people in Tweets | |
text.gsub!(/(^|\s)(@)(\w+)/, '\1<a href="http://twitter.com/\3">\2\3</a>') | |
# autolink hash tags | |
text.gsub(/(^|\s)(#)(\w+)/, '\1<a href="http://search.twitter.com/search?q=%23\3">\2\3</a>') | |
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
# Set up Compass/Sass | |
require 'sass/plugin/rack' | |
require 'compass' | |
use Sass::Plugin::Rack | |
Compass.configuration do |config| | |
config.project_path = File.dirname(__FILE__) | |
config.sass_dir = "sass" | |
config.css_dir = "public/css" | |
end | |
Compass.configure_sass_plugin! |
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
<script src="http://www.buzzsprout.com/105/2916-episode-0-1-5-leah-culver-on-oauth-hurl-it-baconfile-and-more.js?player=small" type="text/javascript" charset="utf-8"></script> |
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
run "rm public/index.html" | |
generate(:rspec) | |
generate(:cucumber) | |
plugin 'resource_controller', :git => 'git://github.com/jamesgolick/resource_controller.git' | |
plugin 'flash-message-conductor', :git => 'git://github.com/planetargon/flash-message-conductor.git' | |
gem "formtastic" | |
gem "pickle" | |
gem "machinist" |
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
> db.testdots.save({foo: 'bar', tags: ['web2.0', 'mongofail']}) | |
> db.testdots.findOne(); | |
{ | |
"_id" : ObjectId("4bb7992356756e741e3574a1"), | |
"foo" : "bar", | |
"tags" : [ | |
"web2.0", | |
"mongofail" | |
] | |
} |
OlderNewer