Skip to content

Instantly share code, notes, and snippets.

Jake Bathman jakebathman

Block or report user

Report or block jakebathman

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@jakebathman
jakebathman / icd_regex.md
Last active Oct 8, 2019
ICD-9 and ICD-10 code regex
View icd_regex.md

ICD code matching regex

The regex patterns below only help validate when something is not valid ICD-10 or ICD-9. They do not ensure that the code exists. You should consult a list of valid ICD codes for that level of verification.

ICD-10-CM list: https://gist.github.com/jakebathman/063c50cb9772e4bfc864a9e1ff4ccc8d

ICD-9 list: https://gist.github.com/jakebathman/f1ed0d473f12091a708243b0ddf03d82

ICD-10/ICD-9 combined regex

Useful for validating field values that could contain both, and may or may not use decimals

@jakebathman
jakebathman / logslaravel.sh
Created Aug 19, 2018
Tail Laravel logs and filter out the stack traces
View logslaravel.sh
tail -f -n 450 storage/logs/laravel*.log \
| grep -i -E \
"^\[\d{4}\-\d{2}\-\d{2} \d{2}:\d{2}:\d{2}\]|Next [\w\W]+?\:" \
--color
@jakebathman
jakebathman / StateBoundaries.sql
Last active Jul 8, 2019
The approximate max/min latitude and longitude for all states and major territories
View StateBoundaries.sql
-- Create the table
CREATE TABLE IF NOT EXISTS `StateBoundaries` (
`State` varchar(10) DEFAULT NULL,
`Name` varchar(255) DEFAULT NULL,
`MinLat` varchar(50) DEFAULT NULL,
`MaxLat` varchar(50) DEFAULT NULL,
`MinLon` varchar(50) DEFAULT NULL,
`MaxLon` varchar(50) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
@jakebathman
jakebathman / jsonToCsv.php
Last active Jun 21, 2019 — forked from Kostanos/json-to-csv.php
A function to convert a JSON string (or a PHP array) to a CSV file or CSV string echoed to the browser
View jsonToCsv.php
<?php
/*
*
* Based on (forked from) the work by https://gist.github.com/Kostanos
*
* This revision allows the PHP file to be included/required in another PHP file and called as a function, rather than focusing on command line usage.
*
* Convert JSON file to CSV and output it.
*
* JSON should be an array of objects, dictionaries with simple data structure
@jakebathman
jakebathman / remove_laravel_comments.php
Last active May 17, 2019
Remove comments from fresh Laravel files
View remove_laravel_comments.php
<?php
/*
|--------------------------------------------------------------------------
| Remove Laravel Comments
|--------------------------------------------------------------------------
|
| Just made a new Laravel project, but don't want all those big
| comment blocks? Put this in the root of your project and run
| "php remove_laravel_comments.php"
|
@jakebathman
jakebathman / icd-10-cm.txt
Last active May 12, 2019
ICD-10-CM codes
View icd-10-cm.txt
A00
A00.0
A00.1
A00.9
A01
A01.0
A01.00
A01.01
A01.02
A01.03
@jakebathman
jakebathman / gist:37ad72ff16c1f3c65dfabc24bfd53b11
Created May 8, 2019
A new gist, that should get first-party notifications for comments
View gist:37ad72ff16c1f3c65dfabc24bfd53b11
Just a quick test! Hopefully comments work.
@jakebathman
jakebathman / dssh.sh
Last active May 8, 2019
"SSH" into one of your running docker containers
View dssh.sh
#! /bin/bash
## Setup note:
## Add execution permissions to this file using:
## chmod u+x dssh.sh
unset options i o
opt=( $(docker ps --format '{{.Names}}' | sort | awk '{print v++,$1}') )
# Show the user a list of containers to pick from
@jakebathman
jakebathman / icd-9-cm.txt
Last active Apr 3, 2019
ICD-9-CM code list
View icd-9-cm.txt
0010
0011
0019
0020
0021
0022
0023
0029
0030
0031
@jakebathman
jakebathman / karabiner.json
Created Mar 20, 2019
Karabiner rule for double-press left shift -> caps lock
View karabiner.json
{
"description": "Double left shift to caps_lock",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "left_shift",
"modifiers": {
"optional": ["any"]
}
You can’t perform that action at this time.