Skip to content

Instantly share code, notes, and snippets.

View thisiskylierose's full-sized avatar

Kylie Rose thisiskylierose

  • Berlin
  • 02:25 (UTC +02:00)
View GitHub Profile
@thisiskylierose
thisiskylierose / 0_reuse_code.js
Created February 4, 2014 15:56
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
// i know, i know, browser sniffing :(
// adaptation of http://stackoverflow.com/questions/8348139/detect-ios-version-less-than-5-with-javascript
Modernizr.addTest('ios6', function() {
var ios6 = false,
v, ver = false;
if (/iP(hone|od|ad)/.test(navigator.platform)) {
v = (navigator.appVersion).match(/OS (\d+)_(\d+)_?(\d+)?/),
ver = parseInt(v[1], 10),
@thisiskylierose
thisiskylierose / requestAnimationFrame.js
Created February 23, 2018 23:41 — forked from jacob-beltran/requestAnimationFrame.js
React Performance: requestAnimationFrame Example
// How to ensure that our animation loop ends on component unount
componentDidMount() {
this.startLoop();
}
componentWillUnmount() {
this.stopLoop();
}