Skip to content

Instantly share code, notes, and snippets.

View hferentschik's full-sized avatar

Hardy Ferentschik hferentschik

View GitHub Profile
Vagrant.configure(2) do |config|
config.vm.box = "/home/mfojtik/rhel-server-virtualbox-7.1-3.x86_64.box"
config.vm.network "private_network", ip: "192.168.33.10"
config.vm.provision "shell", privileged: false, inline: <<-SHELL
# Need to do commented steps manually right now :/
# subscription-manager register
# subscription-manager attach --auto
# subscription-manager repos --disable="*"
# subscription-manager repos \
# --enable="rhel-7-server-rpms" \
@gunnarmorling
gunnarmorling / gist:fa6eb9ab72fff2d5a8d1
Created September 5, 2014 14:19
IMPL types exposed by HSEARCH API/SPIs
[ERROR] my-rules:PublicMethodsMayNotExposeInternalTypes: API/SPI methods must not expose internal types.
[ERROR] method=org.hibernate.search.engine.spi.SearchFactoryImplementor#org.hibernate.search.engine.impl.FilterDef getFilterDefinition(java.lang.String)
[ERROR] method=org.hibernate.search.engine.spi.SearchFactoryImplementor#org.hibernate.search.indexes.impl.IndexManagerHolder getIndexManagerHolder()
[ERROR] method=org.hibernate.search.engine.spi.SearchFactoryImplementor#org.hibernate.search.backend.impl.batch.BatchBackend makeBatchBackend(org.hibernate.search.batchindexing.MassIndexerProgressMonitor)
[ERROR] method=org.hibernate.search.engine.spi.EntityIndexBinding#org.hibernate.search.query.collector.impl.FieldCacheCollectorFactory getIdFieldCacheCollectionFactory()
[ERROR] method=org.hibernate.search.engine.spi.DocumentBuilderIndexedEntity#org.hibernate.search.query.collector.impl.FieldCacheCollectorFactory getIdFieldCacheCollectionFactory()
[ERROR] method=org.hibernate.search.engine.spi.Abs
@hferentschik
hferentschik / Foo
Last active August 29, 2015 14:04
Type annotations and Hibernate Validator
public class Foo {
@Valid // !? needed or not? Atm this is needed to trigger iteration
private List<@Email String> myEmailList; // that's the case we should primarily address
// ...
}
@ecampidoglio
ecampidoglio / cpustatus.sh
Created February 21, 2013 23:42
A Bash script that prints the current state of the CPU on a Raspberry Pi. It displays variables like temperature, voltage and speed.
#!/bin/bash
# cpustatus
#
# Prints the current state of the CPU like temperature, voltage and speed.
# The temperature is reported in degrees Celsius (C) while
# the CPU speed is calculated in megahertz (MHz).
function convert_to_MHz {
let value=$1/1000
echo "$value"
@stliu
stliu / gist:3141182
Created July 19, 2012 06:43
hibernate metamodel branch progress

This document is supposed to be used as a tracker of the progress of hibernate metamodel branch.

We want a uniform place to track the progress, so I use this instead of JIRA.

There are 5 major works shoulb be done to complete a mapping:

  • source
  • binding
  • binder
  • persister
@emmanuelbernard
emmanuelbernard / remote.sh
Created September 15, 2011 08:24
Run the command on a git clone (using current branch)
#!/bin/bash
# Clones your existing repo and run the subsequent command off this clone
# Tests are run on the the current branch at the time of cloning
#
# Note that you can work on the next bug while this is going on as
# tests are run off a cloned repo.
#
# $ remote.sh mvn clean install
# runs 'mvn clean install'
#
@Sanne
Sanne / jira
Last active September 26, 2015 10:57
Open JIRA from git branch
#!/bin/bash
# This script will look into the GIT commit log of the current directory, backwards since the branch
# from master, searching for references to JIRA issues of a set of known projects.
# It will then print URLs to all mentioned JIRA issues.
# Optionally (uncommnent one line) it could open all relevant issues in different tabs of a browser: this is useful
# in my workflow as I often want to comment and/or close the issues when merging work in upstream.
#
# Released under the WTFPL license version 2 http://sam.zoy.org/wtfpl/
#
# Copyright (c) 2011 Sanne Grinovero
[13:04] <sebersole> 9) commit
[13:04] <sebersole> 10) push
[13:04] <stliu> well, i'd think the release build should come from a tag instead of a branch, if something wrong, we need re-tag after fixing it
[13:04] <sebersole> what exactly is the diff?
[13:04] <sebersole> thats rhetoric
[13:04] <sebersole> there is NO diff
[13:05] <stliu> yes :)
[13:05] <sebersole> except one is easier in the case something goes wrong
[13:05] <sebersole> feel free to do it your way :)
[12:58] <sebersole> here are the steps:
[12:58] <sebersole> 1) mark version released in jira
[12:59] <sebersole> 2) get changelog from jira and add to changelog.txt (just follow others)
[12:59] <sebersole> 3) change version in build.gradle
[12:59] <sebersole> 4) commit
[13:00] <sebersole> 5) gradle clean test uploadArtifacts
[13:01] <stliu> 4.1) tag?
[13:01] <sebersole> 6) gradle :release:buildReleaseBundles
[13:02] <sebersole> stliu: i usually tag after everything goes smooth
[13:02] <sebersole> more correct imo
@adomokos
adomokos / visitor_pattern_example.rb
Created May 24, 2011 17:28
The Visitor Pattern implementation in Ruby from the Wikipedia example
class CarElement
def accept(visitor)
raise NotImpelementedError.new
end
end
module Visitable
def accept(visitor)
visitor.visit(self)
end