Skip to content

Instantly share code, notes, and snippets.

View island205's full-sized avatar
🎯
Focusing

Zhi Cun island205

🎯
Focusing
View GitHub Profile
/*
* matchMedia() polyfill - test whether a CSS media type or media query applies
* authors: Scott Jehl, Paul Irish, Nicholas Zakas
* Copyright (c) 2010 Filament Group, Inc
* MIT license
* dev.w3.org/csswg/cssom-view/#dom-window-matchmedia
* in Chrome since m10: http://trac.webkit.org/changeset/72552
*/
@lucifr
lucifr / gist:1208100
Created September 10, 2011 08:16
Sublime Text 2 - 实用快捷键 (Mac OS X)
@jwieringa
jwieringa / vim-ruby-command-t-install.markdown
Created November 8, 2011 16:40
Install Vim with Ruby Interpreter and Command-T on Ubuntu

Summary

The following instructions will install Vim with the Ruby interpreter and Command-T. I keep my vim settings under revision control, thus I have chosen to use Git's submodules and Pathogen to manage Command-T. Depending on your preferences, you may want to setup Command-T differently. I recommend reading through the Command-T Readme

Install dependencies (what my system required), hg, and rake

sudo apt-get install ruby ruby-dev libncurses5-dev mercurial clone build-essential rake

I chose to compile vim with my system Ruby, 1.8.7. It is important that you use the same version to compile both Vim and Command-T. If your using RVM and you want to do the same, before proceeding you will want to:

rvm use system
@jimbojsb
jimbojsb / gist:1630790
Created January 18, 2012 03:52
Code highlighting for Keynote presentations

Step 0:

Get Homebrew installed on your mac if you don't already have it

Step 1:

Install highlight. "brew install highlight". (This brings down Lua and Boost as well)

Step 2:

var body, listener;
listener = {
handleEvent: function (evt) {
return console.log(evt.type);
}
};
body = document.body;
body.addEventListener("click", listener);
body.addEventListener("keyup", listener);
@miklschmidt
miklschmidt / notifications.coffee
Last active July 13, 2017 06:11
Take at notifications for node-webkit with a shitload of dependencies (Require.js, chaplin, TWEEN.js and so on).. sorry for that.
define [
'jquery'
'underscore'
'backbone'
'lib/gui'
'models/notification'
'views/notification'
'vendor/tween'
'jquery-ui'