Skip to content

Instantly share code, notes, and snippets.

View vocino's full-sized avatar

Vocino vocino

View GitHub Profile

a simple git branching model

This is a very simple git workflow. It (and variants) is in use by many people. I settled on it after using it very effectively at Athena. GitHub does something similar; Zach Holman mentioned it in this talk.

The gist

<?php
function adname() {
$adname = str_replace(' ', '', get_bloginfo ( 'name' ));
echo $adname;
}
?>
- @object.photos.each_with_index do |photo, i|
-if i == 0
*do stuff*
- elsif i == 1
*do more stuff*
- else
*do the rest of thes tuff*
RewriteCond %{HTTP_HOST} ^www\.(.+)$
RewriteRule ^(.*)$ http://%1$1 [R=301,L]
class Photo < ActiveRecord::Base
belongs_to :portfolio
has_attached_file :image, :styles => {:full => ["440x9999>", :jpg],
:medium => ["200x255#", :jpg],
:large => ["440x555#", :jpg]},
:processors => [:cropper],
:storage => :cloud_files,
:cloudfiles_credentials => "#{RAILS_ROOT}/config/rackspace_cloudfiles.yml"
NoMethodError in PhotosController#update
undefined method `read' for #<CloudFiles::StorageObject:0x103e96d40>
RAILS_ROOT: /Users/Travis/Development/folioly
Application Trace | Framework Trace | Full Trace
/Users/Travis/.gem/ruby/1.8/gems/paperclip-cloudfiles-2.3.1.1.5/lib/paperclip/attachment.rb:228:in `reprocess!'
/Users/Travis/Development/folioly/app/models/photo.rb:45:in `reprocess_image'
Request
.container {
margin-left: auto;
margin-right: auto;
width: 960px;
}
.col_1,
.col_2,
.col_3,
.col_4,
<style>
form dt {
clear:both;
width:33%;
float:left;
text-align:right;
}
form dd {
. .................,MMMM~...MMD8MM ...
. ...............MM... NMMM....MM
... .................M.......:M ...MM...
...................MM........:MMMMN .
....... =M ..........
.... . . . ..MM . .... ......
....... =MMMMMM7?~IZMMMMMM. ..........
.ZMMMMM:MMM.................MMM~NMMMMO..
MM...MMM.......................MMD...MM.
M..+MD...........................MM ..MO
.slide-bg{position:relative;}
.slide-lt{left:25px; position:absolute;}
.slide-rt{right:25px; position:absolute;}