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
| brad@brad-laptop:~ $ macirb | |
| irb(main):001:0> framework 'Cocoa' | |
| => true | |
| irb(main):002:0> app = NSApplication.sharedApplication | |
| => #<NSApplication:0x8003a8500> | |
| irb(main):003:0> status_bar = NSStatusBar.systemStatusBar | |
| => #<NSSystemStatusBar:0x8003b8ec0> | |
| irb(main):004:0> item = status_bar.statusItemWithLength(NSVariableStatusItemLength) | |
| => #<NSStatusItem:0x8003b7c00> | |
| irb(main):005:0> item.title = "Hello MacRuby!" |
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
| #include <iostream> | |
| #include <vector> | |
| using namespace std; | |
| class A; //Forward declaration | |
| class B{ | |
| public: | |
| B(string name, A& a):myA(a), name(name){ | |
| cout << "Works with pointer" << endl; |
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
| MestOMatic::Application.routes.draw do | |
| resources :projects do | |
| resources :deliverables | |
| end | |
| # The priority is based upon order of creation: | |
| # first created -> highest priority. | |
| # Sample of regular route: | |
| # match 'products/:id' => 'catalog#view' |
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
| GEM | |
| remote: http://rubygems.org/ | |
| specs: | |
| ZenTest (4.5.0) | |
| abstract (1.0.0) | |
| actionmailer (3.0.7) | |
| actionpack (= 3.0.7) | |
| mail (~> 2.2.15) | |
| actionpack (3.0.7) | |
| activemodel (= 3.0.7) |
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/ruby | |
| require 'rubygems' | |
| require "mechanize" | |
| require 'logger' | |
| def crawl_dkb(credentials) | |
| agent = Mechanize.new { |a| a.log = Logger.new("mech.log") } | |
| agent.user_agent_alias = 'Mac Safari' | |
| page = agent.get("https://banking.dkb.de/dkb/-?$javascript=disabled") | |
| login_form = page.form_with(:name => "login") |
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 'sinatra' | |
| require 'haml' | |
| # Session needs to be before Rack::OpenID | |
| use Rack::Session::Cookie | |
| require 'rack/openid' | |
| require 'gapps_openid' | |
| use Rack::OpenID |
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 'sinatra' | |
| require 'dm-core' | |
| require 'dm-migrations' | |
| require 'haml' | |
| DataMapper.setup(:default, 'sqlite3::memory:') | |
| class Message | |
| include DataMapper::Resource |
NewerOlder