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 'thor' | |
module Gazette | |
class Application < Thor | |
desc "init", "Creates a new git managed blog in the current working directory" | |
def init | |
Application::Init.run | |
end # init | |
desc "post", "Post a new blog article" |
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 'thor' | |
module Gazette | |
class Application < Thor | |
desc "init", "Creates a new git managed blog in the current working directory" | |
def init | |
Application::Init.run | |
end # init | |
desc "post", "Post a new blog article" |
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 'thor' | |
module Gazette | |
class Application < Thor | |
desc "init", "Creates a new git managed blog in the current working directory" | |
def init | |
Application::Init.run | |
end # init | |
desc "post", "Post a new blog article" |
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/bin/env ruby | |
$: << File.join(File.dirname(__FILE__), "..", "lib", "project") | |
$: << File.join(File.dirname(__FILE__), "..", "lib", "project", "web") |
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
%w( rack sinatra haml sass ).each { |f| require(f) } | |
get '/' do | |
@listings = Listing.all | |
haml :index | |
end | |
get '/style' do | |
header 'Content-Type' => 'text/css; charset=utf-8' | |
sass :style |
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
## development | |
== Sinatra has taken the stage on port 4567 for development with backup by Rack::Handler::Mongrel | |
127.0.0.1 - - [22/Jul/2008 16:49:56] "GET / HTTP/1.1" 404 660 0.0031 | |
127.0.0.1 - - [22/Jul/2008 16:49:56] "GET /sinatra_custom_images/404.png HTTP/1.1" 200 23305 0.0008 | |
## production | |
== Sinatra has taken the stage on port 4567 for production with backup by Rack::Handler::Mongrel | |
127.0.0.1 - - [22/Jul/2008 16:50:35] "GET / HTTP/1.1" 200 2 0.0038 | |
127.0.0.1 - - [22/Jul/2008 16:50:35] "GET /favicon.ico HTTP/1.1" 404 18 0.0002 | |
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 is an example for the global screenrc file. | |
# You may want to install this file as /usr/local/etc/screenrc. | |
# Check config.h for the exact location. | |
# | |
# Flaws of termcap and standard settings are done here. | |
# | |
#startup_message off | |
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
class JournalEntry | |
include DataMapper::Resource | |
property :id, Serial | |
property :summary, Text, :lazy => true | |
belongs_to :user | |
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
$(document).ready(function() { | |
if (String(window.location).match(/#/i)) { | |
matches = String(window.location).match(/#(.*)/) | |
$('#contents').load(matches[1] + '.html #container #contents *'); | |
} | |
$('ul li').find('a').each(function(i, link) { | |
$(this).click(function(i, a) { | |
var uri = $(this).attr('href'); | |
$('#contents').empty(); |
OlderNewer