Skip to content

Instantly share code, notes, and snippets.

View CWSpear's full-sized avatar

Cameron Spear CWSpear

View GitHub Profile

Screencapture and animated gifs

I say "animated gif" but in reality I think it's irresponsible to be serving "real" GIF files to people now. You should be serving gfy's, gifv's, webm, mp4s, whatever. They're a fraction of the filesize making it easier for you to deliver high fidelity, full color animation very quickly, especially on bad mobile connections. (But I suppose if you're just doing this for small audiences (like bug reporting), then LICEcap is a good solution).

Capturing (Easy)

  1. Launch quicktime player
  2. do Screen recording

screen shot 2014-10-22 at 11 16 23 am

@kentcdodds
kentcdodds / kcd-recomplie.js
Last active September 28, 2016 19:53
kcd-recompile
angular.module('kcd.directives').directive('kcdRecompile', ['$parse', function($parse) {
'use strict';
return {
transclude: true,
link: function link(scope, $el, attrs, ctrls, transclude) {
var previousElements;
compile();
function compile() {
define(
['_underscore', 'jquery'],
function underscoreExtensions(_, $){
//Object and collection helpers
_.mixin({
// Create object from a callback that returns [name, value] pairs. We use this combination a lot
// so might as well bake it into the framework
mapObject: _.compose(_.object, _.map)
@joaocunha
joaocunha / How To Hide The Select Arrow On Firefox.md
Last active December 10, 2023 13:05
How to hide <select> dropdown's arrow in Firefox when using "-moz-appearance: none;".

This is no longer a bug. I'm keeping the gist for historical reasons, as it helped to get it fixed. Make sure to read the notes by the end of the post.

How to remove hide the select arrow in Firefox using -moz-appearance:none;

TL;DR (or, the fix)

  1. Set -moz-appearance to none. This will "reset" the styling of the element;
  2. Set text-indent to 0.01px. This will "push" the text a tiny bit[1] to the right;
@airways
airways / 1 dist.config.php
Created November 1, 2011 00:44
Simple, single ExpressionEngine configuration file to override almost all paths and server settings. As used by @airways and @litzinger.
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
// Simple, single configuration file to override almost all paths and server settings. As used by @airways
// and @litzinger.
// Only check in the default as dist.config.php, set your version control system to ignore config.php so that
// local users and each instance (staging, production) can have their own settings.
// These config files are mainly meant to be used on a shared development server used by all developers,
// although it works almost as well for local development as well.
@balupton
balupton / README.md
Last active April 20, 2022 13:21
Ajaxify a Website with the HTML5 History API using History.js, jQuery and ScrollTo
// ----------------------------------------------------------
// A short snippet for detecting versions of IE in JavaScript
// without resorting to user-agent sniffing
// ----------------------------------------------------------
// If you're not in IE (or IE version is less than 5) then:
// ie === undefined
// If you're in IE (>=5) then you can determine which version:
// ie === 7; // IE7
// Thus, to detect IE:
// if (ie) {}