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 'spec_helper' | |
describe ApplicationController do | |
controller do | |
def public; head :ok; end | |
end | |
it "should be successful" do | |
get :public | |
response.should be_ok |
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
import sbt._ | |
class AlgorithmDesignManualProject(info: ProjectInfo) extends DefaultProject(info) { | |
val specs = "org.scala-tools.testing" % "specs" % "1.6.2.1" % "test" | |
} | |
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
bsmith bundler (1-0-stable) $ grep -n -r "no-cache" ./ | |
./lib/bundler/cli.rb:139: method_option "no-cache", :type => :boolean, :banner => | |
bsmith bundler (1-0-stable) $ grep -n -r "no_cache" ./ | |
bsmith bundler (1-0-stable) $ | |
bsmith bundler (1-0-stable) $ git log --oneline | grep "no-cache" | |
4601dde Add install option --no-cache to prevent updating the cache. | |
e4287d2 Add install option --no-cache to prevent updating the cache. | |
bsmith bundler (1-0-stable) $ git show 4601dde | |
commit 4601ddeaaddf2671ecc2baa24f49d9e59e7fcfcb |
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
RegexKit.framework/Headers/RKRegex.h:79:38 Pointer to function type 'NSString *' may not be 'restrict' qualified | |
// The `define restrict` is there because XCode doesn't want to compile | |
// RegexKit with the restrict qualifiers. | |
#define restrict | |
#import <RegexKit/RegexKit.h> |
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
!!! 5 | |
%html{:lang => 'en'} | |
%head | |
%meta{:charset => 'utf-8'} | |
%title Application | |
%link{:href => 'http://yui.yahooapis.com/2.8.1/build/reset/reset-min.css', :rel => 'stylesheet', :type => 'text/css'} | |
%script{:src => 'http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js'} | |
%body | |
= yield |
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 "nokogiri" | |
doc = Nokogiri.XML(IO.read('products.xml')) | |
@products = doc.xpath("//products/product").map do |p| | |
{ :product_id => p.css("product_id").text, :product_url => p.css("product_url").text } | |
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
#include <stdio.h> | |
int main() { | |
int firstInt, secondInt, firstIntFactors[20], secondIntFactors[20]; | |
int firstIntMaxIndex = -1, secondIntMaxIndex = -1; | |
int commonFactors[20], gcd, factor, i, j; | |
printf("Two integers: "); | |
scanf("%d %d", &int_1, &int_2); |
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
// Track user clicks on specified links | |
// | |
$("a.track").click(function(event) { | |
var link = $(this).attr("href"); | |
var category = $(this).attr("rel"); | |
if(!category) { | |
category = "General"; | |
} | |
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
# Rails application template for Rails 3 + Postgres + Git + haml + JQuery + Rspec + Cucumber + Capybara + FactoryGirl | |
# by Brian Smith <[email protected]> | |
# Create a default README | |
file "README.md", <<-EOF | |
#{app_name} | |
#{"=" * app_name.length} | |
TODO: description |
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
sinatra --version 1.0 | |
mustache --version 0.10.0 |