Skip to content

Instantly share code, notes, and snippets.

View bosmievoll's full-sized avatar

Bjørn Ola Smievoll bosmievoll

View GitHub Profile

Keybase proof

I hereby claim:

  • I am smievoll on github.
  • I am bosmievoll (https://keybase.io/bosmievoll) on keybase.
  • I have a public key ASCySC9jcZwCcK3ld1vYLQsnI4uZxpCeFyiyMwJ3FxEgIAo

To claim this, I am signing this object:

<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="AntConfiguration">
<defaultAnt bundledAnt="true" />
</component>
</project>
@bosmievoll
bosmievoll / git_author_conv.sh
Created October 5, 2012 09:13
Script that updates git author/committer
#!/bin/bash
export authors_file=./author_conv_file.txt
if [ ! -f "$authors_file" ]; then
echo "Bad file: $authors_file"
exit 1
fi
git filter-branch -f --env-filter '
@bosmievoll
bosmievoll / julsan.sh
Created January 25, 2012 08:53
JUL log sanitizer
!/bin/bash
# Takes double line java.util.logging output and creates single line.
gawk -W re-interval \
'/[0-9]{2}\/[0-9]{2}\/[0-9]{4} [0-9]{2}:[0-9]{2}:[0-9]{2}:[0-9]{3} (AM|PM)/ \
{ORS=" "; print gensub(/^([^:]+:)(.*)/, "\\2 \\1", "g")}
!/[0-9]{2}\/[0-9]{2}\/[0-9]{4} [0-9]{2}:[0-9]{2}:[0-9]{2}:[0-9]{3} (AM|PM)/ \
{ORS=RS; print}' \
$1
@bosmievoll
bosmievoll / cookie.js
Created December 21, 2011 09:32
Javascript cookie extractor
@bosmievoll
bosmievoll / ADPasswordEncoder.java
Created November 22, 2011 09:09
Active Directory Password Encoder
package no.smievoll.ad;
import javax.naming.directory.BasicAttribute;
import java.util.List;
public class ADPasswordEncoder {
private static byte[] generatePasswordByteArray(String clearTextPassword) throws UnsupportedEncodingException {
/* NB: AD requires password string to be quoted. */