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
| (in /Users/rob/work/gangaroo/gangaroo) | |
| AssociationsController | |
| on GET to index | |
| (FAILED - 1) | |
| on GET to show | |
| (FAILED - 2) | |
| on GET to new | |
| (FAILED - 3) | |
| on POST to create |
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
| unless params[:q].blank? | |
| clean_request_uri_for(params[:q]) | |
| @query = params[:q] | |
| else | |
| if params[:q] | |
| redirect_to request.path and return | |
| 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
| def index | |
| unless params[:q].blank? | |
| clean_request_uri_for(params[:q]) | |
| @query = params[:q] | |
| else | |
| if params[:q] | |
| redirect_to request.path and return | |
| 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
| code = params['code'] # Facebooks verification string | |
| begin | |
| access_token_hash = MiniFB.oauth_access_token(FB_APP_ID, facebook_oauth_url(@campaign), FB_SECRET, code) | |
| @facebook_access_token = access_token_hash["access_token"] | |
| # TODO: This is where you'd want to store the token in your database | |
| # but for now, we'll just keep it in the cookie so we don't need a database | |
| cookies[:facebook_access_token] = @facebook_access_token | |
| @facebook_user = MiniFB.get(@facebook_access_token, "me", :metadata=>true) | |
| @accounts = [{"id" => @facebook_user["id"], "name" => @facebook_user["name"], "kind" => "user"}] |
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
| dig www.lajollakayak.com | |
| ; <<>> DiG 9.6.0-APPLE-P2 <<>> www.lajollakayak.com | |
| ;; global options: +cmd | |
| ;; Got answer: | |
| ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 33163 | |
| ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0 | |
| ;; QUESTION SECTION: | |
| ;www.lajollakayak.com. IN A |
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 next_meeting(now=1.day.from_now) | |
| if Chronic.parse("1st thursday of this month", :context => :past, :now => now) | |
| return Chronic.parse('1st thursday of next month', :now => now) | |
| else | |
| return Chronic.parse("1st thursday of this month", :now => now) | |
| 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
| target = Chronic.parse('1st thursday this month') | |
| if Time.now > target | |
| return Chronic.parse('1st thursday of next month') | |
| else | |
| return target | |
| 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
| def permitted_wares(published = true, page = 1, per_page = 20, provider_name=nil) | |
| if self.is_admin? && provider_name.nil? | |
| Ware.all.paginate(:page => page, :per_page => per_page) | |
| else | |
| total_amount = 0 | |
| user_providers = provider_name.nil? ? self.providers : [provider_name] | |
| store = PrivateMarketplace.enabled? ? PrivateMarketplace.name : "depot-store" | |
| keys = user_providers.map { |provider| [provider, store] } | |
| if published |
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
| 2010-04-29 13:40 $ dig @ns2.mediatemple.net tc.rothschilddownes.com | |
| ; <<>> DiG 9.6.0-APPLE-P2 <<>> @ns2.mediatemple.net tc.rothschilddownes.com | |
| ; (1 server found) | |
| ;; global options: +cmd | |
| ;; Got answer: | |
| ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 3538 | |
| ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 2 | |
| ;; QUESTION SECTION: |
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 'fileutils' | |
| #File selection logic | |
| def run(command) | |
| puts command | |
| `#{command}` | |
| end | |
| old_file_name = "twitter-stencil.zip" | |
| new_file_name = "twitter-stencil" |