Skip to content

Instantly share code, notes, and snippets.

View nightfly19's full-sized avatar

Sage Imel nightfly19

  • Portland State University
  • Portland, Oregon
View GitHub Profile
;int main(){
;/*
(format t "~A~%" "hello world!")
;*/
; printf("hello world!\n")
; return 0
;}
@nightfly19
nightfly19 / gist:3645586
Created September 5, 2012 21:51
Exception on query
--Request--
POST http://localhost:7474/db/data/cypher HTTP/1.1
Content-Type: application/json
Accept: application/json
HOST: localhost
Content-Length: 80
{"query":"start x = node(85324) match x -[r]-> n return type(r)","params":null}
--Response--
http> POST http://localhost:7474/db/data/cypher {"query":"start x = node(85324) match x -[r]-> n return type(r)","params":null}
==> 400 Bad Request
==> {
==> "exception" : "java.lang.NullPointerException",
==> "stacktrace" : [ "scala.collection.JavaConversions$JMapWrapperLike$$anon$2.<init>(JavaConversions.scala:782)", "scala.collection.JavaConversions$JMapWrapperLike$class.iterator(JavaConversions.scala:781)", "scala.collection.JavaConversions$JMapWrapper.iterator(JavaConversions.scala:792)", "scala.collection.IterableLike$class.foreach(IterableLike.scala:73)", "scala.collection.JavaConversions$JMapWrapper.foreach(JavaConversions.scala:792)", "scala.collection.TraversableOnce$class.toMap(TraversableOnce.scala:256)", "scala.collection.JavaConversions$JMapWrapper.toMap(JavaConversions.scala:792)", "org.neo4j.cypher.ExecutionEngine.execute(ExecutionEngine.scala:58)", "org.neo4j.cypher.javacompat.ExecutionEngine.execute(ExecutionEngine.java:86)", "org.neo4j.server.rest.web.CypherService.cypher(CypherServic
@nightfly19
nightfly19 / gist:3955752
Created October 25, 2012 22:06
Which is better (or neither)?
(defn login [conn user]
((comp
#(cmd conn :nick (:nick user))
#(cmd conn :user (:nick user) "0" "*" (str ":" (:name user))))))
(defn login [conn user]
(cmd (cmd conn :nick (:nick user))
:user (:nick user) "0" "*" (str ":" (:name user))))
int moo(){
return 2;
}
int main(){
int moo;
moo = ::moo();
return moo;
}
@nightfly19
nightfly19 / gist:5020848
Last active December 14, 2015 03:28 — forked from ccfontes/gist:5020842
(let [eggs #(str %)]
(defn foo
([x y] (println (eggs x) y))
([x] (println (eggs x)))))
@nightfly19
nightfly19 / hiera.yaml
Last active December 17, 2015 12:39 — forked from jamescarr/hiera.yaml
---
:backends: - file
- yaml
:logger: console
:hierarchy: - %{::environment}/fqdn/%{::fqdn}
- fqdn/%{::fqdn}
- %{::environment}
- global
@nightfly19
nightfly19 / gist:5675032
Last active December 17, 2015 21:29
The variable names in global.yaml are being expanded when the template is expanded. Not sure where I need to escape something
#global.yaml
'puppet::hiera::backends': - file
- yaml
'puppet::hiera::logger': console
'puppet::hiera::hierarchy': - '%{::environment}/fqdn/%{::fqdn}'
- 'fqdn/%{::fqdn}'
- '%{::environment}'
- global
$groups = ['adm', 'plugdev']
$user = 'foo'
$users = [$user]
# method 1
user { $user:
groups => $groups,
}