Skip to content

Instantly share code, notes, and snippets.

@larrybotha
larrybotha / A.markdown
Last active December 27, 2015 08:59
Easily manage styles for pseudo classes, especially [disabled]. Quickly create helper classes for KSS-style pseudo modifiers.

Pseudos Helper Function

Quickly manage disabled styles for an element, multiple pseudo classes, and also create helpers for KSS-style pseudo modifiers (excellent for styleguides).

Full credit goes to @fr4nktic for this technique.

Usage

a

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@larrybotha
larrybotha / A.markdown
Last active December 20, 2015 18:49
Sublime Text Key Mappings

Sublime Text Key Mappings

These key mappings allow for a few conveniences:

  • easier 2 row work
    • increase the height of either the top or bottom column
    • make them even with a few intuitive shortcuts.
  • delete trailing slashes
  • prettify html
  • open sidebar in browser
@larrybotha
larrybotha / readme.markdown
Last active October 27, 2021 04:28
Postfix Using Gmail SMTP in Mac OSX Mavericks
con_enable 1
fps_max 60
mat_vsync "1" // Stops screen refresh rate exceeding refresh rate of monitor
mat_triplebuffered "1" // Enable with vsync if fps is less than 60 (0 Disables, 1 Enables)
dota_camera_disable_zoom "1" // disable mouse-wheel zooming
dota_minimap_hero_size "800"
@larrybotha
larrybotha / _gradient.scss
Created April 19, 2013 11:43
A Sass mixin to allow output of multiple backgrounds with vendor prefixes.
// This mixin allows for vendor prefixing of gradients, and allows for multiple
// backgrounds. It also allows you to define with which property you would like
// to apply your gradients.
// i.e. background / background-image / etc.
//
// It supports both the old and new syntaxes - but be warned - using the official
// 'to [direction]' syntax will result in browsers supporting only the old webkit
// syntax not rendering a gradient at all.
//
// https://developer.mozilla.org/en-US/docs/CSS/Tutorials/Using_CSS_gradients
@larrybotha
larrybotha / jquery-dropdown.js
Last active December 15, 2015 09:09
A basic solution for toggling dropdown menus in a navigation with jQuery.
/*
* HTML:
* <ul class="menu">
* <li>
* <a data-trigger="menu-1" class="http://yourlink.com">Link text</a>
* <ul data-target="menu-1">
* ...
* </ul>
* </li>
* </ul>
@larrybotha
larrybotha / SVG with PNG fallback.html
Created March 22, 2013 07:54
A method for serving .svg images with a fallback for lte IE8
<!--[if lte IE 8]>
<a href="..."><img src="your/file.png" alt="Your alt text" ></a>
<![endif]-->
<!--[if gt IE 8]>
<a href="..."><img src="your/file.svg" alt="Your alt text" ></a>
<![endif]-->
<!--[if !IE]> -->
<a href="..."><img src="your/file.svg" alt="Your alt text" ></a>
<!-- <![endif]-->
@larrybotha
larrybotha / _px-and-rem.scss
Last active April 9, 2018 16:50
Sass mixin - rems with px fallback
// This mixin outputs a property with rem units and a px fallback.
// Values passed without units are used as multipliers for the final
// rem and px values, all other units are output without modification.
// $base-font-size represents the root value of the document font-size
// in pixels.
//
// i.e. html { font-size: 100%;} // -> 16px
// Usage:
// @include px-and-rem([property], [multiplier | explicit value] [, ...]);
@larrybotha
larrybotha / snippet_HTML_jv.sublime-snippet
Created August 10, 2012 11:15
Sublime Text 2 | Snippets
<snippet>
<content><![CDATA[javascript:void(0);]]></content>
<tabTrigger>jv</tabTrigger>
<description>javascript:void(0);</description>
</snippet>