Skip to content

Instantly share code, notes, and snippets.

View trailjeep's full-sized avatar
💭
¯\_(ツ)_/¯

trailjeep

💭
¯\_(ツ)_/¯
View GitHub Profile
@trailjeep
trailjeep / README-Template.md
Last active February 1, 2019 23:16 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Description

Describe in detail functions of the code.

Prerequisites

@trailjeep
trailjeep / bash_template.sh
Created February 1, 2019 19:20 — forked from bertvv/bash_template.sh
Simple Bash script template
#!/usr/bin/env bash
#
# Script name -- purpose
#
# Author:
set -o errexit # abort on nonzero exitstatus
set -o nounset # abort on unbound variable
#
@trailjeep
trailjeep / pet-snippet.toml
Last active September 28, 2021 01:10
description
[[snippets]]
description = "Convert seconds since the epoch (1970-01-01 UTC) to a date"
command = "date -d @1440359821"
tag = ["epoch"]
output = "Sun Aug 23 15:57:01 EDT 2015"
[[snippets]]
description = "Date / timestamp as seconds since epoch"
command = "date +%s"
tag = ["timestamp", "epoch"]
@trailjeep
trailjeep / .gitconfig
Created March 27, 2019 18:03 — forked from tomster/.gitconfig
An example git configuration including convenience aliases, some saner default behavior, a neat shell prompt and tab completion that can display the name of the tracking remote
# ~/.gitconfig
[branch]
autosetupmerge = true
[push]
default = current
[core]
excludesfile = .gitignore
@trailjeep
trailjeep / BloodGlucoseTracker.md
Last active May 29, 2019 23:14
Parse Android Blood Glucose Tracker App Data To CSV

Parse Android Blood Glucose Tracker App Data To CSV

Settings -> Manual backup & Restore -> BACKUP TO FILE -> Drive -> My Drive -> data.json

Blood Glucose Readings

$ jq -r '.entries[] | "\(.date),\(.concentration),\(.event),\(.notes)"' data.json | awk -F"," '{printf "%.0f", ($1/1000); print ","$2","$3","$4}' | awk -F"," '{("date -d @"$1" +%F\" \"%I\":%M%p\"")|getline $1; print $1","$2","$3","$4}' > data.csv
$ sed -i '1s;^;Date/Time,Value,Event,Notes\n;' data.csv
/**
* Credit to Simon Laroche <https://github.com/simonlc/Markdown-CSS>
* whom created the CSS which this file is based on.
* License: Unlicense <http://unlicense.org/>
*/
.markdown p{
margin:0.75em 0;
}
/*!
* Bootstrap v3.4.1 (https://getbootstrap.com/)
* Copyright 2011-2019 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */
html {
/* remove note icon */
i.mdi.mdi-note { display: none; }
/* replace plugin icons */
img[title="View on archive.org"] { display: inline-block; -moz-box-sizing: border-box; box-sizing: border-box; width: 16px; height: 16px; padding-left: 16px; background: url('https://api.iconify.design/simple-icons:internetarchive.svg?color=%23bbb&width=16&height=16') no-repeat; }
img[title="See related links"] { display: inline-block; -moz-box-sizing: border-box; box-sizing: border-box; width: 16px; height: 16px; padding-left: 16px; background: url('https://api.iconify.design/si-glyph:connect-2.svg?color=%23bbb&width=16&height=16') no-repeat; }
/* images containers */
img.icon { max-width: 128px; max-height: 128px; margin: 1em; }
img.icon128 { max-width: 128px; max-height: 128px; margin: 1em; }
@trailjeep
trailjeep / bootstrap-markdown.css
Created April 25, 2020 22:23
Shaarli Markdown Toolbar Plugin Dark CSS (Unminified) (Ref: https://github.com/immanuelfodor/shaarli-markdown-toolbar)
.md-editor {
display: block;
border: 1px solid #888;
}
.md-editor .md-footer,
.md-editor > .md-header {
display: block;
padding: 6px 4px;
background: #333;
}