Skip to content

Instantly share code, notes, and snippets.

Eirik Brandtzæg eirikb

Block or report user

Report or block eirikb

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
@Francesco149
Francesco149 / docker-cross-device-link.md
Last active Oct 25, 2019
docker error creating new backup file '/var/lib/dpkg/status-old': Invalid cross-device link
View docker-cross-device-link.md
@eirikb
eirikb / 0-PXE-VDI-LTSP.md
Last active May 18, 2018
Host VDI / VMDK (VirtualBox images) directly over PXE (Network boot).
View 0-PXE-VDI-LTSP.md

PXE Boot VDI/VMDK over network

This is an example script of how to host VDI / VMDK (VirtualBox images) directly over PXE (Network boot).  
Example relies on LTSP.  

Client

Can be any distro, but requires ltsp-client-core, example with Debian:

sudo apt-get -y install ltsp-client-core
@eirikb
eirikb / .sassrc.js
Created Mar 15, 2018
Demo of parcel + scss
View .sassrc.js
const path = require('path');
const cwd = process.cwd();
module.exports = {
"includePaths": [
path.resolve(cwd, 'node_modules'),
path.resolve(cwd, 'src')
]
};
@eirikb
eirikb / Dockerfile
Created Aug 3, 2017
Arch Linux AUR in Docker
View Dockerfile
FROM base/archlinux
RUN pacman -Syu
RUN pacman -S --noconfirm git base-devel
WORKDIR /build
RUN useradd -d /build build-user
RUN echo "build-user ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
RUN chown -R build-user /build
@eirikb
eirikb / load-vue-components-from-folder.js
Created May 24, 2017
Load all Vue components from a given folder, no need for an "index.js"-file
View load-vue-components-from-folder.js
const req = require.context('./components/', true, /\.(js|vue)$/i);
req.keys().map(key => {
const name = key.match(/\w+/)[0];
return Vue.component(name, req(key))
});
@eirikb
eirikb / mdl-vue.js
Last active May 24, 2017
Add MDL to all elements with "mdl-js"-class in Vue
View mdl-vue.js
import 'material-design-lite'
Vue.mixin({
mounted() {
if (!this.$el || !this.$el.querySelectorAll) return;
componentHandler.upgradeElement(this.$el);
for (const el of this.$el.querySelectorAll('[class*=mdl-js-]')) {
if (!el.dataset.upgraded) {
componentHandler.upgradeElement(el);
View Arch Linux mkinitcpio: Possibly missing firmware for module.md

Problem

In Arch Linux mkinitcpio -p linux

shows

Possibly missing firmware for module: aic94xx
 Possibly missing firmware for module: wd719x
@hkoba
hkoba / sched-reboot.service
Last active Feb 9, 2019
systemd service and timer for scheduled reboot.
View sched-reboot.service
[Unit]
Description=Scheduled Reboot
[Service]
Type=simple
ExecStart=/usr/bin/systemctl --force reboot
@eirikb
eirikb / Chart.vue
Created Apr 26, 2017
Chart.js in Vue2
View Chart.vue
<template>
<canvas ref="chart"></canvas>
</template>
<script>
import chart from 'chart.js'
export default {
props: ['options', 'data'],
@eirikb
eirikb / App.vue
Last active Jan 10, 2019
Add MDL to Vue
View App.vue
<style lang="scss">
@import "~material-design-lite/material.css";
</style>
You can’t perform that action at this time.