Skip to content

Instantly share code, notes, and snippets.

@jonhkr
jonhkr / BootApplication.java
Created June 10, 2016 16:56 — forked from seanhinkley/BootApplication.java
spring boot + thymeleaf 3
package com.boot;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.SpringApplication;
//make sure spring boot doesn't attempt 2.1 config
@SpringBootApplication(exclude={org.springframework.boot.autoconfigure.thymeleaf.ThymeleafAutoConfiguration.class} )
public class AppApplication {
public static void main(String[] args) {
SpringApplication.run(AppSecurityApplication.class, args);
}
}
#!/usr/bin/env bash
# Colours picked from https://robinpowered.com/blog/best-practice-system-for-organizing-and-tagging-github-issues/
###
# Label definitions
###
declare -A LABELS
# Mindless
@jonhkr
jonhkr / auto-ovpn.sh
Last active August 29, 2015 14:03 — forked from lowstz/auto-ovpn.sh
Openvpn auto reconnect
#!/bin/bash
### Thanks Xream's Work XD
#
# just run: $ sudo auto-ovpn.sh config.ovpn
#
ovpn=$1
@jonhkr
jonhkr / custom.js
Last active February 5, 2016 09:33 — forked from drewjoh/custom.js
Loading Bootstrap`s modal content trough ajax with ladda loading buttons (http://lab.hakim.se/ladda/) support
$(function() {
$('[data-toggle="modal"]').on('click', function(e) {
e.preventDefault();
var url = $(this).attr('href');
if (!url.indexOf('#') == 0) {
var l = Ladda.create(this);
var modal, modalDialog, modalContent;
var flattenObject = function(ob) {
var toReturn = {};
for (var i in ob) {
if (!ob.hasOwnProperty(i)) continue;
if ((typeof ob[i]) == 'object') {
var flatObject = flattenObject(ob[i]);
for (var x in flatObject) {
if (!flatObject.hasOwnProperty(x)) continue;
@jonhkr
jonhkr / index.htm
Created June 13, 2013 19:53
Vertical aligning inline elements inside container
<div class='container'>
<span>Some text</span>
</div>