Skip to content

Instantly share code, notes, and snippets.

View ritcheyer's full-sized avatar
🏠
Working from home

Eric Ritchey ritcheyer

🏠
Working from home
  • E&J Design
  • Lincoln, CA
View GitHub Profile
/* --- Test 1 ------------------------- */
.outer {
background-color: #f00;
width: 100px;
height: 100px;
}
.inner {
background-color: #0f0;
width: 70px;
@ritcheyer
ritcheyer / Preferences.sublime-settings
Created March 19, 2014 14:51
SublimeText 2 Settings
// SolarizedToggle.sublime-settings
{
"color_scheme_dark": "Packages/Theme - Flatland/Flatland Monokai.tmTheme",
"color_scheme_light": "Packages/Github Color Theme/GitHub.tmTheme",
"enable_theme_switching": true,
"solarized_toggle_mode": "light",
"theme_dark": "Flatland Dark.sublime-theme",
"theme_light": "AppKit.sublime-theme"
}
@ritcheyer
ritcheyer / bash.sh
Last active August 29, 2015 13:57
bash script to output whether I have changes on my branch folder or not
# Time Variables
Time12h="\T"
Time12a="\@"
# where am i?
print_before_the_prompt () {
# is this a git or hg branch?
DVCS=''
IS_GIT_BRANCH=`git branch 2> /dev/null | grep \* | awk '{print $2}'`
@ritcheyer
ritcheyer / slack.css
Last active August 29, 2015 14:01 — forked from banderson623/slack.css
.light_theme .message {
color: #fff;
font-size: 16px;
}
.message .mention {
font-weight: bold;
}
.member_preview_link,

DZSlack

What is this?

The following files add some view keybindings and other functional and styling changes to Slack when used inside of a Fluid app.

Specifically:

  1. <cmd>-number will bring you to the respective starred channel. For example, if you have 4 starred channels, <cmd-1> will bring you to the first starred channel, <cmd-2> to the second, etc.
// override the growl and use notification center
// wait 10 seconds for everything to load, then do this
setTimeout(function() {
window.fluid.showUserNotification({
title: "Loaded user script",
description: "Yep, loaded",
priority: 0,
sticky: true,
identifier: "slack-message",
});
@ritcheyer
ritcheyer / _footer.scss
Created July 8, 2014 18:40
git conflict
@ritcheyer
ritcheyer / template.php
Created July 10, 2014 19:58
Rather than have a giant if statement that is used for page-specific css and javascript, use the $path_alias provided by Drupal
// TODO: there are better ways to do this. needs research
// maybe something like this: https://www.drupal.org/project/autoload_js
$path_alias = drupal_get_path_alias($_GET["q"]);
$theme_path = $base_url . '/' . drupal_get_path('theme', 'tesla_theme');
/**
* DESCRIPTION:
* page-specific CSS added through this function based on the $path_alias
* AUTHOR: eritchey@teslamotors.com
*/
@ritcheyer
ritcheyer / script.js
Created September 11, 2014 16:49
ok so long story short, i can't use CSS and media queries to swap images as I need the sections to shrink/grow dynamically, so i created a function to switch out an image's source attribute based on page width (if less than 625px switch this, else use that). Works great save for one piece. there's a bit of a flicker when resizing the browser wh…
(function (window, document, $, Drupal) {
"use strict";
Drupal.behaviors.homepage_hero_height = {
attach: function (context) {
var allHomepageImages = $('.section-hero'),
thisHomepageImage;
window.onload = function() {
<?php
/**
* implementation of hook_panels_layouts
*/
// Plugin definition
$plugin = array(
'title' => t('Updates'),
'category' => t('Tesla minipanels'),
// 'icon' => 'default_template.png',