Skip to content

Instantly share code, notes, and snippets.

View tschueller's full-sized avatar

Thorsten Schüller tschueller

  • ip.labs GmbH
  • Bonn, Germany
View GitHub Profile
@tschueller
tschueller / bottom-align.html
Last active August 29, 2015 14:27
Alining elements to bottom
<div id="container" style="">
<div class="bottom_div" style="">1</div>
<div class="bottom_div" style="display: none">2</div>
<div class="bottom_div" style="">3</div>
<div class="bottom_div" style="">4</div>
</div>
@tschueller
tschueller / 2colunns.html
Created October 9, 2014 19:23
2 columns page layout with CSS
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>2 Columns Page Layout</title>
<style type="text/less">
@col1BGColor: #dad09a;
@col1Width: 200px;
@tschueller
tschueller / sortArrayByAnotherArray.js
Created August 22, 2012 07:49
Sort a javascript array by the order of an other array
var arrayToSort = ["z", "a", "c", "f", "e", "d" ];
var sortOrder = ["a", "b", "c", "d", "e"];
arrayToSort.sort(function(a,b) {
var sa = sortOrder.indexOf(a);
var sb = sortOrder.indexOf(b);
if (sa == -1) return 1;
if (sb == -1) return -1;
return sa < sb ? -1 : 1;
});
@tschueller
tschueller / base-template.html
Last active March 27, 2024 10:24
Simple HTML template with jQuery support.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<link rel="stylesheet" type="text/css" href="./default.css" />
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script type="text/javascript">
jQuery(function() {
// Document is ready