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 / Git: Empty branch.md
Last active October 9, 2023 22:40
Git: Create empty branch

Replace empty-branch with your desired branch name.

git checkout --orphan empty-branch

Then you can remove all the files you'll have in the staging area (so that they don't get committed):

git rm -rf .

At this point you have an empty branch, on your machine.

@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 / facebookInvite.md
Last active March 9, 2021 10:18
Invite Facebook friends
@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 / definition-of-done.md
Last active October 11, 2019 06:28
Definition of Done example

Definition of Done

General

  • Full compliant to the given Design Style guide
  • No lintin errors
  • Commit message follows Guidelines
  • Component looks like the designs
  • All the variations of the component are done (e.g. different viewports)
  • There are no @TODOs and commented code except short code information / documentation (only master branch)

Mac OSX fresh setup for Front End Developers

General setup

Lines starting with $ mean: You have to paste that stuff in your terminal and execute it (without the $ sign)

  • Display hidden files and folders: $ defaults write com.apple.finder AppleShowAllFiles TRUE;killall Finder
  • Always show Library folder: $ chflags nohidden ~/Library/

Homebrew

  • Install Homebrew: $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"