Skip to content

Instantly share code, notes, and snippets.

View dmackerman's full-sized avatar

Dave Ackerman dmackerman

  • Kentik Technologies - @kentik
  • Tempe, AZ
View GitHub Profile
@dmackerman
dmackerman / ComboBoxJson.js
Created August 5, 2011 21:29
Custom ComboBox class
Ext.ns('IbwUi.controls');
IbwUi.controls.ComboBoxJSON = Ext.extend(Ext.form.ComboBox, {
url: '',
root: '',
valueField: 'id',
displayField: 'name',
listWidth: 200,
width: 200,
function updateControls() {
var routes = availableRoutes();
// Remove the 'enabled' class from all directions
[ dom.controlsLeft, dom.controlsRight, dom.controlsUp, dom.controlsDown ].forEach( function( node ) {
node.classList.remove( 'enabled' );
} )
if( routes.left ) dom.controlsLeft.classList.add( 'enabled' );
if( routes.right ) dom.controlsRight.classList.add( 'enabled' );
@dmackerman
dmackerman / availRoutes.js
Created December 21, 2011 20:09
availableRoutes() function to determine where we can go.
function availableRoutes() {
var horizontalSlides = document.querySelectorAll(HORIZONTAL_SLIDES_SELECTOR);
var verticalSlides = document.querySelectorAll(VERTICAL_SLIDES_SELECTOR);
return {
left: indexh > 0,
right: indexh < horizontalSlides.length - 1,
up: indexv > 0,
down: indexv < verticalSlides.length - 1
};
// *NOTE* : This is currently certified for Ext JS 3.0 - 3.3.1
var win = new Ext.Window({
height : 200,
width : 300,
layout : 'fit',
items : {
xtype : "textarea",
value : 'Click here, then click a button!'
},
buttons : [
//Override
Ext.override(Ext.Button, {
preventFocus : false,
// @override
onMouseDown : function(e){
if(!this.disabled && e.button === 0){
if (this.preventFocus) { // injected line here
e.stopEvent();
}
this.getClickEl(e).addClass('x-btn-click');
{
"auto_complete_commit_on_tab": true,
"caret_style": "phase",
"color_scheme": "Packages/Color Scheme - Default/Colorized-164059179496021-Tomorrow-Night-Eighties.tmTheme",
"draw_minimap_border": false,
"fade_fold_buttons": false,
"find_selected_text": true,
"font_face": "Monaco",
"font_options":
[
# Require any additional compass plugins here.
require 'retina/lib/sass_extensions.rb'
add_import_path 'retina/stylesheets'
# Set this to the root of your project when deployed:
http_path = "/static"
css_dir = "css"
sass_dir = "sass"
images_dir = "img"
javascripts_dir = "js"
// our search box, hidden for now
.search-container {
@include transition(height .3s ease);
// To get full hardware acceleration on animations, you need to activate the 3D rendering engine.
-webkit-transform: translateZ(0);
-webkit-backface-visibility: hidden;
position: relative;
height: 0px;
@dmackerman
dmackerman / mq.css
Created October 3, 2012 18:26 — forked from chriscoyier/mq.css
@media only screen and (min-width: 320px) {
/* Small screen, non-retina */
}
@media
only screen and (-webkit-min-device-pixel-ratio: 2) and (min-width: 320px),
only screen and ( min--moz-device-pixel-ratio: 2) and (min-width: 320px),
only screen and ( -o-min-device-pixel-ratio: 2/1) and (min-width: 320px),
<?php
// This theme uses post thumbnails
add_theme_support( 'post-thumbnails' );
// Add default posts and comments RSS feed links to head
add_theme_support( 'automatic-feed-links' );
function custom_excerpt_length( $length ) {
return 80;