Skip to content

Instantly share code, notes, and snippets.

Henrik Oldenborg

Block or report user

Report or block Oldenborg

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@Oldenborg
Oldenborg / mathHelper.js
Last active May 14, 2019
A little script to help understand overtime math
View mathHelper.js
let effort = 0;
const standard = 37;
const potential = 45;
const diff = potential - standard;
const week = [
{
id: "monday",
standard: 8,
extra: 11,
GoTFactor: 2,
View prusa-scroll-fix.html
<a href="#" onclick="document.getElementById("block-order-detail").scrollIntoView();">This is my link text</a>
@Oldenborg
Oldenborg / triangle-of-doom.js
Created Nov 12, 2018
Example of the triangle of doom
View triangle-of-doom.js
const verifyUser = function(username, password, callback){
dataBase.verifyUser(username, password, (error, userInfo) => {
if (error) {
callback(error)
}else{
dataBase.getRoles(username, (error, roles) => {
if (error){
callback(error)
}else {
dataBase.logAccess(username, (error) => {
@Oldenborg
Oldenborg / products.vue
Last active Nov 5, 2018
NetliftyCMS prerender folders
View products.vue
<template>
...
</template>
<script>
export default {
data() {
return {
product: Object
}
View foetex-gigya-light-registration.scss
.gigya-input-checkbox {
outline: none !important;
position: absolute;
top: 0;
cursor: pointer;
}
.gigya-label {
font-weight: normal;
top: 0;
View bilka-gigya-lite-registration.scss
.gigya-input-checkbox {
outline: none !important;
position: absolute;
top: 0;
cursor: pointer;
}
.gigya-label {
font-weight: normal;
top: 0;
@Oldenborg
Oldenborg / vue.config.js
Last active Oct 2, 2018
This snippet will allow index files from the public folder to be copied to dist folder, this is nessesary in a Vue+NetlfiyCMS setup
View vue.config.js
module.exports = {
chainWebpack: config => {
config
.plugin('copy')
.use(require('copy-webpack-plugin'), [[{
from: 'public',
ignore: ['./index.html', '.DS_Store']
}]])
}
}
@Oldenborg
Oldenborg / salling-credit.php
Created Aug 6, 2018
Simple php script to calculate the payment rates of buying something with a salling group employee card.
View salling-credit.php
<?php
// Enter the price of what you want to buy.
// The employee discound will automtically get deducted.
// run the script with "php salling-credit.php"
$price = 2700;
$price = floor($price * .80);
for($i = 0; $i < 36; $i++) {
$payed = floor($price * 0.25);
if($payed > 10) {
@Oldenborg
Oldenborg / custom-vimrc
Last active Aug 28, 2019
Install a new mac
View custom-vimrc
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'
Plugin 'vim-syntastic/syntastic'
@Oldenborg
Oldenborg / diode.sass
Last active Nov 22, 2017
sass / css component to make a simple diode
View diode.sass
$block: diode
$diameter: 0.5rem
+component
width: $diameter
height: $diameter
background: $idle
display: inline-block
border: 2px solid white
margin-right: $margin_xs
You can’t perform that action at this time.