These instructions install ruby and rubygems from source, not from RPMs. For instructions on installing from RPMs, look at something like http://wiki.opscode.com/display/chef/Installation+on+RHEL+and+CentOS+5+with+RPMs or http://mykestubbs.com/blog/2010/03/chef-installation-on-centos-54.html
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
/* Recursively compose an arbitrarily long list of functions into a single function. */ | |
function compose() { | |
/* One function, nothing to compose. */ | |
if(arguments.length == 1) | |
return arguments[0]; | |
else { | |
/* Compose the head with the immediate successor. */ | |
var args = arguments; | |
/* The composition: f(g(x)) */ | |
var f = [function() { |
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
public class Foo { | |
public String theCurrentWay(SomeData data) { | |
if (data.getFoo() != null) { | |
if (data.getFoo().getBar() != null) { | |
if (data.getBlah() != null) { | |
return data.getFoo().getBar().getBlah().toString(); | |
} | |
} | |
} | |
return null; |
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
config.action_controller.asset_host = Proc.new do |source, request| | |
non_ssl_host = "http://asset#{source.hash % 4}.backpackit.com" | |
ssl_host = "https://asset1.backpackit.com" | |
if request.ssl? | |
case | |
when source =~ /\.js$/ | |
ssl_host | |
when request.headers["USER_AGENT"] =~ /(Safari)/ | |
non_ssl_host |
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
// A simple trait: | |
trait CascadingActions { | |
implicit def tToActioneerT[T](t: T) = Actioneer(t) | |
case class Actioneer[T](tee: T) { | |
def withAction(action: (T => Unit)): T = | |
withActions(action) | |
def withActions(actions: (T => Unit)*): T = { |
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
// Welcome to Scala version 2.7.5.final (Java HotSpot(TM) 64-Bit Server VM, Java 1.6.0_20). | |
// Type in expressions to have them evaluated. | |
// Type :help for more information. | |
scala> import dispatch._ | |
import dispatch._ | |
scala> import oauth._ | |
import oauth._ |
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
(ns com.freiheit.clojure.appengine.appengine-local | |
(:use | |
[compojure.http routes servlet helpers] | |
clojure.contrib.test-is | |
compojure.server.jetty | |
[clojure.contrib def str-utils duck-streams]) | |
(:require | |
[clojure.contrib.logging :as log]) | |
(:import | |
[com.google.appengine.api.labs.taskqueue.dev LocalTaskQueue] |
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
(defproject compojureongae "0.2.0" | |
:description "Example app for deployoing Compojure on Google App Engine" | |
:namespaces [compojureongae.core] | |
:dependencies [[compojure "0.4.0-RC3"] | |
[ring/ring-servlet "0.2.1"] | |
[hiccup "0.2.4"] | |
[appengine "0.2"] | |
[com.google.appengine/appengine-api-1.0-sdk "1.3.4"] | |
[com.google.appengine/appengine-api-labs "1.3.4"]] | |
:dev-dependencies [[swank-clojure "1.2.0"] |
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
class A | |
class A2 extends A | |
class B | |
trait M[X] | |
// | |
// Upper Type Bound | |
// | |
def upperTypeBound[AA <: A](x: AA): A = x |
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
==> manifest.json <== | |
{ | |
"name": "GitHub Tweaks", | |
"version": "0.1", | |
"description": "Style tweaks for github pages", | |
"content_scripts": [ | |
{ | |
"matches": ["https://github.com/*", "https://gist.github.com/*"], | |
"css": ["tweaks.css"] | |
} |
OlderNewer