Skip to content

Instantly share code, notes, and snippets.

@remy
remy / gist:350433
Created March 31, 2010 14:58
Storage polyfill
if (typeof window.localStorage == 'undefined' || typeof window.sessionStorage == 'undefined') (function () {
var Storage = function (type) {
function createCookie(name, value, days) {
var date, expires;
if (days) {
date = new Date();
date.setTime(date.getTime()+(days*24*60*60*1000));
expires = "; expires="+date.toGMTString();
@davist11
davist11 / jquery.equalHeight.js
Created July 20, 2010 20:33
Equal heights plugin
;(function($) {
// Equal height items
$.fn.equalHeight = function(options) {
var opts = $.extend({}, $.fn.equalHeight.defaults, options);
return this.each(function() {
var $this = $(this),
o = $.meta ? $.extend({}, opts, $this.data()) : opts,
maxHeight = 0;
@ten1seven
ten1seven / gist:2776468
Created May 23, 2012 17:18
How to use font weight with web fonts
@font-face {
font-family: 'MyFont';
src: url('path-to-normal-font');
...
font-weight: 400;
font-style: normal;
}
@font-face {
font-family: 'MyFont';
src: url('path-to-bold-font');
@dz
dz / 1. How to Use.md
Last active April 2, 2020 18:06
Slack Fluidapp Customizations

DZSlack

What is this?

The following files add some view keybindings and other functional and styling changes to Slack when used inside of a Fluid app.

Specifically:

  1. <cmd>-number will bring you to the respective starred channel. For example, if you have 4 starred channels, <cmd-1> will bring you to the first starred channel, <cmd-2> to the second, etc.