Skip to content

Instantly share code, notes, and snippets.

View vegaasen's full-sized avatar
🤠
Howdy

Vegard Aasen vegaasen

🤠
Howdy
View GitHub Profile
@vegaasen
vegaasen / smallify.sh
Last active November 8, 2017 20:55
Pointless SIPS wrapping bash script that simply smallifies images (mac)
#!/bin/bash
# Simple script that performs SIPS-operations on mac. This script is created to simplify the actions in regards to sips, and also so that one dont have to
# remember what to do each time regarding the command I always tend to forget..duh..
# ENjoi!
#
# @version 0.1a
# @author vegaasen
# @since 16.11.2013
@vegaasen
vegaasen / utils.js
Created October 2, 2017 05:27
Simple/small changes to the walldisplay for Jenkins. Including profile images :)
function plural(text, count) {
if (count == 0)
{
return "";
}
else
{
return count + " " + ((count > 1) ? text + "s" : text);
}
}
@vegaasen
vegaasen / maven-sonar.md
Last active September 20, 2017 18:35
Adding SONAR to maven

Configuration

Add the following to the pom.xml-file:

 <plugins> 
	... 
	<plugin>  
	  <groupId>org.codehaus.mojo</groupId>  
	  <artifactId>sonar-maven-plugin</artifactId>  
	  <version>3.3.0.603</version> 

 

@vegaasen
vegaasen / apache-https-oam-oim.md
Last active May 23, 2017 13:01
Configure Apache HTTPd with SSL/https for OAM - OIM

Configure HTTPS OAM<->OIM

Introduction

This is a short summary on how to enable HTTPS between the two products:

  • OAM
  • OIM
@vegaasen
vegaasen / auto-deploy-with-travis.md
Created March 22, 2017 16:26
Auto-deployment with TravisCI

Auto-deployment with TravisCI

Introduction

This explains how to easily connect a repository with Travis CI and from there publish an artifact, package or whatever to a location over ssh using rsync (or any other technique in regards to transfer - such as scp).

Requirements

  • GitHub repo
@vegaasen
vegaasen / hibernate-jpa-postgres-issues.md
Created February 10, 2017 08:00
BLOBs with Postgres and Hibernate caused a lot of headace for me

The problem

It seems like mapping a LOB-type from Hibernate is not as easy as you'd think. If you're like me, you'll toss something like the following annotation to a POJO and hoping that all is fine:

@Lob
@Column(name = "picture")
private byte[] picture;

However, lo and behold - things is not as expected. Hibernate throws all kinds of fancy exceptions - such as:

@vegaasen
vegaasen / UnlockUser.java
Last active April 8, 2022 19:23
Unlock user in AD using java and UnBoundID :-)
/**
* Simplifies the process of unlocking users.
* <p>
* The AD attribute "userAccountControl" may be any of the following
* - 512 Enabled Account (normally this..)
* - 514 Disabled Account
* - 544 Enabled, Password Not Required
* - 546 Disabled, Password Not Required
* - 66048 Enabled, Password Doesn't Expire
* - 66050 Disabled, Password Doesn't Expire
@vegaasen
vegaasen / maven-sonar-plugin.md
Last active February 3, 2017 10:59
Enable sonar-plugin with properties

Maven plugin

This is placed within: pom.xml > project > build > plugins:

<plugin>

       org.codehaus.mojo        sonar-maven-plugin        2.7.1    

@vegaasen
vegaasen / CalculateOimThreads.java
Last active January 25, 2017 16:08
Use this to simplify the calculation of your OIM Oracle installation. It helped us atleast :-).
/**
* @author <a href="mailto:[email protected]">vegaraa</a>
* @version ??.10.2016
* @link https://support.oracle.com/epmos/main/downloadattachmentprocessor?attachid=1539554.1%3AOIM11GR2_TUNING&action=inline
* @link https://docs.oracle.com/cd/E52734_01/core/ASPER/oim.htm#ASPER495
*/
public class CalculateOimThreads {
private static final int NUM_DB_CPU_INSTANCES = 1;
// Look at the scheduled task in OIM
@vegaasen
vegaasen / Job.java
Last active May 23, 2017 12:53
Simple example-structure in order to illustrate how to locate all classes where a specific annotation are used
@Target({ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface Job {
String value() default "";
}