Skip to content

Instantly share code, notes, and snippets.

View johnny5th's full-sized avatar

Johnny Martin johnny5th

View GitHub Profile
export default class MessageStats {
constructor (message = null) {
// Constraints
this.constraints = {
byteCount1: "",
byteCount2: "",
minPlateNumberByteCount: "",
maxPlateNumberByteCount: ""
};
[10/20/16, 4:23:56 PM] Johnny Martin: so. web hosting. I looked at your site and I assume those prices are single-tenant non-agency?
[10/20/16, 4:24:07 PM] Michael Vogt: Correct
[10/20/16, 4:24:16 PM] Michael Vogt: How we operate is pretty different from a normal hosting company
[10/20/16, 4:24:20 PM] Johnny Martin: ok
[10/20/16, 4:24:34 PM] Michael Vogt: We are fully hands-on, we manage our clients website in their entirety
[10/20/16, 4:24:50 PM] Michael Vogt: We focus on cyber security as well as high-performance.
[10/20/16, 4:25:03 PM] Johnny Martin: great. do you do any PCI work?
[10/20/16, 4:25:16 PM] Michael Vogt: Our platform is PCI compliant
[10/20/16, 4:25:31 PM] Michael Vogt: We tie directly into CloudFlare as well, utilizing their RailGun technology
[10/20/16, 4:25:37 PM] Johnny Martin: can you manage the audits and virus scans if required?
<?php
// Check if actual video data is there
if(isset($video_data['video_id'])) {
# We have to manually define our embed code, as the players and module
# are not consistent enough to access with a single variable set/call
$video_embed = "http://player.vimeo.com/video/" . $video_data['video_id'] . "?html5=1&autoplay=1&badge=0&byline=0&title=0&api=1";
# We are going to use Javascript and CSS to do all of the fancy video
# showing/hiding - CSS contains all of the active styles
// Video Thing
$('.video-button').click(function() {
var video = $(this).data("video");
var source = $(this).data("source");
var iframe = $('<iframe scrolling="no" src="' + video + '" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>');
var wrapper = $('<div class="iframe-wrapper"></div>');
var video_box = $(this).parents('.video-box');
// Add iframe wrapper to main container
video_box.append(wrapper);
<?php
// Add overview link to navbar children
function main_menu_block_tree_alter(&$tree, &$config) {
// Header Menu Block
if($config['delta'] == 1) {
foreach($tree as &$menu_item) {
// Add overview link
if(!empty($menu_item['below'])) {
// Title of the new link
$ cat scripts/karma.coffee
# Description:
# Track arbitrary karma
#
# Dependencies:
# None
#
# Configuration:
# KARMA_ALLOW_SELF
#
.top .left-content .content {
h2 {
color: $color_peach;
font-size: em(26);
font-family: $alt-font-family;
font-weight: bold;
font-style: italic;
margin: em(30,26) 0;
letter-spacing: -.5px;
// if $context is true, switch to rem
@function em($px, $context-or-rem: $base-font-size) {
@if($context-or-rem == true) {
@return $px / strip_unit($base-font-size) * 1rem;
} @else {
@return $px / strip_unit($context-or-rem) * 1em;
}
}
/// Remove the unit of a length
---
- name: Check if site is already installed.
command: >
{{ drush_path }} status bootstrap
chdir={{ drupal_core_path }}
register: drupal_site_installed
failed_when: "drupal_site_installed.stdout is undefined"
changed_when: false
become: no
@johnny5th
johnny5th / dropdown_click.js
Created May 12, 2016 14:38
Drupal subnav dropdown click code
$('.menu-button').click(function() {
$('.nav-bar .menu-block-wrapper').toggleClass('open');
});
var deep_links = $('.nav-bar .menu-block-wrapper li.is-expanded');
$('> a', deep_links).click(function() {
// Hide other open menus on desktop
if(isScreen("desktop")) {
$(this).parent().siblings().find('> a, ul').removeClass('activemenu');