Skip to content

Instantly share code, notes, and snippets.

View kbav's full-sized avatar

Kyle Bavender kbav

View GitHub Profile
@simurai
simurai / Overlay Grid
Created February 26, 2011 16:54
A flexible grid overlay to test your site's alignment.
/* Grid */
html:before, html:after {
content: "";
position: absolute;
top: 0;
right: 0;
pointer-events: none;
/* change to px if you get a scrollbar */
@dgmid
dgmid / dabblet.css
Created January 11, 2012 20:17
CSS3 Isometric Text Demo v2
/**
* CSS3 Isometric Text Demo v2
*/
@font-face {
font-family: 'LeagueGothicRegular';
src: url('http://www.midwinter-dg.com/blog_demos/css-text-shadows/fonts/league_gothic-webfont.eot');
src: url('http://www.midwinter-dg.com/blog_demos/css-text-shadows/fonts/league_gothic-webfont.eot?iefix') format('eot'),
url('http://www.midwinter-dg.com/blog_demos/css-text-shadows/fonts/league_gothic-webfont.woff') format('woff'),
url('http://www.midwinter-dg.com/blog_demos/css-text-shadows/fonts/league_gothic-webfont.ttf') format('truetype'),
@benrothe
benrothe / QLEnableTextSelection.sh
Created March 7, 2012 21:52
Select text in OS X Quick Look
defaults write com.apple.finder QLEnableTextSelection -bool TRUE; killall Finder
@brandonb927
brandonb927 / image-2x.less
Last active December 1, 2019 15:38
@2x LESS CSS Mixin
/**
* I converted the SCSS mixin to LESS for the awesome coders like myself in response to a blog post on 37Signals - http://37signals.com/svn/posts/3271-easy-retina-ready-images-using-scss
*
* Update: 2014-08-04 - Updated a long-standing bug where retina images were shown no matter what in the first background-image property.
* - Updated retina media query to be more reliable ()
* Update: 2013-11-13 - Picked up another technique thanks to reading this post from Tyler Tate, auto-fill in the second filename for the retina image, http://tylertate.com/blog/2013/06/11/retina-images-using-media-queries-and-LESS-CSS.html
* Update: 2013-04-16 - Have recently found a few use cases when using a retina pattern from Subtle Patterns on the <body>, this has come in handy
* Update: 2013-04-05 - Some research in the Wordpress Core(http://core.trac.wordpress.org/ticket/22238#comment:5) was pointed out that some tests may be redundant (Thanks @kbav) so I've cleaned these up
* Update: 2012-12-29 - U
@Wilto
Wilto / blockquote.md
Created December 20, 2012 15:35
Of Blockquotes and Outlines
@erunyon
erunyon / gist:5073909
Created March 3, 2013 00:28
Flexslider code to remove comments from slider images.
jQuery(function($){
var $flexslider = $('.flexslider'),
$slides = $flexslider.find('li'),
stripComment = function(string) {
return string.replace(/<!--/g, '').replace(/-->/g, '');
},
initItem = function(item) {
var $this = $(item);
if(!$this.hasClass('init')) {
@jbhove
jbhove / index.slim
Created April 1, 2013 14:17
A CodePen by Ansa Copeland. Hexagons with Hover Effect - This is the demo for my blog post (http://blog.ansacopeland.com/chatter/2013/3/25/hover-friendly-hexagons) about how I build the image hexagons + hover effects on my new website.
.wrapper
.hovertext Hello World!
.overlay
img src="http://ansa.io/sketch.png"
.mask-wrapper
.rec1.rec
.rec2.rec
.rec3.rec
@chadclark
chadclark / 01-bg-img-path.scss
Last active December 16, 2015 21:20
A .scss mixin that makes it easy to include a .png fallback for .svg background images when using Modernizr.
// ---------------------------------------------------------------------------------
// CSS Image Paths
// ---------------------------------------------------------------------------------
$bg-img-path: '/path/to/images/'; // Base Path for BG Layout Images
@drublic
drublic / keep-focus.js
Last active March 29, 2017 15:20
A function that lets you circularly tab through a part of a page.
var tabbableElements = 'a[href], area[href], input:not([disabled]),' +
'select:not([disabled]), textarea:not([disabled]),' +
'button:not([disabled]), iframe, object, embed, *[tabindex],' +
'*[contenteditable]';
var keepFocus = function (context) {
var allTabbableElements = context.querySelectorAll(tabbableElements);
var firstTabbableElement = allTabbableElements[0];
var lastTabbableElement = allTabbableElements[allTabbableElements.length - 1];
@davatron5000
davatron5000 / Sublime Text Setup.md
Last active April 15, 2023 15:39
A new user's guide to SublimeText 2. Estimated reading time: 2 mins. Estimated workthrough time: 12 minutes.

Make it useful

  • Install Package Control. For SublimeText 2, paste the following in Terminal:
import urllib2,os; pf='Package Control.sublime-package'; ipp = sublime.installed_packages_path(); os.makedirs( ipp ) if not os.path.exists(ipp) else None; urllib2.install_opener( urllib2.build_opener( urllib2.ProxyHandler( ))); open( os.path.join( ipp, pf), 'wb' ).write( urllib2.urlopen( 'http://sublime.wbond.net/' +pf.replace( ' ','%20' )).read()); print( 'Please restart Sublime Text to finish installation')

From here on out, use Package Control to install everything. +Shift+P, then type Install to get a list of installable packages you can 'livesearch through. After installing plugins, they should be running.