Discover gists
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
desc "Show the date/time format strings defined and example output" | |
task :date_formats => :environment do | |
now = Time.now | |
[:to_date, :to_datetime, :to_time].each do |conv_meth| | |
obj = now.send(conv_meth) | |
puts obj.class.name | |
puts "=" * obj.class.name.length | |
name_and_fmts = obj.class::DATE_FORMATS.map { |k, v| [k, %Q('#{String === v ? v : '&proc'}')] } | |
max_name_size = name_and_fmts.map { |k, _| k.to_s.length }.max + 2 | |
max_fmt_size = name_and_fmts.map { |_, v| v.length }.max + 1 |
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
Hello, world! |
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
backend sproutcore { | |
set backend.host = "localhost"; | |
set backend.port = "4020"; | |
} | |
backend py { | |
set backend.host = "localhost"; | |
set backend.port = "8000"; | |
} | |
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
// ========================================================================== | |
// Ring.PhoneServerController | |
// ========================================================================== | |
require('core'); | |
/** @class | |
(Document Your View Here) |
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
[core] | |
editor = nano | |
pager = less | |
whitespace = trailing-space,space-before-tab,indent-with-non-tab | |
[color] | |
diff = auto | |
status = auto | |
branch = auto | |
interactive = auto |
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 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
<% view :contacts do %> | |
<div id="console"></div> | |
<h1>Contacts (<%= label_view :contacts_count, :outlet => true, :tag => :span, :bind => { :value => 'Ring.contactsController*content.count'} %>)</h1> | |
<% scroll_view :contacts_scroll, :outlet => true do %> | |
<%= list_view :contacts_list, :outlet => true, | |
:content_value_key => 'firstName', | |
:bind => { :content => 'Ring.contactsController.arrangedObjects'} | |
%> |
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
/* Default CSS for welcome page. Delete this styling and replace it with your own. */ | |
.ring_container { | |
position: absolute ; | |
top: 0px; | |
left: 0px; | |
right: 0px; | |
bottom: 0px; | |
} |
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
<% content_for('body') do %> | |
<%= container_view :ring_container, :bind => {:content => 'Ring.containerController*view'} %> | |
<% 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
// ========================================================================== | |
// Ring.Contact Fixtures | |
// ========================================================================== | |
require('core') ; | |
Ring.FIXTURES = Ring.FIXTURES.concat([ | |
// TODO: Add your data fixtures here. | |
// All fixture records must have a unique guid and a type matching the |