- A designer free to choose will always choose Helvetica.
- What do I think of HTML5? I think it would be a very good idea.
- If you do not understand yourself, how can you expect to understand your users?
- Design is its own reward.
- To me, being a designer doesn't mean knowing design; it means taking pleasure in designing.
- Practical IE development and marketing consists of ignoring ever other browser.
- Poor design is simply an opportunity to re-design.
- A good designer creates form from function, function from form, thought from ideas.
- Java paralyzes the mind and leaves one so unable to think like a programmer; so that by the time these kids are out of school their foundation is hopelessly ruined
- When the problem is complexity, the cure might just be ruby.
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
## | |
# Authentication Plugin via omniauth on Padrino | |
# prereqs: | |
# http://github.com/intridea/omniauth/ | |
# http://github.com/achiu/omniauth/ working fork | |
# | |
module OmniAuthInitializer | |
def self.registered(app) | |
require 'omniauth' | |
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
def drawRoundedRec(offset, width, height, radius, color = nil) | |
x = offset['left'] | |
y = offset['top'] | |
ry = y + height | |
rx = x + width | |
str = <<-eos | |
var idMk = charIDToTypeID( "Mk " ); | |
var desc77 = new ActionDescriptor(); | |
var idnull = charIDToTypeID( "null" ); | |
var ref42 = new ActionReference(); |
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 documentation see move_layer_to_group() | |
def move_layer_to_group(layer_name, group) | |
doc = @app.current_document | |
dest = find_layer_set(doc.layer_sets.to_a, group) | |
src = find_layer(doc.art_layers.to_a, doc.layer_sets.to_a, layer_name) | |
if src[:depth] > 0 | |
src[:depth] = src[:depth] - 1 | |
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
class String | |
# Truncates a string | |
def truncate(length = 30, end_string = '…') | |
return self if self == nil | |
words = self.split() | |
words[0..(length-1)].join(' ') + (words.length > length ? end_string : '') | |
end | |
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
class AllButPattern | |
@@match = Struct.new(:captures) | |
def initialize(app, *exceptions) | |
@controller = app.current_controller | |
@app = app | |
@exceptions = exceptions | |
@captures = @@match.new([]) | |
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
TestingRoutes.controllers :main do | |
before(:index) do | |
@test = 'cow' | |
puts 'before filter hit?' | |
end | |
get :index, :map => "/example" do | |
puts @test | |
"Hello world!" |
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
class Everything | |
@@match = Struct.new(:captures) | |
def initialize(*exceptions) | |
@exceptions = exceptions | |
@captures = @@match.new([]) | |
end | |
def match(str) | |
@captures |
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
TestingRoutes.controllers :main do | |
before(:index) { @test = 'before'} | |
get :index, :map => '/test' do | |
@test | |
end | |
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
should "be able to filter based on a symbol or path in a controller" do | |
mock_app do | |
controllers :foo do | |
before(:index, '/foo/main') { @test = 'before'} | |
get :index do | |
@test | |
end | |
get :main do | |
@test | |
end |
OlderNewer