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 'sinatra' | |
require 'fileutils' | |
# upload with: | |
# curl -v -F "data=@/path/to/filename" http://localhost:4567/user/filename | |
post '/:name/:filename' do | |
userdir = File.join("files", params[:name]) |
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 http://geospatial.nomad-labs.com/2006/12/24/postgis-template-database/ | |
-- $ sudo su postgres | |
-- $ psql template1 | |
\c template1 | |
CREATE DATABASE template_postgis WITH template = template1; | |
-- set the 'datistemplate' record in the 'pg_database' table for | |
-- 'template_postgis' to TRUE indicating its a template | |
UPDATE pg_database SET datistemplate = TRUE WHERE datname = 'template_postgis'; |
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/sh | |
# | |
# redis - this script starts and stops the redis-server daemon | |
# | |
# chkconfig: - 85 15 | |
# description: Redis is a persistent key-value database | |
# processname: redis-server | |
# config: /etc/redis/redis.conf | |
# config: /etc/sysconfig/redis | |
# pidfile: /var/run/redis.pid |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>org.heavyside.redis</string> | |
<key>ProgramArguments</key> | |
<array> | |
<string>/usr/local/bin/redis-server</string> | |
<string>/usr/local/etc/redis.conf</string> |
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 geotools.shape-viewer | |
(:import [org.geotools.data CachingFeatureSource FeatureSource FileDataStore FileDataStoreFinder]) | |
(:import [org.geotools.map DefaultMapContext MapContext]) | |
(:import [org.geotools.swing JMapFrame]) | |
(:import [org.geotools.swing.data JFileDataStoreChooser])) | |
(defn show-shapefile | |
"Prompts the user for a shapefile and displays its content" | |
[] | |
(if-let [shapefile (JFileDataStoreChooser/showOpenFile "shp" nil)] |
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 geotools-quickstart "1.0.0-SNAPSHOT" | |
:description "FIXME: write" | |
:repositories {"osgeo-geotools" "http://download.osgeo.org/webdav/geotools"} | |
:dependencies [[org.clojure/clojure "1.1.0"] | |
[org.clojure/clojure-contrib "1.1.0"] | |
[org.geotools/gt-main "2.6.4"] | |
[org.geotools/gt-shapefile "2.6.4"] | |
[org.geotools/gt-epsg-hsql "2.6.4"] | |
[org.geotools/gt-swing "2.6.4"]] | |
:dev-dependencies [[swank-clojure "1.2.1"]]) |
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 cruisecontrol.rb plugin to send notifications to edash (http://github.com/edendevelopment/edash) | |
# - put it in $CRUISE_DATA_ROOT/builder_plugins and restart cruisecontrol.rb | |
# | |
# notify building status to edash | |
# | |
# You might need to change the host and port in the post line | |
require 'builder_error' | |
require 'rest_client' | |
class EdashNotifier < BuilderPlugin |
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
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'wukong' | |
# Given a file with the coordinate pair of a live cell on each line, | |
# generate the next iteration of Game of Life, using MapReduce | |
# | |
# The map phase takes each live cell, and outputs 9 key value pairs, 1 for | |
# each of the adjacent cells and itself. The reduce phase dedupes, detects |
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 pallet_experiments.core | |
(:require | |
[pallet.core :as core] | |
[pallet.resource :as resource] | |
[pallet.crate.automated-admin-user :as automated-admin-user])) | |
(core/defnode mynode | |
"Test node for messing around" | |
{:os-family :amzn-linux | |
:location-id "eu-west-1" |
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 'formula' | |
class Dblatex < Formula | |
url 'http://downloads.sourceforge.net/project/dblatex/dblatex/dblatex-0.3/dblatex-0.3.tar.bz2' | |
homepage 'http://dblatex.sourceforge.net' | |
md5 '7de6bf72b8b2934169ce0ec911e966ed' | |
def install | |
system "python", "setup.py", "install", "--prefix=#{prefix}", "--install-scripts=#{bin}" | |
end |
OlderNewer