Skip to content

Instantly share code, notes, and snippets.

2020: commit every day

Henrik Oldenborg

2020: commit every day
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 / how-to-not-bem.scss
Last active May 28, 2020
BEM grandchildren - yes or no?
View how-to-not-bem.scss
// Example #1
.tree__branch--green {
.twig__leaf {
color: green;
// Example #2
.tree__branch--green__twig__leaf {
color: green;
View prusa-scroll-fix.html
<a href="#" onclick="document.getElementById("block-order-detail").scrollIntoView();">This is my link text</a>
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) {
dataBase.getRoles(username, (error, roles) => {
if (error){
}else {
dataBase.logAccess(username, (error) => {
Oldenborg / products.vue
Last active Nov 5, 2018
NetliftyCMS prerender folders
View products.vue
export default {
data() {
return {
product: Object
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 => {
.use(require('copy-webpack-plugin'), [[{
from: 'public',
ignore: ['./index.html', '.DS_Store']
Oldenborg / diode.sass
Last active Nov 22, 2017
sass / css component to make a simple diode
View diode.sass
$block: diode
$diameter: 0.5rem
width: $diameter
height: $diameter
background: $idle
display: inline-block
border: 2px solid white
margin-right: $margin_xs
View mix.sass
=vendor($attribute, $value)
-webkit-#{$attribute}: #{$value}
-moz-#{$attribute}: #{$value}
-ms-#{$attribute}: #{$value}
-o-#{$attribute}: #{$value}
#{$attribute}: #{$value}
display: inline-block
+vendor(transform, rotate(#{$deg}deg))
Oldenborg / getSpecificModelRelationships.php
Last active Sep 27, 2016
Laravel - Get Model with specific relations
View getSpecificModelRelationships.php
$clinics = new Clinic;
foreach($request->modules as $module)
$clinics = $clinics->whereHas('modules', function ($query) use ($module) {
Oldenborg / global.sass
Created Sep 18, 2016
Remove antpaths from focused elements
View global.sass
// Remove antpaths from focused elements
outline: medium none !important
border: 0 none !important
Oldenborg / ToggleTrait.php
Created Sep 8, 2016
Laravel - Boolean toggle trait
View ToggleTrait.php
<?php namespace App\Traits;
trait ToggleTrait
public function toggle($values, $bool = null)
$values = [$values];
You can’t perform that action at this time.