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
java.io.FileNotFoundException: Could not locate slingshot/core__init.class or slingshot/core.clj on classpath: | |
- Exception | |
java.lang.RuntimeException: java.io.FileNotFoundException: Could not locate slingshot/core__init.class or slingshot/core.clj on classpath: | |
at clojure.lang.Util.runtimeException(Util.java:165) ~[clojure-1.3.0.jar:na] | |
at clojure.lang.Compiler.eval(Compiler.java:6476) [clojure-1.3.0.jar:na] | |
at clojure.lang.Compiler.eval(Compiler.java:6455) [clojure-1.3.0.jar:na] | |
at clojure.lang.Compiler.load(Compiler.java:6902) [clojure-1.3.0.jar:na] | |
at clojure.lang.RT.loadResourceScript(RT.java:357) ~[clojure-1.3.0.jar:na] | |
at clojure.lang.RT.loadResourceScript(RT.java:348) ~[clojure-1.3.0.jar:na] | |
at clojure.lang.RT.load(RT.java:427) ~[clojure-1.3.0.jar:na] |
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
Setup deps graphite | |
aptitude install python2.6 | |
aptitude install python-cairo | |
aptitude install python-django | |
aptitude install python-django-tagging | |
aptitude install python2.6-twisted-core | |
aptitude install apache2 | |
aptitude install libapache2-mod-wsgi | |
aptitude install memcached python-memcache |
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
@GrabResolver(name='jclouds snapshot', root='https://oss.sonatype.org/content/repositories/snapshots') | |
@Grab('org.jclouds:jclouds-allcompute:1.3.0-SNAPSHOT') | |
import org.jclouds.compute.ComputeServiceContextFactory | |
def accesskeyid = '...' | |
def secretkey = '...' | |
def context = new ComputeServiceContextFactory().createContext("aws-ec2", accesskeyid, secretkey) | |
def nodes = context.getComputeService().listNodes() |
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
(ns quickstart.core | |
(:require pallet.core | |
pallet.compute | |
pallet.phase | |
pallet.crate.automated-admin-user)) | |
(def basicnode | |
(pallet.core/node-spec | |
:image {:os-family :ubuntu :os-version-matches "10.10"} | |
:hardware {:min-cores 2 :min-ram 512} |
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
#!/bin/sh | |
# Presumes this script is in the bin folder | |
HOME=`dirname $0`/.. | |
cd $HOME | |
java -cp "lib/*" test.Main $@ |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!-- Generated from archetype; please customize. --> | |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>com.xlson.example</groupId> | |
<artifactId>gmaven-example</artifactId> |
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
... | |
<dependencies> | |
<dependency> | |
<groupId>org.codehaus.groovy</groupId> | |
<artifactId>groovy-all</artifactId> | |
<version>1.8.0</version> | |
</dependency> | |
</dependencies> |
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
@Grab('com.xlson.groovycsv:groovycsv:1.0') | |
import com.xlson.groovycsv.CsvParse | |
def csv = '''Name-Lastname | |
Mark-'Anderson-Nielsen' | |
Pete-Hansen''' | |
def data = new CsvParser().parse(csv, separator: '-', quoteChar: "'") | |
for(line in data) { | |
println "$line.Name $line.Lastname" | |
} |
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
#!/usr/bin/env groovy | |
def url = args[0] | |
def connection = url.toURL().openConnection() | |
connection.instanceFollowRedirects = false | |
if(connection.responseCode in [300, 301]) { | |
def redirectsTo = connection.getHeaderField('Location') | |
println "Redirects to: $redirectsTo" | |
} else { |
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
@GrabResolver(name="blah", root="https://oss.sonatype.org/content/groups/public/") | |
@Grab("com.xlson.groovycsv:groovycsv:1.0-SNAPSHOT") | |
import com.xlson.groovycsv.CsvParser | |
def csv = '''apple,12 | |
pear,24''' | |
new CsvParser().parse(readFirstLine:true, columnNames:['fruit', 'qty'], csv).each { println it } | |
println com.xlson.groovycsv.CsvParser.class.protectionDomain.codeSource.location |