Skip to content

Instantly share code, notes, and snippets.

View ankon's full-sized avatar

Andreas Kohn ankon

View GitHub Profile
@ankon
ankon / crash.log
Created September 10, 2014 09:57
Packer #1473 crash
2014/09/10 11:47:07 Packer Version: 0.7.0
2014/09/10 11:47:07 Packer Target OS/Arch: linux amd64
2014/09/10 11:47:07 Built with Go Version: go1.3.1
2014/09/10 11:47:07 [DEBUG] Discoverd plugin: amazon-chroot = /home/andreas/modules/packer-0.7.0/packer-builder-amazon-chroot
2014/09/10 11:47:07 [DEBUG] Discoverd plugin: amazon-ebs = /home/andreas/modules/packer-0.7.0/packer-builder-amazon-ebs
2014/09/10 11:47:07 [DEBUG] Discoverd plugin: amazon-instance = /home/andreas/modules/packer-0.7.0/packer-builder-amazon-instance
2014/09/10 11:47:07 [DEBUG] Discoverd plugin: digitalocean = /home/andreas/modules/packer-0.7.0/packer-builder-digitalocean
2014/09/10 11:47:07 [DEBUG] Discoverd plugin: docker = /home/andreas/modules/packer-0.7.0/packer-builder-docker
2014/09/10 11:47:07 [DEBUG] Discoverd plugin: googlecompute = /home/andreas/modules/packer-0.7.0/packer-builder-googlecompute
2014/09/10 11:47:07 [DEBUG] Discoverd plugin: null = /home/andreas/modules/packer-0.7.0/packer-builder-null
@ankon
ankon / thread-dump.txt
Created November 12, 2014 10:12
Elasticsearch 1.4.0/elasticsearch-river-mongodb 2.0.4 startup
2014-11-12 11:02:17
Full thread dump OpenJDK 64-Bit Server VM (24.65-b04 mixed mode):
"Attach Listener" daemon prio=10 tid=0x00007f9a84002000 nid=0x1632 waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
"elasticsearch[Infant Terrible][management][T#5]" daemon prio=10 tid=0x00007f9a88007000 nid=0x1492 waiting on condition [0x00007f99d21d7000]
java.lang.Thread.State: TIMED_WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00000000cb886618> (a org.elasticsearch.common.util.concurrent.EsExecutors$ExecutorScalingQueue)
@ankon
ankon / gist:a5f664bd26f750c0f51c
Created February 20, 2015 14:57
Spot the bug!
docker: Installing:
docker: httpd x86_64 2.4.6-19.el7.centos updates 2.7 M
docker: Installing for dependencies:
docker: apr x86_64 1.4.8-3.el7 base 103 k
docker: apr-util x86_64 1.5.2-6.el7 base 92 k
docker: centos-logos noarch 70.0.6-1.el7.centos base 21 M
docker: httpd-tools x86_64 2.4.6-19.el7.centos updates 78 k
docker: mailcap noarch 2.1.41-2.el7 base 31 k
@ankon
ankon / gist:0abc0863074e717ece3f
Last active August 29, 2015 14:19
Oracle vs Eclipse javac
public <T>T removeFieldListValue(Field field, Function<Object, T> valueMapper, T value) {
return removeFieldListValue(field, valueMapper, value::equals);
}
public <T> T removeFieldListValue(Field field, Function<Object, T> valueMapper, Function<T, Boolean> predicate) {
// Whatever
return null;
}
eclipse: all good
@ankon
ankon / output
Created October 5, 2015 16:40
Python Magic ...
usage: test.py foo [-h] [-a {bar}]
test.py foo: error: argument -a/--argument: invalid choice: ' bar' (choose from 'bar')
Exception - short
usage: test.py [-h] {foo} ...
test.py: error: unrecognized arguments: --argument bar
Exception - long
bar
@ankon
ankon / README.md
Last active December 15, 2015 11:23
Making Eclipse work with JDK 9-ea+96 and later
  1. Get the name of the OSGi bundle used by eclipse: osgi.framework key in $ECLIPSE_HOME/configuration/config.ini
  2. Extract that file into a new temporary directory
  3. Copy JavaSE-1.9.profile to JavaSE-9.profile
  4. Modify profile.list to list that new profile in the java.profiles entry
  5. Pack everything back together: jar cvfm META-INF/MANIFEST.MF (name-of-file-from-step-1) .

You can use a different name for the target in step 5, but then must also modify config.ini accordingly.

@ankon
ankon / .hgrc
Created December 15, 2015 14:48
"Nice" mercurial log output style
[ui]
style=/path/to/hgstyle
Process: gource [29165]
Path: /usr/local/bin/gource
Identifier: gource
Version: 0
Code Type: X86-64 (Native)
Parent Process: bash [8788]
Responsible: Terminal [325]
User ID: 501
Date/Time: 2016-02-12 12:49:40.748 +0100
@ankon
ankon / filter-maven-travis.sh
Last active June 6, 2016 10:31
Taming Maven Verbosity on Travis
#!/bin/sh
# Filter maven output and inject 'travis_fold'/'travis_time' markers
exec awk '
BEGIN {
attn=0
id=0
start=0
end=0
}
@ankon
ankon / rc.sh
Created June 10, 2016 05:34
No-frills init/rc replacement for running SysV services in a docker container
#!/bin/sh
# This is a wrapper script around a regular SysV service
_services=
while [ $# -gt 0 ]; do
if [ -x "$1" ]; then
_service=$1
shift
else