Skip to content

Instantly share code, notes, and snippets.

View johnny5th's full-sized avatar

Johnny Martin johnny5th

View GitHub Profile
Date Refining Demand Basin Centurion W. Texas Gulf Amdel Longhorn BridgeTex Permian Express II Cactus PELA BridgeTex Expansion Cactus Expansion Midland-Sealy Permian Express III Basin/Sunrise Exp. Cactus II Gray Oak EPIC Permian Gulf Coast Seminole Conversion (Midland-Echo II) Wink to Webster Takeaway Capacity Planned Capacity Production History RBN Prod. Forecast
1/1/10 400 450 200 260 40 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1255 0 886
2/1/10 400 450 200 260 40 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1255 0 907
3/1/10 400 450 200 260 40 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1255 0 908
4/1/10 400 450 200 260 40 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1255 0 902
5/1/10 400 450 200 260 40 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1255 0 911
6/1/10 400 450 200 260 40 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1255 0 904
7/1/10 400 450 200 260 40 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1255 0 918
8/1/10 400 450 200 260 40 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1255 0 923
9/1/10 400 450 200 260 40 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1255 0 931
@johnny5th
johnny5th / svg_img_load.js
Created September 19, 2018 19:22
SVG Image Loading
// SVG Masked Images
var masked_images = document.querySelectorAll('.svg-masked-image');
var changeHref = function(path, img_wrapper) {
var image = img_wrapper.querySelector('svg g image');
image.setAttributeNS('http://www.w3.org/1999/xlink', 'xlink:href', path);
};
for(let i = 0; i < masked_images.length; i++) {
let img = masked_images[i].querySelector('img');
@johnny5th
johnny5th / MY_MODULE.module.php
Last active June 20, 2018 20:33
Adds a specific value validation to Webform
<?php
/**
* Implements hook_form_FORM_ID_alter().
*
* Adds specific value requirement form elements.
*/
function etbu_core_form_alter(&$form, FormState $form_state, $form_id) {
// Only alter webform UI element forms.
if ($form_id === 'webform_ui_element_form') {
<?php
namespace Drupal\my_module\Plugin\Block;
use Drupal\Core\Block\BlockBase;
/**
* Provides a 'HomeHeader' block.
*
* @Block(
@johnny5th
johnny5th / menu--main-sub.html.twig
Created March 13, 2018 22:26
Header Menu Block
{% include "@molecules/menus/main-sub-menu/main-sub-desktop-menu.twig" %}
@johnny5th
johnny5th / web-developer.md
Last active October 12, 2017 17:34
Full Stack/Front-End Web Developer

Encore Multimedia, a leading full-service marketing agency in East Texas, is looking for a Full-Stack/Front-End Web Developer to join our team. Encore's Web Department is a crucial part of our organization, responsible for creating modern, unique, and attractive online presences for our customer's marketing needs. The ideal candidate for this position is a hands-on professional with strong knowledge of front end development and content management platforms, and an ability to translate our customer's business needs into client-friendly functions that will expand their website’s influence in their industry. The Web Developer will aid our team in the architecting, creation, and maintenance of web sites and applications for our ever-growing list of customers.

Previous experience

Understands key web development concepts through experiences such as:

  • Interpreting graphic visual or interaction designs in HTML, CSS and JavaScript.
  • Creating visually appealing web pages or interfaces.

Drupal Site Building with Paragraphs

Table of Contents

  1. The problem with static-fielded CMS's
  2. Intro to Drupal
  3. Installation
  4. Entities
  5. Bundles
#!/bin/bash
# @author: Johnny Martin
# Created: 24/02/2017
MYSQL_USER="XXXXXX"
MYSQL_PASS="XXXXXX"
for ACCOUNT_PATH in /home/*/ ; do
ACCOUNT=$(basename "$ACCOUNT_PATH")
<?xml version="1.0"?>
<customers>
<customer name="" contact_email="" contact_name="" contact_phone="">
<websites>
<website name="Test Site" server="Boba" billing_rate="" billing_frequency="Annual">
<passwords>
<password name="" user="" password="" url="" />
</passwords>
<domains>
<domain ref="bob.com" />
<?php
namespace Drupal\hosting_management\Form;
use Drupal\Core\Entity\ContentEntityForm;
use Drupal\Core\Form\FormStateInterface;
use Drupal\message\Entity\Message;
/**
* Form controller for Customer edit forms.