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
# So I wrote this cute little currency view formatting helper. Enjoy. | |
# | |
# (On a side note, shortly after writing this, I decided to use the awesome | |
# Money gem in my project, rendering most of this code obsolete.) | |
# | |
def currency(v, options = {}) | |
options = { | |
:symbol => "€", | |
:separator => ".", | |
:decimal_separator => ",", |
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
for ruby in $HOME/.rbfu/rubies/*; do rbfu @${ruby##*/} bundle && bundle exec rake ; done |
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
run Freddie do | |
layout 'application.html.haml' | |
# Serve some asset files | |
# | |
path('application-:timestamp.css') { stylesheet 'application.scss' } | |
path('application-:timestamp.js') { javascript 'application.js' } | |
# Built-in OmniAuth support | |
# |
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
app = Freddie do | |
path 'one' do | |
render "1" | |
path 'two' do | |
render "2" | |
path 'three' do | |
render "3!" | |
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
run Freddie(:redirect, '/events') do | |
layout 'application' | |
child 'events', Freddie(:resource, Event) # full Rails-style RESTful web resource. :) | |
child 'application.css', Freddie(:stylesheet, 'application.css.scss') | |
child 'application.js', Freddie(:static, 'views/application.js', content_type: 'text/javascript') | |
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
require 'freddie' | |
class Event | |
include Mongoid::Document | |
# ... | |
end | |
class App < Freddie::App | |
resource :events do | |
permit do |user| |
- Follow your dreams (or don't. Whatever.)
- Work sane hours (or don't. Whatever.)
- Separate work from life (or don't. Whatever.)
- Build a fun side project (or don't. Whatever.)
- Always be open to new ideas (or don't. Whatever.)
- Learn how to manage your money (or don't. Whatever.)
Whatever it is that you choose to do, follow these two simple rules:
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
@import 'schnitzelstyle'; | |
@include grid; | |
@include buttons; | |
/* variables! */ | |
$font: 15px "Helvetica Neue",Arial,Helvetica,sans-serif; | |
$font-title: 15px Verdana,Arial,Helvetica,sans-serif; | |
$font-monospaced: 13px Menlo,Monaco,"Lucida Console",monospace; | |
$color-background: #fff; |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title> | |
{% if single_post %}{{ single_post.title }} |{% endif %} | |
{{ blog.title }} | |
</title> | |
<meta content='text/html; charset=UTF-8' http-equiv='content-type' /> | |
<meta content='width=device-width, initial-scale=1.0' name='viewport' /> | |
<link href='/assets/schnitzelpress.1332747656.css' media='screen' rel='stylesheet' type='text/css' /> |