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 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
==> 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"] | |
} |
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 org.scala_tools.time.Imports._ | |
import org.scala_tools.time.Implicits._ | |
case class Event(id: String, startDate: LocalDateTime, action: String) | |
case class Events(events: List[Event], timeout: Int) { | |
val timeoutDt: LocalDateTime = new LocalDateTime().minusMinutes(timeout) | |
lazy val oldEvents = events.filter { (e: Event) => |
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
// | |
// A class does not need any reference to the `Mapper`. | |
// Here it is defined as a case class because it's convenient - no need for new and | |
// the compiler generates equals, hashCode, copy and extractor methods - but | |
// it can be a normal class. | |
// | |
case class Person( first:String, last:String, age:Int ) | |
// | |
// A record does not need to be a class companion but it is convenient |
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
#I would like to avoid having to explicitly clone the array. I want immutable collections. | |
ruby-1.8.7-p302 > segment = [ 192,168,20 ] | |
=> [192, 168, 20] | |
ruby-1.8.7-p302 > (180..185).map{ |i| segment.clone << i } | |
=> [[192, 168, 20, 180], [192, 168, 20, 181], [192, 168, 20, 182], [192, 168, 20, 183], [192, 168, 20, 184], [192, 168, 20, 185]] | |
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
ERROR 15:29:33,609 Uncaught exception in thread Thread[pool-1-thread-1,5,main] | |
java.lang.OutOfMemoryError: Java heap space | |
at org.apache.thrift.protocol.TBinaryProtocol.readStringBody(TBinaryProtocol.java:296) | |
at org.apache.thrift.protocol.TBinaryProtocol.readMessageBegin(TBinaryProtocol.java:203) | |
at org.apache.cassandra.thrift.Cassandra$Processor.process(Cassandra.java:1154) | |
at org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:167) | |
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) | |
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) | |
at java.lang.Thread.run(Thread.java:662) | |
Service exit with a return value of 100 |
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
//Usage: | |
//override def pomPostProcess(node: Node): Node = mcPom(moduleConfigurations)(super.pomPostProcess(node)) | |
trait McPom { self: DefaultProject => | |
import scala.xml._ | |
def mcPom(mcs: Set[ModuleConfiguration])(node: Node): Node = { | |
//make sure we have a trailing slash so we deduplicate URLs properly | |
def cleanUrl(url: String) = url match { | |
case null => "" |
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
federico@debian-fede:~/Workshop/tmp/boost-stage$ tree | |
. | |
`-- lib | |
|-- libboost_date_time-gcc43-mt-1_44.so -> libboost_date_time-gcc43-mt-1_44.so.1.44.0 | |
|-- libboost_date_time-gcc43-mt-1_44.so.1.44.0 | |
|-- libboost_date_time-gcc43-mt-d-1_44.so -> libboost_date_time-gcc43-mt-d-1_44.so.1.44.0 | |
|-- libboost_date_time-gcc43-mt-d-1_44.so.1.44.0 | |
|-- libboost_date_time-gcc43-mt-d.so -> libboost_date_time-gcc43-mt-d-1_44.so.1.44.0 | |
|-- libboost_date_time-gcc43-mt.so -> libboost_date_time-gcc43-mt-1_44.so.1.44.0 | |
|-- libboost_filesystem-gcc43-mt-1_44.so -> libboost_filesystem-gcc43-mt-1_44.so.1.44.0 |
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
case class ElectricCar(b: Battery) { def batteryLevel = b.filledPercentage } | |
case class GasolineCar(g: GasTank) { def gasLevel = g.filledPercentage } | |
case class Battery(filledPercentage: Int) { def fill: Battery = Battery(100) } | |
case class GasTank(filledPercentage: Int) { def fill: GasTank = GasTank(100) } | |
trait Fills[C] { | |
def fill(car: C): C |
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
Vagrant::Config.run do |config| | |
# All Vagrant configuration is done here. The most common configuration | |
# options are documented and commented below. For a complete reference, | |
# please see the online documentation at vagrantup.com. | |
# Every Vagrant virtual environment requires a box to build off of. | |
config.vm.box = "lenny32" | |
config.ssh.private_key_path="/home/federico/.ssh/id_rsa" |