(Several of these git examples have been extracted from the book 'Pragmatic guide to GIT' of Travis Swicegood )
git config --global user.name "Fernando Guillen"
git config --global user.email "[email protected]"
cd /develop/myrepo
| MAP01, Steps: 8 | |
| --------- | |
| | #| | |
| | * *.| | |
| | .| | |
| | ....| | |
| ----U---- | |
| MAP02, Steps: 17 | |
| ------------- |
| require 'soap/wsdlDriver' | |
| class SMSSender | |
| def self.send( phone, text ) | |
| Rails.logger.info( "sending sms [#{phone}]: '#{text}'") | |
| wsdl = 'http://www.ovh.com/soapi/soapi-re-1.18.wsdl' | |
| soapi = SOAP::WSDLDriverFactory.new( wsdl ).create_rpc_driver | |
| session = |
| require 'rubygems' | |
| require 'test/unit' | |
| require 'mocha' | |
| class MyMochaTest < Test::Unit::TestCase | |
| def test_exceptation | |
| string = 'wadus string' | |
| string.expects( :downcase ) | |
| assert true | |
| end |
| # Not work very well but enough for prototiping | |
| # TODO: not very clear url expression | |
| URL_REGEX = /([\S]+\.[\S]+)/ | |
| def self.activate_links( text ) | |
| text.gsub!( URL_REGEX ) do |url| | |
| clean_url = url.gsub( /http:\/\//i, '' ) | |
| "<a href=\"http://#{clean_url}\">#{url}</a>" | |
| end | |
(Several of these git examples have been extracted from the book 'Pragmatic guide to GIT' of Travis Swicegood )
git config --global user.name "Fernando Guillen"
git config --global user.email "[email protected]"
cd /develop/myrepo
| require 'rubygems' | |
| require 'test/unit' | |
| require 'mustache' | |
| class MustacheNestedTest < Test::Unit::TestCase | |
| def test_nested_section_with_same_member_name | |
| template = <<template | |
| {{#mothers}} | |
| {{name}}: {{#children}}{{name}}({{name}}) {{/children}}| | |
| {{/mothers}} |
| From 4b8ac1aa47900037d31896e3564568510b3fd879 Mon Sep 17 00:00:00 2001 | |
| From: Fernando Guillen <[email protected]> | |
| Date: Tue, 17 Aug 2010 19:07:55 +0200 | |
| Subject: [PATCH] Alert if trying to create an empty Quote | |
| --- | |
| public/stylesheets/screen.css | 11 ++++++++++- | |
| quotes.rb | 31 +++++++++++++++++++++++++++---- | |
| spec/adding_quotes_spec.rb | 17 +++++++++++++++++ | |
| spec/amending_quotes_spec.rb | 17 +++++++++++++++++ |
| # application_controller.rb | |
| before_filter :set_locale | |
| private | |
| def set_locale | |
| new_locale = params[:locale] || cookies[:locale] || extract_locale_from_accept_language_header || I18n.default_locale | |
| if I18n.available_locales.include?( new_locale.to_sym ) | |
| I18n.locale = new_locale |
| God::Contacts::Email.defaults do |d| | |
| d.from_email = '[email protected]' | |
| d.delivery_method = :sendmail | |
| end | |
| God.contact(:email) do |c| | |
| c.name = 'fguillen' | |
| c.group = 'admins' | |
| c.to_email = '[email protected]' | |
| end |
| A backup of http://sites.google.com/site/redcodenl/creating-shazam-in-java-1 just in case | |
| Why is this necessary? Read http://sites.google.com/site/redcodenl/patent-infringement | |
| Please fork, tweet about, etc. | |
| ---- | |
| Creating Shazam in Java | |
| A couple of days ago I encountered this article: How Shazam Works | |
| This got me interested in how a program like Shazam works… And more importantly, how hard is it to program something similar in Java? |