Skip to content

Instantly share code, notes, and snippets.

View mikemhenry's full-sized avatar
🌵

Mike Henry mikemhenry

🌵
View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
### Keybase proof
I hereby claim:
* I am mikemhenry on github.
* I am mmh (https://keybase.io/mmh) on keybase.
* I have a public key ASChLPeKRUw3b_MnS0vC4vqTcGnYnWnsQZzvJCIP-PAZ_Ao
To claim this, I am signing this object:
@mikemhenry
mikemhenry / curvefit.py
Created April 23, 2018 03:31
Curve fitting with python
import matplotlib
matplotlib.use('agg')
import matplotlib.pyplot as plt
import numpy as np
from scipy.optimize import curve_fit
x = np.linspace(0,100)
noise = np.random.normal(0, 2, len(x))
simulated_data = x*3 + 5 + noise
@mikemhenry
mikemhenry / .vimrc
Created April 23, 2018 19:19
Simple ~/.vimrc file
" This file controls vim settings
" Adds line numbers
set nu
" Turn on syntax highlighting
syntax on
" Tab things
set tabstop=4
set softtabstop=4
@mikemhenry
mikemhenry / install-xcode-cli-tools.sh
Last active May 1, 2021 04:17 — forked from mokagio/install-xcode-cli-tools.sh
Install Xcode CLI Tools without GUI
#!/bin/bash
# See http://apple.stackexchange.com/questions/107307/how-can-i-install-the-command-line-tools-completely-from-the-command-line
echo "Checking Xcode CLI tools"
# Only run if the tools are not installed yet
# To check that try to print the SDK path
xcode-select -p &> /dev/null
if [ $? -ne 0 ]; then
echo "Xcode CLI tools not found. Installing them..."
@mikemhenry
mikemhenry / dvplexfix.sh
Last active February 6, 2024 03:51 — forked from BluSyn/dvplexfix.sh
Converts Dolby Vision Profile 5 encoded video files into format acceptable to Plex
#!/usr/bin/env bash
origfile="$(realpath "${1}")"
basefile="$(basename "${origfile}")"
basedir="$(dirname "${origfile}")"
ext="${basefile##*.}"
newfile="$(basename -s "${ext}" "${origfile}")nodv.${ext}"
echo "Transcoding File ${basefile} in ${basedir}..."