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
package m | |
import shapeless.HMap | |
object leData { | |
object Name | |
object Age | |
object Address | |
object Street |
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
protected [helpers] val singleSession = databaseConnection.createSession | |
val noDataSource = new JdbcDataSource { | |
def createConnection(): Connection = throw new RuntimeException("Tried to allocate another connection in test mode. This is an issue because the test database assumes that only one database connection in used. RolledbackDatabase needs to be improved.") | |
def close(): Unit = () | |
} | |
// backend.BaseSession | |
class DelegatingSession(session: backend.SessionDef) extends backend.SessionDef { | |
override def database = session.database |
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
From 57dc6a58baeed762981d1a28c0855e651c46982a Mon Sep 17 00:00:00 2001 | |
From: Tim Harper <timcharper@gmail.com> | |
Date: Sat, 4 Oct 2008 10:05:49 -0600 | |
Subject: [PATCH] add a sensible suffix to the log path, to get rid of all the of tiny unix epoch suffixed files | |
--- | |
config/environments/production.rb | 2 +- | |
1 files changed, 1 insertions(+), 1 deletions(-) | |
diff --git a/config/environments/production.rb b/config/environments/production.rb |
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 'tabset_helpers.rb' | |
ActionView::Base.send(:include, TabsetHelpers) |
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
#!/bin/bash | |
branch_name=$(sed 's|ref: refs/heads/||' .git/HEAD) | |
remote_name=${1:-origin} | |
remote_branch=${2:-$branch_name} | |
if [ "$branch_name" == "$(cat .git/HEAD)" ]; then | |
echo "You're not on a branch" | |
exit 1 | |
fi | |
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
cat ruby-enterprise.spec | |
Summary: Ruby Enterprise Edition | |
Name: ruby-enterprise | |
Version: 1.8.6 | |
Release: 20081205 | |
License: GPL | |
Group: Applications/System | |
Source: ruby-enterprise-%{version}-%{release}.tar.gz | |
BuildRoot: /var/tmp/%{name}-%{version}-%{release} | |
%description |
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
# put on the server | |
# put in /etc/puppet/custom/plugins/facter/custom_facts.rb | |
require 'yaml' | |
if File.exist?("/etc/puppet/custom_facts.yml") | |
YAML.load_file("/etc/puppet/custom_facts.yml").each do |key, value| | |
Facter.add(key.to_sym) do | |
setcode { value } | |
end | |
end |
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
html = <<-EOF | |
<html> | |
<body> | |
<table> | |
<tr> | |
<td> | |
One | |
<table><tr><td>Nested Cell #1</td></tr></table> | |
</td> | |
</tr> |
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
html = <<-EOF | |
<html> | |
<body> | |
<table> | |
<tr> | |
<td> | |
One | |
<table><tr><td>Nested Cell</td></tr></table> | |
</td> | |
</tr> |
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
top_left = new GLatLng(point.lat() - radius, point.lng() - radius), | |
bottom_right = new GLatLng(point.lat() + radius, point.lng() + radius) | |
this.rectangle = new GRectangle( | |
this.map, | |
top_left, | |
bottom_right, | |
{ | |
line_color: (this.kind == "home") ? "#3355ff" : "#ff5533", | |
fill_color: (this.kind == "home") ? "#335599" : "#995533", |