This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function arrayToTable(array $values, array $headers = []) | |
{ | |
$options = [ | |
'tableStyle' => 'border: 1px solid black;border-collapse: collapse;', | |
'thStyle' => 'border: 1px solid black;padding: 5px 7px;text-align: center;', | |
'tdStyle' => 'border: 1px solid black;padding: 5px 7px;text-align: center;', | |
]; | |
$th = "<th style='" . $options['thStyle'] . "'>"; | |
$td = "<td style='" . $options['tdStyle'] . "'>"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Base box setup steps | |
# Do the steps below as root user | |
sudo su | |
# The steps below are based on a clean install on | |
# CentOS 7 (build 1608) | |
# http://cloud.centos.org/centos/7/images/CentOS-7-x86_64-GenericCloud-1608.raw.tar.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- 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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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> |