Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Peter Boling pboling

🏠
Working from home
View GitHub Profile
@pboling
pboling / gist:3714897
Last active Oct 10, 2015
compare specs run by rake & autotest
View gist:3714897
rake_files = "#{list of files copied from console when rake command is run}"
autotest_files = "#{list of files copied from console when autotest command is run}"
r = rake_files.split(' ').map {|x| ar = x.split('/'); ar[(ar.length-2)..(ar.length-1)].join('/')}
a = autotest_files.split(' ').map {|x| ar = x.gsub(/'/,'').split('/'); ar[(ar.length-2)..(ar.length-1)].join('/')}
# autotest will generally be lacking some, as its config becomes out of date
diff = r - a
@pboling
pboling / Gemfile
Last active Jan 4, 2018
My latest project's Gemfile, implements bundle group pattern
View Gemfile
source 'https://rubygems.org'
# Follows the bundler group pattern described here:
# http://iain.nl/getting-the-most-out-of-bundler-groups
# Gemfile.mine in root dir allows locally custom gems.
# NOTE: Doing this will change the Gemfile.lock - commit with care.
eval File.read(File.join(File.dirname(__FILE__), 'Gemfile.mine')) if File.exists? File.join(File.dirname(__FILE__), 'Gemfile.mine')
ruby '1.9.3'
@pboling
pboling / Airbrake GirlFriday Error
Created Feb 4, 2013
Airbrake generator fails on "uninitialized constant GirlFriday".
View Airbrake GirlFriday Error
script/rails generate airbrake --api-key key---derp
Configuration:
api_key: "key---derp"
js_api_key: "key---derp"
backtrace_filters: [#<Proc:0x007fa29d75c708@/Users/pboling/.rvm/gems/ruby-
development_environments: []
development_lookup: true
environment_name: "development"
host: "api.airbrake.io"
@pboling
pboling / Procfile
Last active May 30, 2019
sidekiq initializer
View Procfile
web: bundle exec rails server puma -p $PORT -e $RACK_ENV
critical: env HEROKU_PROCESS=critical bundle exec sidekiq -c 2 -q critical,4
default: env HEROKU_PROCESS=default bundle exec sidekiq -c 4 -q default,2
low: env HEROKU_PROCESS=low bundle exec sidekiq -c 1 -q low,1
@pboling
pboling / webadmin
Created Mar 13, 2013
Neo4j webadmin error trace
View webadmin
HTTP ERROR 500
Problem accessing /. Reason:
Failed to get current transaction.
Caused by:
org.neo4j.graphdb.TransactionFailureException: Failed to get current transaction.
at org.neo4j.kernel.impl.core.LockReleaser.getTransaction(LockReleaser.java:341)
at org.neo4j.kernel.impl.core.LockReleaser.getCowPropertyRemoveMap(LockReleaser.java:533)
@pboling
pboling / console output
Created Mar 13, 2013
Neo4j console SEVERE problems
View console output
ubuntu@ip-d-d-d-d:~$ sudo /var/lib/neo4j/bin/neo4j console
Starting Neo4j Server console-mode...
17:54:30,962 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback.groovy]
17:54:30,962 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback-test.xml]
17:54:30,962 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback.xml] at [jar:file:/usr/share/neo4j/system/lib/neo4j-server-1.8.1.jar!/logback.xml]
17:54:30,984 |-INFO in ch.qos.logback.core.joran.spi.ConfigurationWatchList@5328f6ee - URL [jar:file:/usr/share/neo4j/system/lib/neo4j-server-1.8.1.jar!/logback.xml] is not of type file
17:54:31,044 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - debug attribute not set
17:54:31,051 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender]
17:54:31,055 |-INFO in ch.qos.logback.core.jora
@pboling
pboling / console output
Last active Dec 14, 2015
Starting Neo4j in console mode
View console output
$ sudo /var/lib/neo4j/bin/neo4j console
Starting Neo4j Server console-mode...
21:54:34,229 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback.groovy]
21:54:34,229 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback-test.xml]
21:54:34,229 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback.xml] at [jar:file:/usr/share/neo4j/system/lib/neo4j-server-1.8.1.jar!/logback.xml]
21:54:34,252 |-INFO in ch.qos.logback.core.joran.spi.ConfigurationWatchList@52c05d3b - URL [jar:file:/usr/share/neo4j/system/lib/neo4j-server-1.8.1.jar!/logback.xml] is not of type file
21:54:34,445 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - debug attribute not set
21:54:34,470 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender]
21:54:34,474 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [STDOUT]
2
@pboling
pboling / Neo4j daemon
Created Mar 13, 2013
Starting Neo4j as daemon
View Neo4j daemon
$ sudo /var/lib/neo4j/bin/neo4j start
Starting Neo4j Server...21:58:39,775 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback.groovy]
21:58:39,775 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback-test.xml]
21:58:39,775 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback.xml] at [jar:file:/usr/share/neo4j/system/lib/neo4j-server-1.8.1.jar!/logback.xml]
21:58:39,803 |-INFO in ch.qos.logback.core.joran.spi.ConfigurationWatchList@2dec8909 - URL [jar:file:/usr/share/neo4j/system/lib/neo4j-server-1.8.1.jar!/logback.xml] is not of type file
21:58:39,922 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - debug attribute not set
21:58:39,929 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender]
21:58:39,933 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [STDOUT]
21:58:39,950 |-IN
@pboling
pboling / Neo4j Error
Created Mar 13, 2013
Neo4j error as seen from Neography attempt to execute script within a Sidekiq worker
View Neo4j Error
2013-03-13T22:55:32+00:00 app[low.1]: 2013-03-13T22:55:32Z 2 TID-wdnkc WARN: 757: unexpected token at '<html>
2013-03-13T22:55:32+00:00 app[low.1]: <head>
2013-03-13T22:55:32+00:00 app[low.1]: <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
2013-03-13T22:55:32+00:00 app[low.1]: <title>Error 500 Failed to get current transaction.</title>
2013-03-13T22:55:32+00:00 app[low.1]: </head>
2013-03-13T22:55:32+00:00 app[low.1]: <body><h2>HTTP ERROR 500</h2>
2013-03-13T22:55:32+00:00 app[low.1]: <p>Problem accessing /db/data/ext/GremlinPlugin/graphdb/execute_script. Reason:
2013-03-13T22:55:32+00:00 app[low.1]: <pre> Failed to get current transaction.</pre></p><h3>Caused by:</h3><pre>org.neo4j.graphdb.TransactionFailureException: Failed to get current transaction.
2013-03-13T22:55:32+00:00 app[low.1]: at org.neo4j.kernel.impl.core.LockReleaser.getTransaction(LockReleaser.java:341)
2013-03-13T22:55:32+00:00 app[low.1]: at org.neo4j.kernel.impl.core.LockReleaser.getCowPropertyRemoveMap(Loc
@pboling
pboling / messages.log
Created Mar 15, 2013
cat /var/lib/neo4j/data/graph.db/messages.log
View messages.log
2013-03-13 21:55:13,456 DEBUG [neo4j.diagnostics]: nioneo_logical.log.v5: 2013-03-13T21:54:23+0000 - 22.61 MB
2013-03-13 21:55:13,456 DEBUG [neo4j.diagnostics]: nioneo_logical.log.v2: 2013-03-13T20:26:56+0000 - 25.00 MB
2013-03-13 21:55:13,456 DEBUG [neo4j.diagnostics]: neostore.relationshipstore.db: 2013-03-13T21:54:35+0000 - 2.11 MB
2013-03-13 21:55:13,456 DEBUG [neo4j.diagnostics]: neostore.propertystore.db.strings.id: 2013-03-13T21:54:35+0000 - 9.00 B
2013-03-13 21:55:13,457 DEBUG [neo4j.diagnostics]: nioneo_logical.log.v6: 2013-03-13T21:55:12+0000 - 16.00 B
2013-03-13 21:55:13,457 DEBUG [neo4j.diagnostics]: neostore.relationshipstore.db.id: 2013-03-13T21:54:35+0000 - 9.00 B
2013-03-13 21:55:13,457 DEBUG [neo4j.diagnostics]: neostore.nodestore.db: 2013-03-13T21:54:35+0000 - 569.00 kB
2013-03-13 21:55:13,457 DEBUG [neo4j.diagnostics]: neostore: 2013-03-13T21:55:12+0000 - 54.00 B
2013-03-13 21:55:13,458 DEBUG [neo4j.diagnostics]: nioneo_logical.log.v1: 2013-03-13T20:13:29+0000 - 25.00 MB
2