Skip to content

Instantly share code, notes, and snippets.

Bernd ecki

Block or report user

Report or block ecki

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@kofemann
kofemann / GuavaCacheMXBean.java
Created Sep 25, 2013
Expose Google's guava Cache vie JMX
View GuavaCacheMXBean.java
public interface GuavaCacheMXBean {
public long getRequestCount();
public long getHitCount();
public double getHitRate();
public long getMissCount();
@chrisvest
chrisvest / Notes.md
Created Jun 14, 2012 — forked from rednaxelafx/JDK5u22_client.log
PrintCompilation on different versions of HotSpot VM
View Notes.md

About PrintCompilation

This note tries to document the output of PrintCompilation flag in HotSpot VM. It was originally intended to be a reply to a blog post on PrintCompilation from Stephen Colebourne. It's kind of grown too big to fit as a reply, so I'm putting it here.

Written by: Kris Mok rednaxelafx@gmail.com

Most of the contents in this note are based on my reading of HotSpot source code from OpenJDK and experimenting with the VM flags; otheres come from HotSpot mailing lists and other reading materials listed in the "References" section.

Creative Commons License
This <span xmlns:dct="http://purl.org/dc/terms/" href="http://purl.org/dc/dcmitype/Text" rel="dct:type

@jeromyanglim
jeromyanglim / example-r-markdown.rmd
Created May 17, 2012
Example of using R Markdown
View example-r-markdown.rmd
This post examines the features of [R Markdown](http://www.rstudio.org/docs/authoring/using_markdown)
using [knitr](http://yihui.name/knitr/) in Rstudio 0.96.
This combination of tools provides an exciting improvement in usability for
[reproducible analysis](http://stats.stackexchange.com/a/15006/183).
Specifically, this post
(1) discusses getting started with R Markdown and `knitr` in Rstudio 0.96;
(2) provides a basic example of producing console output and plots using R Markdown;
(3) highlights several code chunk options such as caching and controlling how input and output is displayed;
(4) demonstrates use of standard Markdown notation as well as the extended features of formulas and tables; and
(5) discusses the implications of R Markdown.
@davidhooey
davidhooey / oracle_segment_advisor_for_all_segments_in_schema.sql
Created Sep 24, 2013
Oracle Segment Advisor for All Segments in Schema
View oracle_segment_advisor_for_all_segments_in_schema.sql
--
-- Segment Advisor for All Segments in Schema
--
-- 1. Grant the ADVISOR and SELECT ANY DICTIONARY roles to the schema owner.
-- 2. Execute the script as the schema owner.
-- 3. Revoke the ADVISOR and SELECT ANY DICTIONARY roles from the schema owner.
set echo off
set feedback off
@witscher
witscher / tomcat.conf
Created Jun 13, 2012
Apache Tomcat Upstart script
View tomcat.conf
description "Tomcat Server"
start on runlevel [2345]
stop on runlevel [!2345]
respawn
respawn limit 10 5
# run as non privileged user
# add user with this command:
## adduser --system --ingroup www-data --home /opt/apache-tomcat apache-tomcat
@defuse
defuse / attack.php
Last active Jan 22, 2019
PoC: Attack Against PHP Crypto
View attack.php
<?php
/*
* This code is copied from
* http://www.warpconduit.net/2013/04/14/highly-secure-data-encryption-decryption-made-easy-with-php-mcrypt-rijndael-256-and-cbc/
* to demonstrate an attack against it. Specifically, we simulate a timing leak
* in the MAC comparison which, in a Mac-then-Encrypt (MtA) design, we show
* breaks confidentiality.
*
* Slight modifications such as making it not serialize/unserialize and removing
@ryancdotorg
ryancdotorg / dnaas.c
Created Oct 30, 2013
Wrapper library to use /dev/null as a service on Linux via LD_PRELOAD
View dnaas.c
/* This is a wrapper library that will give your server the power of
* /dev/null as a service, as seen at http://devnull-as-a-service.com/
*
* Compile:
* gcc -ggdb -shared -fPIC dnaas.c -ldl -lcurl -o libdnaas.so
*
* Try:
* LD_PRELOAD=./libdnaas.so dd if=/dev/sda of=/dev/null bs=8192 count=16
*
* Install:
@WPsites
WPsites / logstash.index.json
Last active Sep 17, 2017
Elasticsearch index template for logstash that contains additional NGINX fields
View logstash.index.json
{
"template_logstash":{
"template" : "logstash*",
"settings" : {
"number_of_shards" : 5,
"index.cache.field.type" : "soft",
"index.refresh_interval" : "5s",
"index.store.compress.stored" : true,
"index.query.default_field" : "message",
"index.routing.allocation.total_shards_per_node" : 5
@rednaxelafx
rednaxelafx / TestSafepoint.h
Created Oct 26, 2011
An example of JNI call and GC/Safepoint interaction. Shows that native call doesn't block GC/Safepoint. JNI postpones a GC if it's in a critical section.
View TestSafepoint.h
/* DO NOT EDIT THIS FILE - it is machine generated */
#include <jni.h>
/* Header for class TestSafepoint */
#ifndef _Included_TestSafepoint
#define _Included_TestSafepoint
#ifdef __cplusplus
extern "C" {
#endif
/*
@mohamed-el-habib
mohamed-el-habib / gist:00deef599e8ba1cdbece
Last active Sep 6, 2016 — forked from abs/gist:c0d598996870dda719b3
Downloads and installs the startssl CA certs into the global Java keystore
View gist:00deef599e8ba1cdbece
#!/bin/bash
# Downloads and installs the startssl CA certs into the global Java keystore
# https://sipb.mit.edu/doc/safe-shell/
set -euf -o pipefail
# Check if JAVA_HOME is set
if [ "$JAVA_HOME" = "" ]
then
echo "ERROR: JAVA_HOME must be set."
exit 1
You can’t perform that action at this time.