Skip to content

Instantly share code, notes, and snippets.

View esteinborn's full-sized avatar

Eric Steinborn esteinborn

View GitHub Profile
@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>
@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.
}
/*==========================================================
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 / 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 {
@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 / 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 / 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'];
(function() {
var CSSCriticalPath = function(w, d, opts) {
var opt = opts || {};
var css = {};
var pushCSS = function(r) {
if(!!css[r.selectorText] === false) css[r.selectorText] = {};
var styles = r.style.cssText.split(/;(?![A-Za-z0-9])/);
for(var i = 0; i < styles.length; i++) {
if(!!styles[i] === false) continue;
var pair = styles[i].split(": ");
@esteinborn
esteinborn / SassMeister-input.scss
Created September 30, 2013 16:11
Generated by SassMeister.com.
// ----
// Sass (v3.2.10)
// Compass (v0.13.alpha.4)
// ----
@import "compass";
@mixin cta($color, $hover, $active) {
background-color: $color;
color: contrast-color($color, #444, #FFF, 50%);
@esteinborn
esteinborn / SassMeister-input.scss
Created September 30, 2013 19:31
Generated by SassMeister.com.
// ----
// Sass (v3.2.10)
// Compass (v0.13.alpha.4)
// ----
$icon-list: download, check, go, more, mail, pdf, search;
@function to-string($list, $glue: '', $is-nested: false) {
$result: null;
@for $i from 1 through length($list) {