Skip to content

Instantly share code, notes, and snippets.

View kbrabrand's full-sized avatar

Kristoffer Brabrand kbrabrand

View GitHub Profile
@kbrabrand
kbrabrand / keybase.md
Created June 21, 2021 08:13
keybase.md

Keybase proof

I hereby claim:

  • I am kbrabrand on github.
  • I am kbrabrand (https://keybase.io/kbrabrand) on keybase.
  • I have a public key ASAkZCGhhT0cy2WT2CseSITqqGiQeaR_hzLzhgE3bIsPzAo

To claim this, I am signing this object:

{
"meta": {
"title": "Tilbygg - Bod, sykkelbod, vedbod, søppelskur",
"name": "tilbygg"
},
"schema": [
{
"id": "kartlegging",
"type": "Page",
"heading": "Om det du skal bygge",
<?php
$width = 1600;
$height = 1066;
$rotation = 37;
/**
* Takes a rectangle size (width and height) and a number of degrees to rotate
* and returns the size of a bounding box that will contain the rotated rectangle.
*/
@kbrabrand
kbrabrand / gist:01d79469e480d2fbdf79
Created October 14, 2014 18:34
50-synaptics.conf
# Example xorg.conf.d snippet that assigns the touchpad driver
# to all touchpads. See xorg.conf.d(5) for more information on
# InputClass.
# DO NOT EDIT THIS FILE, your distribution will likely overwrite
# it when updating. Copy (and rename) this file into
# /etc/X11/xorg.conf.d first.
# Additional options may be added in the form of
# Option "OptionName" "value"
#
Section "InputClass"
@kbrabrand
kbrabrand / E::REVIEW1_YES
Created September 21, 2014 23:02
INF3331 oblig 1
# Er programmene lette å forstå?
Ja. Filene er konsekvenst kommentert og formatert. Flyten i programmene er
enkel, men jeg vil likevel bemerke at den er lett å følge. Det hadde imidlertid
vært en fordel om de nummererte parametrene i bash-scriptet hadde blitt
tilordnet navnede parametre. Da hadde det blitt tydeligere hvilke parametre som
gjorde hva når UNIX-kommandoene ble kalt.
# Løser programmene problemene de skal?
Ja. Programmene gir den forventede responsen.
@kbrabrand
kbrabrand / gist:6641379
Created September 20, 2013 18:01
Multi column layout
.line {
margin-left: 20px;
}
.col {
float: left;
padding-right: 20px;
boz-sizing: border-box;
}
@kbrabrand
kbrabrand / ios-hover-fix.js
Last active December 16, 2015 01:30
Fix for hover problem on iOS devices. Removes :hover selector from the stylesheet but leaves everything else as before.
// disable :hover on touch devices
// based on http://retrogamecrunch.com/tmp/hover-fix
// via https://gist.github.com/4404503
// + https://twitter.com/javan/status/284873379062890496
// + https://twitter.com/pennig/status/285790598642946048
// re http://retrogamecrunch.com/tmp/hover
if ('createTouch' in document) {
try {
var pattern = /:hover\b/,
sheet, rule, selectors, newSelector,