Skip to content

Instantly share code, notes, and snippets.

View tsmith512's full-sized avatar

Taylor Smith tsmith512

  • Cloudflare
  • Austin, Texas & Tulsa, Oklahoma
View GitHub Profile
@tsmith512
tsmith512 / backtrace-errors-bootstrap.inc.patch
Created April 30, 2013 16:19
Quick-n-dirty patch to Drupal 7 bootstrap to examine backtraces on error messages. Requires devel enabled.
diff --git a/includes/bootstrap.inc b/includes/bootstrap.inc
index fe3d7a7..c2c95cc 100644
--- a/includes/bootstrap.inc
+++ b/includes/bootstrap.inc
@@ -1794,6 +1794,11 @@ function watchdog($type, $message, $variables = array(), $severity = WATCHDOG_NO
*/
function drupal_set_message($message = NULL, $type = 'status', $repeat = TRUE) {
if ($message) {
+
+ if ($type == 'error') {
@tsmith512
tsmith512 / SassMeister-input-HTML.html
Created December 15, 2015 19:40
Generated by SassMeister.com.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<section>
<aside>Howdy</aside>
<aside>Howdy</aside>
@tsmith512
tsmith512 / SassMeister-input-HTML.html
Created March 26, 2015 20:55
Generated by SassMeister.com.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<div id="container">
<div class="item1">&nbsp;</div>
<div class="item2">&nbsp;</div>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<h1>Related Content</h1>
<div class="view-related-content">
<div class="item">Test</div>
@tsmith512
tsmith512 / SassMeister-input.scss
Last active August 29, 2015 14:16
Proposal for a better rtl() mixin that takes a class name
// ----
// Sass (v3.4.12)
// Compass (v1.0.3)
// ----
@mixin rtl($class: '') {
#{'html[dir="rtl"]' + $class} & {
@content;
}
}
@tsmith512
tsmith512 / SassMeister-input-HTML.html
Last active August 29, 2015 14:15
Examples for Presentation: Advanced Responsive Web Design Part 6: Toolkit
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<main>
<h1>16:9 ratio</h1>
@tsmith512
tsmith512 / SassMeister-input.scss
Last active August 29, 2015 14:15
Examples for Presentation: Advanced Responsive Web Design Part 5B: Using different grids at different min-widths with Breakpoint
// ----
// Sass (v3.4.12)
// Compass (v1.0.3)
// Breakpoint (v2.5.0)
// Singularity Extras (v1.0.0)
// Singularity.gs (v1.5.1)
// ----
/**
* Examples for Presentation: Advanced Responsive Web Design
@tsmith512
tsmith512 / SassMeister-input-HTML.html
Last active August 29, 2015 14:15
Examples for Presentation: Advanced Responsive Web Design Part 5C: Overriding the global context with layout()
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<div id="container">
<span>Container</span>
<div id="main">
@tsmith512
tsmith512 / SassMeister-input-HTML.html
Last active August 29, 2015 14:15
Examples for Presentation: Advanced Responsive Web Design Part 5A: Asymmetric Grid Samples with Singularity Extras
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<h1>General Asymmetric Grid</h1>
<div id="asymmetric-general">&nbsp;</div>
@tsmith512
tsmith512 / SassMeister-input-HTML.html
Last active August 29, 2015 14:15
Examples for Presentation: Advanced Responsive Web Design Part 4: Basic Intro to Singularity, Box-Sizing, Comparison to 960gs
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<div id="container">
<div class="left">Left Column</div>
<div class="right">Right Column</div>