Skip to content

Instantly share code, notes, and snippets.

@jakebathman
jakebathman / Self-signed cert bash commands
Last active November 25, 2016 15:48
Add self-signed certificate for nginx server
##########
#
# Replace full.domain.com with your domain
#
# This is tested on CentOS 6.x, but might work similarly on other OS installations
#
##########
# Generate a key
openssl genrsa -out "/etc/nginx/ssl/full.domain.com.key" 2048
@jakebathman
jakebathman / helper.js
Last active March 1, 2017 14:26
Data.Medicare.Gov helper script
// ==UserScript==
// @name Helper for data.medicare.gov
// @namespace http://tampermonkey.net/
// @version 0.2.1
// @description Ctrl+click copy and more
// @author Jake Bathman
// @downloadURL https://gist.githubusercontent.com/jakebathman/8d2ca9a798e4f3e83baefda2ffc22b32/raw
// @include https://data.medicare.gov/Home-Health-Compare*
// @include https://data.medicare.gov/Hospital-Compare*
// @grant GM_setClipboard
@jakebathman
jakebathman / create_new_user.sh
Created March 13, 2017 19:21
Create a new user on CentOS 7 and prep for SSH
#!/bin/bash
# The new user's username (prompt for input)
# Will be stored in variable newUserName
echo -e "\e[92mWhat username should be created? Please Enter:\e[37m"
read -p "Enter new username (no spaces): " newUserName;
echo -e "\n\e[92mNew user will be called: ${newUserName}\e[37m\n"
# Create new user
echo -e "\e[92mCreating the new user as ${newUserName}\e[37m"
@jakebathman
jakebathman / Grouping rules
Last active April 6, 2017 15:38
A method to group things, using an astronomical metaphor
General rules:
1. There is no limit to the number of objects contained in another
2. There are no smaller/larger versions of objects (i.e. no dwarf planet)
3. An object is not required to contain other objects, nor is it required to be contained by another object (i.e. a planet can exist on its own, without naming a system)
4. This metaphor does not acknowledge the existence of the multiverse.
Rules for grouping:
1. The default unit is a planet
2. Planets can belong to a system
3. Systems can belong to a star cluster
@jakebathman
jakebathman / yum.conf
Created August 10, 2017 15:58
Yum.conf default color options (CentOS 7)
# Add these lines to /etc/yum.conf if the --color=always option isn't working
# Enable color for all output
color=always
# Default color options according to yum.conf(5)
color_list_installed_older=bold
color_list_installed_newer=bold,yellow
color_list_installed_reinstall=normal
color_list_installed_extra=bold,red
@jakebathman
jakebathman / SQL.sublime-syntax
Created August 11, 2017 20:47
Update SQL syntax parsing for Sublime Text 3
# This file is used by Sublime Text 3 to parse code using the SQL syntax.
#
# Below is unchanged from the default, except for a few modifications:
# - Adjusted regex for alias (... AS Foo) to match the alias name as keyword.other.alias-name.sql
# - Fixed regex for table/column name when the name is wraped in backticks or an asterisk (e.g. Foo.`Bar` or Foo.*)
#
%YAML 1.2
---
name: SQL
@jakebathman
jakebathman / readme.md
Last active September 6, 2017 21:41
A list of HH QRP agencies in exempted counties from Hurricane Harvey

Hurricane Harvey QRS Exemptions

The list below (in three different formats) are for Home Health Agencies whose ZIP code intersects with one of the exempted counties or parishes in Texas and Louisians, as determined by CMS.

Full information about the exemption is here: https://www.cms.gov/Medicare/Quality-Initiatives-Patient-Assessment-Instruments/Hospice-Quality-Reporting/Downloads/2017-121-IP-Quality-Program-Exemptions-for-FEMA-Texas-Louisiana-Provider.pdf

Additional updates on Hurricane-related exemptions is being posted by CMS here: https://www.cms.gov/About-CMS/Agency-Information/Emergency/Hurricanes.html

The agency data was pulled on September 6th, 2017 from the CMS website here: https://data.medicare.gov/Home-Health-Compare/Home-Health-Care-Agencies/6jpm-sxkc

@jakebathman
jakebathman / IDLE-ish Dark.tmtheme
Last active October 11, 2017 14:26
Custom dark theme for Sublime Text 3
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>author</key>
<string>Jake Bathman</string>
<key>name</key>
<string>IDLE-ish Dark</string>
<key>settings</key>
<array>
@jakebathman
jakebathman / .bashrc
Last active October 17, 2017 18:35
Useful bash aliases or commands
# Parse the ifconfig return for IPs (IPv4 and IPv6) and display them nicely according to adapter
# Yes, it's overkill.
# Yes, it murders regular expressions for no reason.
# Yes, it's not necessary to use this.
# This has been tested on CentOS 6/7, and relies on grep's Perl regex matching
alias myip='ifconfig | grep -o --color=always -P "(^([A-Za-z0-9]+)\:?)|(inet|inet6)\s*(?:addr:?)?\s*((\d{1,3}\.){3}\d{1,3}|((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])(\.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])(\.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])(\.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-
@jakebathman
jakebathman / .tmux.conf
Last active December 14, 2017 17:16
Customizing tmux
# Many of these customizations are from
# http://www.hamvocke.com/blog/a-guide-to-customizing-your-tmux-conf/
# remap prefix from 'C-b' to 'C-a'
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
# split panes using | and -
bind | split-window -h