Skip to content

Instantly share code, notes, and snippets.

@jeremysears
jeremysears / journalctl -xe output
Created Oct 30, 2015
Issue: Where does STDOUT from component-prepare go?
View journalctl -xe output
#!/usr/bin/env bash
echo ################### mra-server.component-prepare BEGIN ##########################
# TODO: [jsears] Runway is simply using db:setup. Figure out what would initialize the DB in the first place.
# TODO: [jsears] Change me, we don't do a db:drop in production!!!
declare -r mra_db_drop=\"-S rake db:drop\"
declare -r mra_db_setup=\"-S rake db:setup\"
# TODO: [jsears] Look into whether MRA needs this...
#declare -r mra_canary_ensure=\"-S rake canary:ensure\"
@jeremysears
jeremysears / EnableDebug.scala
Created Jan 13, 2017
One Liner to Programmatically Enable SLF4J Debug Logging in Scala
View EnableDebug.scala
org.slf4j.LoggerFactory.getLogger(org.slf4j.Logger.ROOT_LOGGER_NAME).asInstanceOf[ch.qos.logback.classic.Logger].setLevel(ch.qos.logback.classic.Level.INFO)
@jeremysears
jeremysears / dse-graph-schema-cheat-sheet.md
Last active Aug 23, 2019
DSE Graph Schema Management Cheat Sheet in Gremlin Groovy
View dse-graph-schema-cheat-sheet.md

DSE Graph Schema Management Cheat Sheet in Gremlin Groovy

DSE Graph schema management examples taken from the excellent DS330: DataStax Enterprise Graph course.

Graph Definition

List all graph names:

system.graphs();  // => KillrVideo

Describe all graphs:

@jeremysears
jeremysears / gremlin-cheat-sheet.md
Last active May 19, 2020
Gremlin Cheat Sheet in Groovy
View gremlin-cheat-sheet.md

Gremlin Cheat Sheet in Groovy

Gremin traversal examples taken from the excellent DS330: DataStax Enterprise Graph course.

Creating Vertices and Vertex Properties

Add a Vertex

Vertex u = graph.addVertex("user");
       u.property("userId","u2016");
       u.property("age",36);
View keybase.md

Keybase proof

I hereby claim:

  • I am jeremysears on github.
  • I am jeremysears (https://keybase.io/jeremysears) on keybase.
  • I have a public key ASDaNVjtVZBOpexyv4deM7ABtyKQ-L6V_wT_908Js4GTMQo

To claim this, I am signing this object:

@jeremysears
jeremysears / pre-push
Last active Feb 26, 2020
An interactive Git pre-push hook to prevent submission of FIXME tags, unless acknowledged.
View pre-push
#!/usr/bin/env bash
matches=$(git diff HEAD~1 HEAD | grep -E '\+.*?FIXME')
if [ "$matches" != "" ]; then
echo >&2 "A 'FIXME' tag has been detected. Please fix all 'FIXME' tags before committing."
echo >&2 ""
echo >&2 "Matching FIXME:"
echo >&2 "${matches}"
echo >&2 ""
You can’t perform that action at this time.