Skip to content

Instantly share code, notes, and snippets.

View fabifrank's full-sized avatar

Fabian Frank fabifrank

View GitHub Profile
@fabifrank
fabifrank / remove-git-submodule
Last active February 14, 2021 16:35
Removing a git submodule is a mess... some bash script to ease the process and to make sure there's nothing left unsaved before removing.
#!/usr/bin/env bash
if [ -z "$1" ]; then
echo "Missing submodule"
exit 1
fi
sn=$1
# verify that the folder is not deleted while there are unsaved changes
#!/bin/bash
# read json entries line by line in a file and extract property of it
# usage:
# ./extract-json-prop.sh <FILENAME> <QUERY>
# example
# ./extract-json-prop.sh test.json .query.test
while IFS='' read -r line || [[ -n "$line" ]]; do
echo $line | jq "$2"
done < "$1"
@fabifrank
fabifrank / .vimrc
Last active December 31, 2018 12:20
.vimrc
if &compatible
set nocompatible
endif
set runtimepath+=/Users/skober/.cache/dein/repos/github.com/Shougo/dein.vim
if dein#load_state('/Users/skober/.cache/dein')
call dein#begin('/Users/skober/.cache/dein')