Skip to content

Instantly share code, notes, and snippets.

View esteinborn's full-sized avatar

Eric Steinborn esteinborn

View GitHub Profile
@esteinborn
esteinborn / preventminificationerrors.js
Created August 28, 2013 13:17
Prevent errors from minification of Angular JS From: http://docs.angularjs.org/tutorial/step_05
myAppCtrl.$inject = ['$scope', '$http'];
@esteinborn
esteinborn / Useful Head Tags
Last active December 21, 2015 07:49 — forked from brianblakely/gist:581868
Helpful Head Tags
<!DOCTYPE html>
<!-- Helpful things to keep in your <head/>
// Brian Blakely, 360i
// http://twitter.com/brianblakely/
-->
<head>
<!-- Disable automatic DNS prefetching.
@esteinborn
esteinborn / drupal tab love
Created August 2, 2013 19:17
drupal tab love from Adam
ul.primary {
list-style: none;
margin: 5px;
height: auto;
border: none;
padding: 0 0 0 1em;
line-height: normal;
}
ul.primary li {
@esteinborn
esteinborn / gist:6142592
Created August 2, 2013 19:17
drupal tab love from Adam
ul.primary {
list-style: none;
margin: 5px;
height: auto;
border: none;
padding: 0 0 0 1em;
line-height: normal;
}
ul.primary li {
/*==========================================================
Open Sans
==========================================================*/
@font-face {
font-family: 'OpenSans';
src: url('../fonts/OpenSans-Light-webfont.eot');
src: url('../fonts/OpenSans-Light-webfont.eot?#iefix') format('embedded-opentype'),
url('../fonts/OpenSans-Light-webfont.woff') format('woff'),
url('../fonts/OpenSans-Light-webfont.ttf') format('truetype'),
@esteinborn
esteinborn / if token equals literal token string value
Created July 16, 2013 17:35
Check for the actual string of a non-existent node token value in Drupal for auto_node_titles
<?php
$part = '[node:field_episode_part]'; // First we assign the tokenized value to a new PHP variable
$partstring = '[node:' . 'field_episode_part]'; // Sometimes, especially when you are running a mass-update, you need to check for the literal string value, but you need to split it up in order for token to not intercept the value
if((empty($part)) || ($part == $partstring)) { // Next, we check if that new variable is an empty string OR it equals the literal token string value
return; // It is good form to return, even if your code returns no value.
} else {
return " (Part " . $part . ")"; // The formatted string that will be returned.
}
@esteinborn
esteinborn / Cowboy - Presentation.tmTheme
Created December 3, 2012 15:54 — forked from cowboy/Cowboy - Presentation.tmTheme
Sublime / TM theme I use for presentations.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>author</key>
<string>Jacob Rus</string>
<key>comment</key>
<string>Created by Jacob Rus. Based on ‘Slate’ by Wilson Miner</string>
<key>name</key>
<string>Cowboy - Presentation</string>