This file contains hidden or 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/bin/ruby -W0 | |
=begin | |
Quick and dirty way to tweet the currently active | |
Safari tab (title + shortened URL). Hashtags get | |
passed in as parameters (the hash sign gets added | |
by the script, so don't do it yourself). | |
Adapt to your needs! | |
=end |
This file contains hidden or 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
# The simplest thing that could possibly work. | |
class Attachment < ActiveRecord::Base | |
before_create :store_metadata | |
after_create :store_file | |
# Virtual attribute that stores the uploaded tempfile | |
attr_accessor :uploaded_file | |
private | |
This file contains hidden or 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
Let's make a list of Sinatra-based apps! | |
Apps: | |
- http://github.com/cschneid/irclogger "Sinatra based irclogger.com" | |
- http://github.com/rtomayko/wink "minimalist blogging engine" | |
- http://github.com/foca/integrity "The easy and fun Continuous Integration server" | |
- http://github.com/sr/git-wiki "git-powered wiki" | |
- http://github.com/entp/seinfeld "Seinfeld-inspired productivity calendar to track your public github commits." | |
- http://github.com/karmi/marley "Marley, the blog engine without <textareas>." | |
- http://github.com/ichverstehe/gaze "Serve up your Markdown files with this tiny Sinatra app!" |
This file contains hidden or 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
# iniziamo creando una nuova applicazione Rails | |
rails silly_blog | |
cd silly_blog | |
# portiamola sotto version control con Git | |
git init | |
git add . | |
git commit -a -m "first commit" | |
# siamo nel "master" branch |
This file contains hidden or 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
# Generations | |
%w( | |
rubygems dm-core | |
haml dm-aggregates | |
sinatra dm-is-paginated | |
uv dm-is-slugged | |
ostruct dm-tags | |
).each {|n| require(n)} | |
configure do |