Skip to content

Instantly share code, notes, and snippets.

View jillesvangurp's full-sized avatar

Jilles van Gurp jillesvangurp

View GitHub Profile
@jillesvangurp
jillesvangurp / jedit_dot_profile_snippet.sh
Created June 2, 2011 14:12
Start Jedit from the command line
# bash function for opening files in jedit (http://www.jedit.org/) from the command line
# copy the line below in your .profile or .bashrc
# the nohup can be used to avoid closing the editor when you close the terminal window from which you launch
function jedit() { nohup java -Xms15M -jar /Applications/jEdit.app/Contents/Resources/Java/jedit.jar -reuseview "$@" > /dev/null 2> /dev/null &}
@jillesvangurp
jillesvangurp / .profile
Created May 26, 2012 08:55
profile tweak to get custom git prompt
# brew install bash_completion for this to work ...
if [ -f `brew --prefix`/etc/bash_completion ]; then
. `brew --prefix`/etc/bash_completion
fi
# add current git branch to prompt
PS1='\h:\w\[\033[32m\]$(__git_ps1) \[\033[0m\]$ '
@jillesvangurp
jillesvangurp / .gitconfig
Created May 26, 2012 08:57
.gitconfig with my favorite settings
[color]
branch = auto
diff = auto
interactive = auto
status = auto
[user]
name = [...]
email = [...]
[github]
user = [...]
class Person {
// final fields can be public, no more getter bullshit
public final String name;
public final String sex;
public final int age;
...
// private constructor to be used by Builder only, constructor inject everything in one go and never modify.
Many of you have been asking about the future of the Elasticsearch UG Berlin. A few months ago we announced the temporary shutdown of the meetup while we negotiated how to continue the meetup due to some disagreements. We continued discussing this over the last few months and finally agreed to relaunch the meetup with a bit changed scope. We very much enjoyed running the group in the old form and it has been one of the most active groups in that space, with 32 events over the time it lasted. Only Elasticsearch France is more active.
Today we are announcing the re-launch of the group under a different name: Search Berlin and with a broadened scope: search. We will open the group to other topics from the same space. We believe this will lead to a more informative environment for all attendees and provides independence to the community effort. Elasticsearch and the products around it will of course stay an important topic. This comes along with a few minor governance changes (which improve the group, in our vi
@jillesvangurp
jillesvangurp / slfjloggerdeclaration.md
Last active November 30, 2015 10:42
eclipse template for slf4j LOG declaration

eclipse->Preferences->java->editor->templates

create a new template with the name LOG and paste this

private static final Logger LOG = LoggerFactory.getLogger(${enclosing_type}.class);

Now when you type LOG and ctrl+space, you can autocomplete and insert a logger definition.

@jillesvangurp
jillesvangurp / gist:fb8ee1fce482846ab12cb0c37a3a1b4f
Created October 20, 2016 16:06
jq expression to get a csv out of aws describe-instances
# we have Name tags and environment_name tags so it makes sense to add those as columns
aws ec2 describe-instances --filters "Name=instance-state-name,Values=running" | jq --raw-output '.Reservations[].Instances[] | [.Placement.AvailabilityZone, .PrivateDnsName, .InstanceType, (.Tags[] | select(.Key == "Name").Value),(.Tags[] | select(.Key == "environment_name").Value)] | @csv'
@jillesvangurp
jillesvangurp / registerPrivateIpForCloudFormationStack.sh
Created April 4, 2017 14:32
quick and dirty dns registration of cf stack with route53
#! /bin/bash
# call ./registerPrivateIpForCloudFormationStack.sh domainName stackName hostedZoneName
# requires aws-cli and jq installed, you may want to
function hostedzoneId() {
export hostedzone
hostedzone=$(aws route53 list-hosted-zones | jq --raw-output '.HostedZones[] | select(.Name == "$1").Id')
echo "$hostedzone"
}

Keybase proof

I hereby claim:

  • I am jillesvangurp on github.
  • I am jillesvangurp (https://keybase.io/jillesvangurp) on keybase.
  • I have a public key ASCWZzL3Ou4D9nzEIsWt9PT4KHd0thkFfmEDNzVPLsRCygo

To claim this, I am signing this object:

@jillesvangurp
jillesvangurp / log.txt
Last active January 9, 2018 09:55
gradle debug log of jcenter upload. Build successfull but no jar file anywhere to be seen on jcenter.
jillesvangurp@ip-192-168-1-3 ~/git/inbot/inbot-eth-contracts[master]*
$ gradle -PjcenterApiKey=XXXXXXX -PpgpPassword=XXXXXXX bintrayUpload --debug
10:18:51.303 [INFO] [org.gradle.internal.nativeintegration.services.NativeServices] Initialized native services in: /Users/jillesvangurp/.gradle/native
10:18:51.462 [DEBUG] [org.gradle.launcher.daemon.client.DaemonClient] Executing build c24372db-ffd5-4c01-84c8-895e18d07acc.1 in daemon client {pid=65514}
10:18:51.469 [DEBUG] [org.gradle.internal.remote.internal.inet.InetAddresses] Adding IP addresses for network interface en5
10:18:51.470 [DEBUG] [org.gradle.internal.remote.internal.inet.InetAddresses] Is this a loopback interface? false
10:18:51.470 [DEBUG] [org.gradle.internal.remote.internal.inet.InetAddresses] Is this a multicast interface? true
10:18:51.472 [DEBUG] [org.gradle.internal.remote.internal.inet.InetAddresses] Adding remote address /fe80:0:0:0:aede:48ff:fe00:1122%en5
10:18:51.472 [DEBUG] [org.gradle.internal.remote.internal.inet.InetAddresses] Addin