Skip to content

Instantly share code, notes, and snippets.

View blattmann's full-sized avatar
🏠
Working from home

Stefan Blattmann blattmann

🏠
Working from home
View GitHub Profile
@blattmann
blattmann / input.scss
Created April 14, 2022 19:35
Generated by SassMeister.com.
.foo {
color: blue;
text-decoration: underline;
@at-root {
p#{&} {
color: red;
text-decoration: none;
}
.bar#{&} {

If you are going to import a vehicle into the USA that was registered in Spain before

you might have to provide a translation of the Spanish title.

The title has two parts:

  • the Permiso de circulación and
  • the Tarjeta de inspección técnica del vehículos

Here's what I used to import my cars. I hope it might help you, too.

@blattmann
blattmann / auth.ts
Created February 10, 2021 05:50 — forked from AndreaMinato/auth.ts
Typescript Vuex Module
import axios, { AxiosRequestConfig } from "axios";
import router from "@/router"; //shortcut to src
import { Module } from "vuex";
const authModule: Module<any, any> = {
state: {
loggedIn: false,
loginError: null,
username: null
@blattmann
blattmann / cloudSettings
Last active February 8, 2021 06:09
VScode extensions
{"lastUpload":"2021-02-08T06:08:56.439Z","extensionVersion":"v3.4.3"}
@blattmann
blattmann / mqtt-rf.json
Last active March 26, 2020 19:44
Convert MQTT payloads in Node-RED and Home Assistant
[
{
"id": "4207226e.90885c",
"type": "tab",
"label": "SOS Band",
"disabled": false,
"info": ""
},
{
"id": "dfdca432.7e3a18",
@blattmann
blattmann / ports.md
Created October 21, 2019 09:37
List / Kill used ports on OSX

List a used port, e.g. 4000

$ lsof -i tcp:4000

Kill a used port, e.g. 4000

$ kill $(lsof -ti:4000)
@blattmann
blattmann / vuex-module-boilerplate.js
Last active August 16, 2019 06:08
Vuex Module Boilerplate
import axios from 'axios';
const state = {};
const getters = {};
const actions = {};
const mutations = {};
@blattmann
blattmann / forcedownload.vue
Last active July 19, 2019 10:50
IE11 force download
// Vue.js method to force a file download, in this example a *.jpg
forceDownload(url, fileName) {
const dlFile = fileName || url.substring(url.lastIndexOf('/') + 1);
const mimeType = 'image/jpeg';
const extension = '.jpg';
const xhr = new XMLHttpRequest();
xhr.open('GET', url, true);
xhr.responseType = 'blob';
this.trackEvent(url);
@blattmann
blattmann / osx.md
Created May 22, 2019 20:06
Solve OSX issues

restart video camera:

$ sudo killall VDCAssistant

restart mission control / dock:

$ killall Dock

restart wifi service

$ sudo ifconfig en0 up

@blattmann
blattmann / rebase.md
Last active May 31, 2019 12:16
Rebase workflow Inradius

Rebase workflow in Terminal

$ git fetch
$ git rebase origin/master

If you experience merge conflicts: