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
require 'rubygems' | |
require 'scrubyt' | |
Scrubyt.logger = Scrubyt::Logger.new | |
market_data = Scrubyt::Extractor.define do | |
fetch 'http://Salesforce.com/' | |
contents "/html/body" | |
end | |
puts market_data.to_xml | |
market_data = Scrubyt::Extractor.define do | |
fetch 'http://www.salesforce.com/products/sales-force-automation/sales-management/' |
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
# url has been changed for privacy reasons | |
upstream site.ca { | |
server 127.0.0.1:5000; | |
server 127.0.0.1:5001; | |
server 127.0.0.1:5002; | |
} | |
server { | |
listen 80; | |
server_name www.site.ca; |
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
[jar] Warning: com\xruby\runtime\lang\RhoSupport$3.class modified in the f | |
uture. | |
[jar] Warning: com\xruby\runtime\lang\RhoSupport.class modified in the fut | |
ure. | |
[jar] Warning: com\xruby\runtime\lang\RubyBinding.class modified in the fu | |
ture. | |
[jar] Warning: com\xruby\runtime\lang\RubyClass_Methods$1.class modified i | |
n the future. | |
[jar] Warning: com\xruby\runtime\lang\RubyClass_Methods$2.class modified i |
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
(require 'swank.swank) | |
(swank.swank/ignore-protocol-version "2009-08-21") | |
(swank.swank/start-server "/var/folders/Zr/Zr7HlWJOH6u70-SiHGLqWE+++TI/-Tmp-/slime.2838" :encoding "iso-latin-1-unix") | |
Clojure 1.0.0--SNAPSHOT | |
user=> (require 'swank.swank) | |
java.io.FileNotFoundException: Could not locate swank/swank__init.class or swank/swank.clj on classpath: (NO_SOURCE_FILE:0) | |
User=> |
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
(add-to-list 'load-path "~/.emacs.d/vendor/clojure-mode") | |
(autoload 'clojure-mode "clojure-mode" "A major mode for Clojure" t) | |
(add-to-list 'auto-mode-alist '("\\.clj$" . clojure-mode)) | |
;; Slime | |
(add-to-list 'load-path "~/.emacs.d/vendor/slime") | |
(require 'slime) | |
(slime-setup) | |
(add-to-list 'load-path "~/.emacs.d/vendor/swank-clojure") |
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
dan-mcgradys-macbook-2 ~/clojure/clj-apache-http: ant -Dclojure.jar="~/Library/Clojure/lib/clojure.jar" -Dclojure.contrib.jar="~/Library/Clojure/lib/clojure-contrib.jar | |
> " | |
Buildfile: build.xml | |
init: | |
[mkdir] Created dir: /Users/dmix/clojure/clj-apache-http/classes | |
[mkdir] Created dir: /Users/dmix/clojure/clj-apache-http/deploy | |
compile_clojure: |
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
Exception in thread "main" java.lang.NoSuchMethodError: clojure.lang.Namespace.importClass(Ljava/lang/Class;)Ljava/lang/Class; (twitter.clj:0) | |
at clojure.lang.Compiler.eval(Compiler.java:4543) | |
at clojure.lang.Compiler.load(Compiler.java:4857) | |
at clojure.lang.Compiler.loadFile(Compiler.java:4824) | |
at clojure.main$load_script__5833.invoke(main.clj:206) | |
at clojure.main$init_opt__5836.invoke(main.clj:211) | |
at clojure.main$initialize__5846.invoke(main.clj:239) | |
at clojure.main$null_opt__5868.invoke(main.clj:264) | |
at clojure.main$legacy_script__5883.invoke(main.clj:295) | |
at clojure.lang.Var.invoke(Var.java:346) |
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
def init_nav | |
# form: { :section => [ [ :pageA, :pageB ], :option1, :option2 ] } | |
@nav = [ | |
{ :company => [ [ :who_we_are, :clients, :careers ] ] }, | |
{ :approach => [ [ :methodology, :technologies ], :testimonials ] }, | |
{ :solutions => [ [ :business_solutions, :product_development, :managed_hosting ], :testimonials ] }, | |
{ :labs => [ [ :projects, :open_source ] ] }, | |
{ :contact => [ [ :contact_us ] ] } | |
] | |
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
#live_validations_controller.rb | |
class LiveValidationsController < ApplicationController | |
def validate_username | |
if params[:username].length > 3 | |
@user = User.find_by_username(params[:username]) | |
if @user.nil? | |
@message = "<img src='/images/accept.png' alt='Valid Username'/>" | |
else | |
@message = "<img src='/images/cross.png' alt='Invalid Username' /> Name taken" |
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
<!-- _message.html.erb --> | |
<%= @message %> |
OlderNewer