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 Crap | |
attr_accessor :crappiness | |
def initialize(tolerability = 5) | |
@crappiness = 0 | |
@tolerability = tolerability | |
end | |
def +(int) | |
result = dup |
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
// example program | |
package main | |
import ( | |
"fmt" | |
"os" | |
"github.com/garyburd/redigo/redis" | |
) |
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
[alias] | |
cleanup = "!git fetch -p && git branch --merged | grep -v '\\*\\|master\\|develop' | xargs -n 1 git branch -d" |
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 HashWithIndifferentAccess < Hash | |
def [](key) | |
super(convert_key(key)) | |
end | |
def []=(key, value) | |
super(convert_key(key), value) | |
end | |
def self.[] (*args) |
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
# 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
(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
(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" |
OlderNewer