Skip to content

Instantly share code, notes, and snippets.


Chris Vest chrisvest

View GitHub Profile
View GraphGist-SimpleRBAC.adoc

This is a very simple approach to doing role-based access control with Neo4j. It is optimistic, in the sense that all items are assumed to be world-accessible unless they have specific constraints. Item visibility can be constrained to either individual users or all users who belong to a role. Roles are also hierarchical, so can inherit privileges from other roles.

First, lets create our basic example data:


Sample service script for debianoids

Look at LSB init scripts for more information.


Copy to /etc/init.d:

# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)
chrisvest /
Created Jun 14, 2012 — forked from rednaxelafx/JDK5u22_client.log
PrintCompilation on different versions of HotSpot VM

About PrintCompilation

This note tries to document the output of PrintCompilation flag in HotSpot VM. It was originally intended to be a reply to a blog post on PrintCompilation from Stephen Colebourne. It's kind of grown too big to fit as a reply, so I'm putting it here.

Written by: Kris Mok

Most of the contents in this note are based on my reading of HotSpot source code from OpenJDK and experimenting with the VM flags; otheres come from HotSpot mailing lists and other reading materials listed in the "References" section.

Creative Commons License
This <span xmlns:dct="" href="" rel="dct:type

View chrisvest-4clojure-solution145.clj
;; chrisvest's solution to For the win
(range 1 38 4)
View chrisvest-4clojure-solution134.clj
;; chrisvest's solution to A nil key
#(nil? (%1 %2 1))
chrisvest / stupid.js
Created Dec 14, 2011 — forked from igstan/stupid.js
Stupid way to write a negate if statement without the logical negation operator
View stupid.js
var b = false;
if (b^b&b|b) {} else {
println("false branch");
View chrisvest-4clojure-solution90.clj
;; chrisvest's solution to Cartesian Product
#(set (for [a %1 b %2] [a b]))
View chrisvest-4clojure-solution83.clj
;; chrisvest's solution to
#(= (set %&) #{true false})
View chrisvest-4clojure-solution81.clj
;; chrisvest's solution to
#(set (filter %1 %2))
View chrisvest-4clojure-solution80.clj
;; chrisvest's solution to
#(let [ntz (Integer/numberOfTrailingZeros %1)]
(= (bit-shift-right %1 ntz) (dec (bit-shift-left 1 (inc ntz)))))
You can’t perform that action at this time.