Skip to content

Instantly share code, notes, and snippets.

Avatar
:octocat:
😼

Mark Paluch mp911de

:octocat:
😼
View GitHub Profile
View hadoop-daemon.diff
--- dist/hadoop-0.23.10/sbin/hadoop-daemon.sh 2013-12-03 06:59:44.000000000 +0100
+++ customization/sbin/hadoop-daemon.sh 2014-02-20 09:23:15.000000000 +0100
@@ -108,8 +108,8 @@
# some variables
export HADOOP_LOGFILE=hadoop-$HADOOP_IDENT_STRING-$command-$HOSTNAME.log
-export HADOOP_ROOT_LOGGER="INFO,DRFA"
-export HADOOP_SECURITY_LOGGER="INFO,DRFAS"
+export HADOOP_ROOT_LOGGER=${HADOOP_ROOT_LOGGER:-INFO,DRFA}
+export HADOOP_SECURITY_LOGGER=${HADOOP_ROOT_SECURITY_LOGGER:-INFO,DRFAS}
@mp911de
mp911de / add-gelf-logger.cli
Last active Aug 29, 2015
add-gelf-logger.cli
View add-gelf-logger.cli
/subsystem=logging/custom-handler=GelfLogger/:add(module=biz.paluch.logging,class=biz.paluch.logging.gelf.jboss7.JBoss7GelfLogHandler,properties={ \
host="<Your Logstash Host>", \
extractStackTrace=true, \
filterStackTrace=true, \
mdcProfiling=true, \
facility="JBoss AS7/AS8", \
additionalFields="Environment=Test", \
mdcFields="remoteAddr,remoteUser,sessionId,requestUri,requestMethod" \
},level=INFO)
View jboss-log4j.xml
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
<!-- ================================= -->
<!-- Preserve messages in a local file -->
<!-- ================================= -->
<!-- A time/date based rolling appender -->
<appender name="FILE" class="org.jboss.logging.appender.DailyRollingFileAppender">
<errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
View catalina.sh.diff
200a201,206
> if [ -r "$CATALINA_BASE/bin/logstash-gelf-1.4.2.jar" ] ; then
> CLASSPATH=$CLASSPATH:$CATALINA_BASE/bin/logstash-gelf-1.4.2.jar:$CATALINA_BASE/bin/json-simple-1.1.jar:$CATALINA_BASE/bin/jedis-2.5.1.jar:$CATALINA_BASE/bin/commons-pool2-2.0.jar
> else
> CLASSPATH=$CLASSPATH:$CATALINA_HOME/bin/logstash-gelf-1.4.2.jar:$CATALINA_HOME/bin/json-simple-1.1.jar:$CATALINA_HOME/bin/jedis-2.5.1.jar:$CATALINA_HOME/bin/commons-pool2-2.0.jar
> fi
>
@mp911de
mp911de / GelfAccessLogValve.java
Last active Aug 29, 2015
GelfAccessLogValve for Tomcat 6
View GelfAccessLogValve.java
package biz.paluch.logging.accesslogvalve;
import java.io.IOException;
import java.util.Collections;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import javax.servlet.ServletException;
View Create Keyspace.java
Session adminSession = cluster.connect();
BasicCassandraMappingContext cmp = new BasicCassandraMappingContext();
cmp.setInitialEntitySet(ImmutableSet.of(...));
cmp.initialize();
CassandraConverter cassandraConverter = new MappingCassandraConverter(cmp);
CassandraAdminTemplate admin = new CassandraAdminTemplate(adminSession, cassandraConverter);
@mp911de
mp911de / config.txt
Created Nov 9, 2014
SuperPiBoy boot/config.txt
View config.txt
# uncomment if you get no picture on HDMI for a default "safe" mode
#hdmi_safe=1
# uncomment this if your display has a black border of unused pixels visible
# and your display can output without overscan
#disable_overscan=1
# uncomment the following to adjust overscan. Use positive numbers if console
# goes off screen, and negative if there is too much border
overscan_left=-10
@mp911de
mp911de / AbstractSeleniumSteps.java
Created Dec 6, 2014
Heckenlights Test with JBehave, Selenide and Guice
View AbstractSeleniumSteps.java
import org.jbehave.core.annotations.BeforeScenario;
import org.jbehave.web.selenium.SeleniumContext;
import org.jbehave.web.selenium.WebDriverProvider;
import org.openqa.selenium.WebDriver;
import javax.inject.Inject;
public abstract class AbstractSeleniumSteps {
@Inject
View AbstractExceptionMapper.java
import javax.servlet.http.HttpServletRequest;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Request;
import javax.ws.rs.core.Variant;
import java.util.List;
/**
* @author <a href="mailto:mpaluch@paluch.biz">Mark Paluch</a>
* @since 13.11.14 14:19
*/
View keybase.md

Keybase proof

I hereby claim:

  • I am mp911de on github.
  • I am mp911de (https://keybase.io/mp911de) on keybase.
  • I have a public key whose fingerprint is E87A C0BF DCB0 08B6 D703 4FC7 075C 49E0 27E0 F12C

To claim this, I am signing this object: