Skip to content

Instantly share code, notes, and snippets.

View scarcher2's full-sized avatar

Scott Archer scarcher2

View GitHub Profile
@scarcher2
scarcher2 / Sample XML Output
Last active August 29, 2015 14:05
Sample Code
({:raw #clojure.data.xml.Element{:tag :contact, :attrs {:id "1"}, :content (#clojure.data.xml.Element{:tag :first, :attrs {}, :content ("Joe")} #clojure.data.xml.Element{:tag :last, :attrs {}, :content ("Smith")} #clojure.data.xml.Element{:tag :email, :attrs {}, :content ("joe@example.com")})}} {:raw #clojure.data.xml.Element{:tag :contact, :attrs {:id "2"}, :content (#clojure.data.xml.Element{:tag :first, :attrs {}, :content ("Jane")} #clojure.data.xml.Element{:tag :last, :attrs {}, :content ("Smith")} #clojure.data.xml.Element{:tag :email, :attrs {}, :content ("jane@example.com")})}} {:raw #clojure.data.xml.Element{:tag :contact, :attrs {:id "3"}, :content (#clojure.data.xml.Element{:tag :first, :attrs {}, :content ("John")} #clojure.data.xml.Element{:tag :last, :attrs {}, :content ("Smith")} #clojure.data.xml.Element{:tag :email, :attrs {}, :content ("John@example.com")})}})
<?xml version="1.0"?>
<contact_list>
<contact id="1">
<first>Joe</first>
<last>Smith</last>
<email>joe@example.com</email>
</contact>
<contact id="2">
<first>Jane</first>
<last>Smith</last>
@scarcher2
scarcher2 / gist:aa761ba50424cb91e46b
Created August 26, 2014 03:36
Clojure Transform Attempt
(ns sample.core)
(use '[clojure.data.xml :as data.xml])
(use '[clojure.java.io :as io])
(defn process-contact
"I don't do a whole lot."
[contact]
(println contact)
@scarcher2
scarcher2 / gist:8873683
Created February 7, 2014 22:56
Debug Logs from Gem Install
C:\code\opensource\jruby>jruby -Xdebug.loadService=true -S gem install rails
2014-02-07T16:52:02.301-06:00: LoadService: trying builtinLib: jruby.rb
2014-02-07T16:52:02.327-06:00: LoadService: found builtinLib: jruby.rb
2014-02-07T16:52:02.328-06:00: LoadService: trying builtinLib: java.rb
2014-02-07T16:52:02.328-06:00: LoadService: found builtinLib: java.rb
2014-02-07T16:52:02.366-06:00: LoadService: trying builtinLib: jruby/java.rb
2014-02-07T16:52:02.366-06:00: LoadService: trying builtinLib: jruby/java.class
2014-02-07T16:52:02.368-06:00: LoadService: trying resourceFromLoadPath: 'C:/code/opensource/jruby/lib/ruby/1.9/site_ruby/jruby/ja
va.rb' false false
2014-02-07T16:52:02.368-06:00: LoadService: trying resourceFromLoadPath: 'C:/code/opensource/jruby/lib/ruby/1.9/site_ruby/jruby/ja
@scarcher2
scarcher2 / pom.xml
Created July 19, 2012 20:11
Maven Pom XML for compiling Groovy and Java
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.sample.project</groupId>
<artifactId>groovy-sample</artifactId>
<version>0.0.1-SNAPSHOT</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
@scarcher2
scarcher2 / Scott
Created March 20, 2012 15:55
Commands
sarcher@JXNPLWS02989 /c/Users/sarcher/git/integration-example
$ git branch --set-upstream origin/master
Branch origin/master set up to track local branch master.
sarcher@JXNPLWS02989 /c/Users/sarcher/git/integration-example
$ git status
# On branch master
nothing to commit (working directory clean)
sarcher@JXNPLWS02989 /c/Users/sarcher/git/integration-example
@scarcher2
scarcher2 / Scott
Created March 20, 2012 15:54
Git Config
$ git config --list
user.name=Scott Archer
user.email=sarcher@whatever.com
core.repositoryformatversion=0
core.filemode=false
core.logallrefupdates=true
core.autocrlf=false
remote.origin.url=ssh://git@jxnpvmav01.server.local/integration-example.git
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
branch.origin/master.remote=.
@scarcher2
scarcher2 / Scott
Created March 20, 2012 15:41
I've modified files that have not been committed, but they aren't showing up properly and I can't get things synchronized with my remote repository.
sarcher@JXNPLWS02989 /c/users/sarcher/git/integration-example
$ git status
# On branch master
nothing to commit (working directory clean)
sarcher@JXNPLWS02989 /c/users/sarcher/git/integration-example
$ git remote show
origin
sarcher@JXNPLWS02989 /c/users/sarcher/git/integration-example