Skip to content

Instantly share code, notes, and snippets.

View sherakama's full-sized avatar

Sherakama sherakama

View GitHub Profile
@sherakama
sherakama / DevStandards.MD
Last active April 25, 2020 20:15
Stanford Web Services Drupal Development Standards

Drupal Development Standards

by Stanford Web Services
Version: 1.0.0
Date: October 30, 2015

This document is meant to be a comprehensive guide to web development standards for Stanford Web Services around Drupal web development. This document is our canonical source and guide.

Code Standards

@sherakama
sherakama / my.cnf
Last active November 21, 2015 00:01
my.cnf for large sites
# The MySQL server
[mysqld]
key_buffer_size = 384M
max_allowed_packet = 32M
sort_buffer_size = 8M
read_buffer_size = 8M
read_rnd_buffer_size = 64M
myisam_sort_buffer_size = 64M
query_cache_size = 32M
@sherakama
sherakama / vhosts-laptop.conf
Last active May 3, 2016 17:11
vhosts for *.dev domain
#
# Virtual Hosts
#
# If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at
# <URL:http://httpd.apache.org/docs/2.2/vhosts/>
@sherakama
sherakama / stanford_jumpstart-css.patch
Created March 15, 2016 20:00
stanford_jumpstart-css.patch
diff --git a/modules/stanford_jumpstart_wysiwyg/stanford_jumpstart_wysiwyg.module b/modules/stanford_jumpstart_wysiwyg/stanford_jumpstart_wysiwyg.module
index 6e1303c..fcdf43d 100644
--- a/modules/stanford_jumpstart_wysiwyg/stanford_jumpstart_wysiwyg.module
+++ b/modules/stanford_jumpstart_wysiwyg/stanford_jumpstart_wysiwyg.module
@@ -23,7 +23,7 @@ function stanford_jumpstart_wysiwyg_wysiwyg_editor_settings_alter(&$settings, $c
$theme_default = variable_get('theme_default');
switch ($theme_default) {
case 'open_framework' :
- $settings['contentsCss'][] = url(drupal_get_path('theme', 'open_framework') . '/bootstrap/css/bootstrap.css');
+ $settings['contentsCss'][] = url(drupal_get_path('theme', 'open_framework') . '/packages/bootstrap-2.3.1/css/bootstrap.css');
@sherakama
sherakama / jsa-layouts-no-webauth.patch
Created March 15, 2016 21:02
Urban Studies JSA Layouts Patch file for build
diff --git a/modules/stanford_jsa_layouts/stanford_jsa_layouts.info b/modules/stanford_jsa_layouts/stanford_jsa_layouts.info
index 329b14a..5ff5f14 100644
--- a/modules/stanford_jsa_layouts/stanford_jsa_layouts.info
+++ b/modules/stanford_jsa_layouts/stanford_jsa_layouts.info
@@ -15,7 +15,6 @@ dependencies[] = search
dependencies[] = stanford_events_importer
dependencies[] = stanford_publication
dependencies[] = views
-dependencies[] = webauth
features[context][] = 9-col-banner-fsb-homepage
@sherakama
sherakama / webserver-start.sh
Created January 12, 2017 02:08
Fire up apache a webserver
#!/bin/bash
# Start up all webserver resources
if [ "$1" = "71" ]; then
echo "Starting with PHP 7.1"
sudo apachectl -k start -f /etc/apache2/httpd-php71.conf
fi
if [ "$1" = "70" ]; then
@sherakama
sherakama / pr-checklist.md
Last active November 29, 2022 11:05
Pull Request Checklist

When reviewing a pull request please check for the following

  • Unit Test provided
  • Does this require a behat test?
  • Deprecated code removed
  • Is all markup and styles accessible?
  • Syntax & Formatting is correct (Code Climate should take care of this)
  • Is the approach to the problem appropriate?
  • Can anything be simplified?
  • Is the code too specific to _ and needs generalization:
@sherakama
sherakama / pull-request-template.md
Last active February 23, 2017 18:12 — forked from jbickar/pull-request-template.md
Pull Request Template

READY FOR REVIEW/NOT READY

  • (Edit the above to reflect status)

Summary

  • TL;DR - what's this PR for?

Needed By (Date)

  • When does this need to be merged by?

Urgency

diff --git a/core/modules/page_cache/src/StackMiddleware/PageCache.php b/core/modules/page_cache/src/StackMiddleware/PageCache.php
index 6eb4742..ba495fd 100644
--- a/core/modules/page_cache/src/StackMiddleware/PageCache.php
+++ b/core/modules/page_cache/src/StackMiddleware/PageCache.php
@@ -283,10 +283,15 @@ protected function storeResponse(Request $request, Response $response) {
$expire = $request_time + $cache_ttl_4xx;
}
}
- else {
- $date = $response->getExpires()->getTimestamp();
@sherakama
sherakama / simplepie.compiled.php
Created November 22, 2017 22:22
simplepie.compiled.php 1.3.1
<?php
/**
* SimplePie
*
* A PHP-Based RSS and Atom Feed Framework.
* Takes the hard work out of managing a complete RSS/Atom solution.
*
* Please note: This file is automatically generated by a build script. The
* full original source is always available from http://simplepie.org/
*