start new:
tmux
start new with session name:
tmux new -s myname
/** | |
* Provides requestAnimationFrame in a cross browser way. | |
* @author paulirish / http://paulirish.com/ | |
*/ | |
if ( !window.requestAnimationFrame ) { | |
window.requestAnimationFrame = ( function() { | |
return window.webkitRequestAnimationFrame || |
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.
/* | |
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 |
// 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"; |
#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:
/* | |
Timer | |
- 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. | |
[https://github.com/darius/requestAnimationFrame] | |
*/ |
function parseVideo (url) { | |
// - Supported YouTube URL formats: | |
// - http://www.youtube.com/watch?v=My2FRPA3Gf8 | |
// - http://youtu.be/My2FRPA3Gf8 | |
// - https://youtube.googleapis.com/v/My2FRPA3Gf8 | |
// - Supported Vimeo URL formats: | |
// - http://vimeo.com/25451551 | |
// - http://player.vimeo.com/video/25451551 | |
// - Also supports relative URLs: | |
// - //player.vimeo.com/video/25451551 |
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.
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
sudo -i | |
cd | |
apt-get install build-essential checkinstall && apt-get build-dep imagemagick -y | |
wget http://www.imagemagick.org/download/ImageMagick-6.8.7-7.tar.gz | |
tar xzvf ImageMagick-6.8.9-1.tar.gz | |
cd ImageMagick-6.8.9-1/ | |
./configure --prefix=/opt/imagemagick-6.8 && make | |
checkinstall |