We need to describe the overall goal we're trying to achieve with DM2, break it up into manageable small steps and come up with a realistic timeframe / amount of hours to make it happen.
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
| # OMG you can use delegate in an rspec example. | |
| # Make sure you have the active support delegate helpers included | |
| # (You'll have this if you are using rails) | |
| describe "Something" do | |
| delegate(:this, :that, :the_other, :to => :object) | |
| describe "as it is" do | |
| let(:object) { Be.something } | |
| it "delegates properly" do |
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
| # coding: utf-8 | |
| require 'sinatra' | |
| set server: 'thin', connections: [] | |
| get '/' do | |
| halt erb(:login) unless params[:user] | |
| erb :chat, locals: { user: params[:user].gsub(/\W/, '') } | |
| end | |
| get '/stream', provides: 'text/event-stream' do |
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> | |
| <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> | |
| <script src="jquery.ketchup.all.min.js" type="text/javascript"></script> | |
| </head> | |
| <body> | |
| <div id="email"> | |
| <span>Enter your email to sign up</span> | |
| <form action="/subscribe.php" id="invite" method="POST"> |
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
| jQuery(function($) { | |
| $('form[data-async]').live('submit', function(event) { | |
| var $form = $(this); | |
| var $target = $($form.attr('data-target')); | |
| $.ajax({ | |
| type: $form.attr('method'), | |
| url: $form.attr('action'), | |
| data: $form.serialize(), |
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
| # Sublime's HTML reindenting is currently pretty bad. And Tidy and xmllint | |
| # change my code in ways I don't really like or need. I just need the thing | |
| # reindented sanely. Emacs did that pretty well. | |
| # | |
| # One thing led to another. A few drinks later and now I'm using Emacs to | |
| # reindent HTML from within Sublime. | |
| # | |
| # Save the contents of this file as ohmygodemacs.py in your User directory. | |
| # Then save the contents of the following docstring as ohmygodemacs.elsip in your | |
| # User directory |
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/env ruby | |
| $: << 'lib' | |
| require 'your_app' | |
| Joy::Runner.run(YourApp.application) |
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
| [:join, | |
| [:join, | |
| [:base, | |
| "people", | |
| [[:id, Veritas::Attribute::Integer], [:name, Veritas::Attribute::String]]], | |
| [:restrict, | |
| [:base, | |
| "people", | |
| [[:id, Veritas::Attribute::Integer], [:name, Veritas::Attribute::String]]], | |
| :true]], |
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
| repository_names: | |
| - datamapper/dm-session | |
| - datamapper/dm-mapper | |
| - datamapper/dm-relation-graph | |
| - datamapper/devtools | |
| - dkubb/adamantium | |
| - dkubb/ice_nine | |
| - dkubb/equalizer | |
| - dkubb/descendants_tracker | |
| - dkubb/abstract_class |
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
| # A simple example of creating a UIView with a UICollectionView as a subview | |
| # in RubyMotion using Teacup for styling | |
| # | |
| # Your controller will need to set the stylesheet: stylesheet :example | |
| # and create this view like so: subview Example, :my_example_view | |
| class Example < UIView | |
| CELL_IDENTIFIER = 'example_cell' | |
| def initWithFrame(frame) |
OlderNewer