Skip to content

Instantly share code, notes, and snippets.

View josiah14's full-sized avatar

Josiah josiah14

  • 47 Degrees
  • Remote
View GitHub Profile
josiah@josiah-VirtualBox:~/Development/miracle-tracking-rails$ rake neo4j:install[community-2.0.0]
rake aborted!
Don't know how to build task 'neo4j:install'
/home/josiah/.rvm/gems/ruby-2.1.0/bin/ruby_executable_hooks:15:in `eval'
/home/josiah/.rvm/gems/ruby-2.1.0/bin/ruby_executable_hooks:15:in `<main>'
(See full trace by running task with --trace)
@josiah14
josiah14 / stacktrace
Created February 8, 2014 01:40
error with stack trace
josiah@josiah-VirtualBox:~/Development/miracle-tracking-rails$ rake neo4j:install[community-2.0.0] --trace
rake aborted!
Don't know how to build task 'neo4j:install'
/home/josiah/.rvm/gems/ruby-2.1.0/gems/rake-10.1.1/lib/rake/task_manager.rb:49:in `[]'
/home/josiah/.rvm/gems/ruby-2.1.0/gems/rake-10.1.1/lib/rake/application.rb:148:in `invoke_task'
/home/josiah/.rvm/gems/ruby-2.1.0/gems/rake-10.1.1/lib/rake/application.rb:106:in `block (2 levels) in top_level'
/home/josiah/.rvm/gems/ruby-2.1.0/gems/rake-10.1.1/lib/rake/application.rb:106:in `each'
/home/josiah/.rvm/gems/ruby-2.1.0/gems/rake-10.1.1/lib/rake/application.rb:106:in `block in top_level'
/home/josiah/.rvm/gems/ruby-2.1.0/gems/rake-10.1.1/lib/rake/application.rb:115:in `run_with_threads'
/home/josiah/.rvm/gems/ruby-2.1.0/gems/rake-10.1.1/lib/rake/application.rb:100:in `top_level'
@josiah14
josiah14 / failure error message
Created February 8, 2014 03:27
neo4j with jruby failure
josiah@josiah-VirtualBox:~/Development/miracle-tracking-rails$ rails c
NameError: uninitialized constant Rails::Railtie
const_missing at org/jruby/RubyModule.java:2689
Neo4j at /home/josiah/.rvm/gems/jruby-1.7.9/gems/neo4j-3.0.0.alpha.3/lib/neo4j/railtie.rb:2
(root) at /home/josiah/.rvm/gems/jruby-1.7.9/gems/neo4j-3.0.0.alpha.3/lib/neo4j/railtie.rb:1
require at org/jruby/RubyKernel.java:1083
(root) at /home/josiah/Development/miracle-tracking-rails/config/application.rb:1
each at org/jruby/RubyArray.java:1613
(root) at /home/josiah/Development/miracle-tracking-rails/config/application.rb:11
require at org/jruby/RubyKernel.java:1083
package com.cerner.pophealth.appservices.caremanagement.candidates.pipeline.data
import com.cerner.pophealth.appservices.caremanagement.candidates.models.pipeline.intermediate.{
PersonnelOrgIds,
OrgAdminPersonnels
}
import com.cerner.pophealth.appinfra.pipeline.utilities.SerializableAvro;
import java.util.{ Collections, UUID, Arrays => JArrays, List => JList, ArrayList => JArrayList }
import java.lang.{ String => JString }
@josiah14
josiah14 / refactor.java
Created June 24, 2014 14:04
etl refactor
public class PersonnelETL extends BaseCommand {
@Override
protected final int run(CommandLine line) throws Exception {
return runETLProcess(
line,
ObjectGraph.create(
new PersonnelModule(
getConf(),
line.getOptionValue(OPTION_CLIENT),
line.getOptionValue(OPTION_POPULATION),
return otherCareManager.getId().equals(getId()) &&
otherCareManager.getCareManagerId().equals(getCareManagerId()) &&
otherCareManager.getClientId().equals(getClientId()) &&
otherCareManager.getName().equals(getName()) &&
otherCareManager.getVersion().equals(getVersion());
fibs :: [Integer]
fibs = 0 : 1 : zipWith (+) fibs (tail fibs)
-- print the first 100 fibonacci numbers
main :: IO ()
main = print $ take 100 fibs
imageSignal : Signal Element
imageSignal = sampleOn (every second) (constant (image 400 400 imageURL))
@josiah14
josiah14 / bummer.hs
Created November 23, 2014 07:35
Hmm. Haskell wont treat a (Functor f) => f String as a single value, so I can't make ((->) SomeType) into a Functor if the value returned by the Arrow is a Functor...
-- apply a style function to a shell prompt functor
-- e.g.
-- bold & fgColor red `style` gitCurrentBranch
style :: (String -> ShellPromptType -> String) -> ShellPromptSegment String
-> ShellPromptType -> ShellPromptSegment String
style f segment = \shType -> (flip f) shType <$> segment
-- this is fine
style' :: (String -> ShellPromptType -> String)
-> (ShellPromptType -> ShellPromptSegment String)
@josiah14
josiah14 / new-maven.sh
Created April 7, 2015 23:25
Create new Maven projects
mvn archetype:generate -DgroupId=group.id -DartifactId=artifact-id -DarchetypeArtifactId=maven-archetype-quickstart