Skip to content

Instantly share code, notes, and snippets.

endolith / Has weird right-to-left characters.txt
Last active Feb 22, 2021
Unicode kaomoji smileys emoticons emoji
View Has weird right-to-left characters.txt
View gist:527683
// ----------------------------------------------------------
// 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) {}
View detect-ie.js
* modified from
* only improve slightly to get small
var ie = function(v, p, needle, undef) {
needle = p.getElementsByTagName('br');
p.innerHTML = '<!--[if gt IE ' + (++v) + ']><br><![endif]-->',
harperreed /
Created Jan 14, 2011
creates a custom origin for cloudfront. EASY CDN!
import boto
# requires cf_customorigin branch
origin_domain = ''
cdn_cname = ['']
caller_reference = 'exmaple Distribution'
c = boto.connect_cloudfront()
d = c.create_custom_distribution(
nathansmith / moz-webkit.css
Created Mar 22, 2011
Target Firefox and WebKit via hacky CSS.
View moz-webkit.css
Read more here:
For more browser-specific hacks:
@-moz-document url-prefix() {
/* Put your Firefox specific code here. */
View background_clip.sass
// Seriously, why isn't this just the
// freakin' default in all browsers?
// Not sure what this does? Have a looksie...
// Crucial, if you have rounded corners on something with
// both background color and a border. Without, background
chriseppstein / 0_selector_hacks.scss
Created Sep 14, 2011
This gist demonstrates some uses of the new sass feature: Passing content blocks to mixins.
View 0_selector_hacks.scss
@mixin ie6 { * html & { @content } }
#logo {
background-image: url("/images/logo.png");
@include ie6 { background-image: url("/images/logo.gif"); }
DanielWright /
Created Nov 16, 2011
Simple font-smoothing in Internet Explorer

The filter and zoom rules in the sample stylesheet above will apply a smoothing/blurring effect to text elements. In the sample stylesheet, these rules are applied to all headers, paragraphs, list items, and table cells, but in practice, you will want to tailor the application of the smoothing effect to only those elements rendering with significant aliasing.

Nota Bene: the filter appears to place an overflow: hidden-style block around the elements being smoothed, so do not apply these rules directly to elements that need to scroll, or which contain absolutely positioned elements that appear outside the boundaries of the element itself.

pcreux / gist:1681580
Created Jan 26, 2012
Reword *first* commit
View gist:1681580
# You can't use rebase -i here since it takes the parent commit as argument.
# You can do the following though:
git checkout FIRST_COMMIT_SHA && git commit --amend && git rebase HEAD master
haschek / .jshintrc
Created May 4, 2012
JSHint Configuration, Strict Edition
View .jshintrc
// --------------------------------------------------------------------
// JSHint Configuration, Strict Edition
// --------------------------------------------------------------------
// This is a options template for [JSHint][1], using [JSHint example][2]
// and [Ory Band's example][3] as basis and setting config values to
// be most strict:
// * set all enforcing options to true