Skip to content

Instantly share code, notes, and snippets.


Jeong Seong Dae jeongsd

View GitHub Profile
mrdoob / RequestAnimationFrame.js
Created Feb 22, 2011
Provides requestAnimationFrame in a cross browser way.
View RequestAnimationFrame.js
* Provides requestAnimationFrame in a cross browser way.
* @author paulirish /
if ( !window.requestAnimationFrame ) {
window.requestAnimationFrame = ( function() {
return window.webkitRequestAnimationFrame ||
View tmux-cheatsheet.markdown

tmux shortcuts & cheatsheet

start new:


start new with session name:

tmux new -s myname
mhulse / Setting up Google Cloud Storage with CORS for Web
Last active Oct 14, 2020
Setting up CORS on Google Cloud Storage: An unofficial quick start guide to serving web fonts from Google's cloud. (I'm sure a lot of this info could be improved... Please leave comments if you have tips/improvements.)
View Setting up Google Cloud Storage with CORS for Web


Google Cloud Storage

You'll want to login using an official Google account (i.e. if this is for your company, use the comapany Gmail account vs. a personal one.)

When logging in, you might be prompted to verify the account; if so, enter your cell number to get a verification e-mail or phone call.

Once verified, you'll have to agree to the terms of service; do that, and click continue.

addyosmani / limitLoop.js
Last active Feb 19, 2021
Limit the frame-rate being targeted with requestAnimationFrame
View limitLoop.js
limitLoop.js - limit the frame-rate when using requestAnimation frame
Released under an MIT license.
When to use it?
A consistent frame-rate can be better than a janky experience only
occasionally hitting 60fps. Use this trick to target a specific frame-
rate (e.g 30fps, 48fps) until browsers better tackle this problem
benplum / matchMedia - IE9
Last active Apr 16, 2020
matchMedia Polyfill w/ Listeners - IE9
View matchMedia - IE9
// Modernizr style test
if (!(window.webkitMatchMedia || window.mozMatchMedia || window.oMatchMedia || window.msMatchMedia || window.matchMedia)) {
var root = document.getElementsByTagName( 'html' )[0];
root.className += ' no-matchmedia';
/*! matchMedia() polyfill - Test a CSS media type/query in JS. Authors & copyright (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas, David Knight. Dual MIT/BSD license */
window.matchMedia || (window.matchMedia = function() {
"use strict";
mischah /
Last active Aug 8, 2021
Installing und initializing z ( with help of Homebrew.

#The power of z

Do you spend lots of time doing things like this?

cd this/is/the/path/that/i/want/so/i/type/it/all/out/to/get/whereiwant

With z, you could just do this:

theprojectsomething / Timer.js
Created Mar 17, 2014
Timer - a simple JS timing implementation utilising requestAnimationFrame.
View Timer.js
- utilises animation frames (with a fallback to setTimeout when using the polyfill, below)
- returns remaining (or running) time
- pass a callback [fn], with an optional duration [ms] and autotart [bool], to the constructor or 'init' method
eg. new Timer(foo, 1000) *or* (new Timer()).init(foo, 0, true)
- for uniform x-browser support combine with the requestAnimationFrame polyfill from Erik Möller, et. al.
View youtube-vimeo-url-parser.js
function parseVideo (url) {
// - Supported YouTube URL formats:
// -
// -
// -
// - Supported Vimeo URL formats:
// -
// -
// - Also supports relative URLs:
// - //
Chaser324 /
Last active Jan 26, 2022
GitHub Standard Fork & Pull Request Workflow

Whether you're trying to give back to the open source community or collaborating on your own projects, knowing how to properly fork and generate pull requests is essential. Unfortunately, it's quite easy to make mistakes or not know what you should do when you're initially learning the process. I know that I certainly had considerable initial trouble with it, and I found a lot of the information on GitHub and around the internet to be rather piecemeal and incomplete - part of the process described here, another there, common hangups in a different place, and so on.

In an attempt to coallate this information for myself and others, this short tutorial is what I've found to be fairly standard procedure for creating a fork, doing your work, issuing a pull request, and merging that pull request back into the original project.

Creating a Fork

Just head over to the GitHub page and click the "Fork" button. It's just that simple. Once you've done that, you can use your favorite git client to clone your repo or j

rodleviton / imagemagick-install-steps
Created May 26, 2014
Installing Image Magick on Ubuntu 14.04
View imagemagick-install-steps
sudo -i
apt-get install build-essential checkinstall && apt-get build-dep imagemagick -y
tar xzvf ImageMagick-6.8.9-1.tar.gz
cd ImageMagick-6.8.9-1/
./configure --prefix=/opt/imagemagick-6.8 && make