Skip to content

Instantly share code, notes, and snippets.

View garyvdm's full-sized avatar

Gary van der Merwe garyvdm

  • Johannesburg, South Africa
View GitHub Profile
@Someguy123
Someguy123 / cmdline.sh
Created November 24, 2020 00:18
Linux Kernel Commandline ( /proc/cmdline ) Parsing Shellscript ( bash sh zsh dash ash ksh ) Functions
#!/usr/bin/env bash
############################################################################################
# Linux Kernel Commandline Parsing Shellscript Functions
#
# These functions have been written in a way that they should be compatible
# with almost any "standard" UNIX/Linux shell, including: sh, bash, ash, dash, zsh
#
# They are designed to be sourced from (or copy pasted into) another shellscript,
# and used to parse / query the Linux kernel commandline ( /proc/cmdline ), or strings
# which use a similar key=value format.
#!/usr/bin/python
# https://timwise.co.uk/2014/02/03/converting-kml-to-gpx-with-python/
# https://gist.github.com/timabell/8791116
import argparse
import xml.sax
parser = argparse.ArgumentParser(description='Convert annoying google android my tracks kml data to sensible gpx files')
parser.add_argument('input_file')
#!/usr/bin/env python3
#
# Dumb script to dump (some) of bcache status
# Copyright 2013 Darrick J. Wong. All rights reserved.
#
# This file is part of Bcache. Bcache is free software: you can
# redistribute it and/or modify it under the terms of the GNU General Public
# License as published by the Free Software Foundation, version 2.
#
# This program is distributed in the hope that it will be useful, but WITHOUT