Skip to content

Instantly share code, notes, and snippets.

@patmcdonough
patmcdonough / gist:1070805
Created July 7, 2011 23:42
jboss-as fail on systemd start-up
We couldn’t find that file to show.
Java Plug-in 1.6.0_26
Using JRE version 1.6.0_26-b03 Java HotSpot(TM) Server VM
User home directory = /home/pmcdonou
----------------------------------------------------
c: clear console window
f: finalize objects on finalization queue
g: garbage collect
h: display this help message
l: dump classloader list
[pmcdonou@f15-01 ~]$ firefox http://ec2-174-129-45-250.compute-1.amazonaws.com:8080/
failed to create drawable
java version "1.6.0_22"
OpenJDK Runtime Environment (IcedTea6 1.10.3) (fedora-59.1.10.3.fc15-x86_64)
OpenJDK 64-Bit Server VM (build 20.0-b11, mixed mode)
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
java version "1.6.0_22"
OpenJDK Runtime Environment (IcedTea6 1.10.3) (fedora-59.1.10.3.fc15-x86_64)
OpenJDK 64-Bit Server VM (build 20.0-b11, mixed mode)
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.lwjgl.util.applet.AppletLoader$4.getPermissions(AppletLoader.java:923)
at java.security.SecureClassLoader.getProtectionDomain(SecureClassLoader.java:210)
[pmcdonou@patredhat /]$ sudo yum list installed firefox google-chrome-stable java-1.6.0-sun-plugin java32-1.6.0-sun-plugin
Loaded plugins: auto-update-debuginfo, refresh-packagekit, rhnplugin, versionlock
Installed Packages
firefox.i686 3.6.20-2.el6_1 @rhel-x86_64-server-6
firefox.x86_64 3.6.20-2.el6_1 @rhel-x86_64-server-6
google-chrome-stable.x86_64 13.0.782.215-97094 @google-chrome
java-1.6.0-sun-plugin.x86_64 1:1.6.0.24-1jpp.1.el6 @rhel-x86_64-server-supplementary-6
java32-1.6.0-sun-plugin.i686 1:1.6.0.26-1jpp.1.el6.rhis @rhel6-csb
@patmcdonough
patmcdonough / command-output.log
Created July 26, 2012 01:05
Issues running whirr-cm
mbppatcloudera:bin pat$ whirr launch-cluster --config ../../cm-ec2.properties
Unable to start the cluster. Terminating all nodes.
java.lang.IllegalArgumentException: java.lang.NullPointerException: Action handler not found
at org.apache.whirr.actions.ScriptBasedClusterAction.safeGetActionHandler(ScriptBasedClusterAction.java:245)
at org.apache.whirr.actions.ScriptBasedClusterAction.execute(ScriptBasedClusterAction.java:100)
at org.apache.whirr.ClusterController.launchCluster(ClusterController.java:106)
at org.apache.whirr.cli.command.LaunchClusterCommand.run(LaunchClusterCommand.java:63)
at org.apache.whirr.cli.Main.run(Main.java:64)
at org.apache.whirr.cli.Main.main(Main.java:97)
Caused by: java.lang.NullPointerException: Action handler not found
@patmcdonough
patmcdonough / hive_prep.sql
Created November 27, 2012 06:01
Generate data to test a range query alternative
create table dimension_rollup_periods
(period_id string, time_id string, begin_time timestamp, end_time timestamp)
STORED AS TEXTFILE;
/*Run make_periods.sh script*/
alter table dimension_rollup_periods set serdeproperties ('field.delim'=',');
LOAD DATA LOCAL INPATH 'periods/2012' OVERWRITE INTO TABLE dimension_rollup_periods;
@patmcdonough
patmcdonough / scala.rb
Last active December 28, 2015 20:29 — forked from JoshRosen/scala.rb
require 'formula'
class ScalaDocs < Formula
homepage 'http://www.scala-lang.org/'
url 'http://www.scala-lang.org/files/archive/scala-docs-2.9.3.zip'
sha1 '633a31ca2eb87ce5b31b4f963bdfd1d4157282ad'
end
class ScalaCompletion < Formula
homepage 'http://www.scala-lang.org/'
@patmcdonough
patmcdonough / SparkLogisticRegressionExampleSnippet.scala
Last active December 30, 2015 13:29
Spark Examples from the Databricks's Blog: Putting Spark to Use - Fast In-Memory Computing for Your Big Data Applications http://databricks.com/blog/2013/11/21/putting-spark-to-use.html
val points = sc.textFile("...").map(parsePoint).cache()
var w = Vector.random(D) //current separating plane
for (i <- 1 to ITERATIONS) {
val gradient = points.map(p =>
(1 / (1 + exp(-p.y*(w dot p.x))) - 1) * p.y * p.x)
.reduce(_ + _)
w -= gradient
}
println("Final separating plane: " + w)