Skip to content

Instantly share code, notes, and snippets.

View aprohl5's full-sized avatar

Austin Prohl aprohl5

  • Acquia
  • Boise, ID
View GitHub Profile
@aprohl5
aprohl5 / 0_reuse_code.js
Created January 20, 2016 17:19
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@aprohl5
aprohl5 / comments.html
Created February 17, 2015 21:22
D8 Comment output
<section>
<h2>Comments</h2>
<a id="comment-44736"></a>
<!-- THEME DEBUG -->
<!-- THEME HOOK: 'comment__comment__news' -->
//Completely changing the book tree markup
function mskcc_preprocess_book_tree(&$variables) {
//strings in need of insertion
$replacementBeginning = '<li class="left-navigation__item"><a class="left-navigation__item__link" ';
$replacementMiddle = '<span class="left-navigation__item__link__txt">';
$replacementEnd = '</span><span class="arrow-right"></span></a></li>';
//split up the block by link for easy loop through
$tree_array = explode("\n", $variables['tree']);
@aprohl5
aprohl5 / output.txt
Last active August 29, 2015 14:14
apacheDeath
( ! ) Warning: include(/Users/aprohl/sites/mskcc/mskcc_deploy/core/lib/Drupal/Core/Logger/RfcLogLevel.php): failed to open stream: Too many open files in /Users/aprohl/sites/mskcc/mskcc_deploy/core/vendor/composer/ClassLoader.php on line 385
Call Stack
# Time Memory Function Location
1 0.0043 248456 {main}( ) ../index.php:0
2 0.0180 1697640 Drupal\Core\DrupalKernel->handle( ???, ???, ??? ) ../index.php:24
3 0.0384 5108272 Drupal\Core\DrupalKernel->getHttpKernel( ) ../DrupalKernel.php:585
4 0.0384 5108376 Drupal\Core\DependencyInjection\Container->get( ???, ??? ) ../DrupalKernel.php:1167
5 0.0384 5108880 Symfony\Component\DependencyInjection\Container->get( ???, ??? ) ../Container.php:21
6 0.0384 5109480 service_container_prod->getHttpKernelService( ) ../Container.php:326
@aprohl5
aprohl5 / pager.html
Created January 30, 2015 17:59
d8 pager output
<nav class="pager" role="navigation" aria-labelledby="pagination-heading">
<h4 id="pagination-heading" class="visually-hidden">Pagination</h4>
<ul class="pager__items">
<li class="pager__item is-active">
<a href="/admin/content/doctors?title=&amp;body=&amp;affiliation=&amp;status=1&amp;keys=" title="Current page">
<span class="visually-hidden">
Current page
</span>1</a>
</li>
<li class="pager__item">
@aprohl5
aprohl5 / yaml_form.html
Created January 21, 2015 20:14
example msk yaml form
<div class="node__content">
<form id="yamlform-100248" class="yamlform" enctype="multipart/form-data" action="/test-form/form" method="post" accept-charset="UTF-8">
<details id="edit-contact-information" class="form-wrapper" open="open"><summary role="button" aria-controls="edit-contact-information" aria-expanded aria-expanded>Contact Information</summary><div class="details-wrapper"><div class="form-item form-type-textfield form-item-first-name">
<label for="edit-first-name" class="form-required">First Name</label>
<input type="text" id="edit-first-name" name="first_name" value="" size="60" maxlength="255" class="form-text required" required="required" aria-required="true" />
</div>
<div class="form-item form-type-textfield form-item-last-name">
<label for="edit-last-name" class="form-required">Last Name</label>
<input type="text" id="edit-last-name" name="last_name" value="" size="60" maxlength="255" class="form-text required" required="required" aria-required="true
@aprohl5
aprohl5 / gist:1884d023ba34c6fe315f
Created November 15, 2014 01:00
preprocess block stuff
function mti_theme_preprocess_block(&$vars) {
switch ($vars['elements']['#block']->delta) {
case 'main_callboard':
die(print_r($vars));
break;
}
}
@aprohl5
aprohl5 / html
Last active August 29, 2015 14:09
bullets
<!DOCTYPE html>
<!--[if lt IE 7 ]> <html class="lt-ie10 lt-ie9 lt-ie8 lt-ie7 ie6" lang="en" xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" dir="ltr"> <![endif]-->
<!--[if IE 7 ]> <html class="lt-ie10 lt-ie9 lt-ie8 ie7" lang="en" xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" dir="ltr"> <![endif]-->
<!--[if IE 8 ]> <html class="lt-ie10 lt-ie9 ie8" lang="en" xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" dir="ltr"> <![endif]-->
<!--[if IE 9 ]> <html class="lt-ie10 ie9" lang="en" xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" dir="ltr"> <![endif]-->
<!--[if (gte IE 9)|!(IE)]><!--> <html lang="en" xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" dir="ltr"> <!--<![endif]-->
<!--html.tpl.php-->
@aprohl5
aprohl5 / ampersand_functionality
Created September 5, 2014 16:56
this an ampersand question
.front {
.header-container {
background-image: url("../images/screw.jpg");
height:400px;
background-attachment: fixed;
background-position: 0% 0%;
background-repeat: no-repeat;
background-size: cover;
@include breakpoint(1px 499px) {
@aprohl5
aprohl5 / textlimit
Created August 29, 2014 22:46
Changing a char limit on text in Drupal DB
Example: ALTER TABLE `field_data_field_test_field` CHANGE `field_test_field_value` `field_test_field_value` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL