Skip to content

Instantly share code, notes, and snippets.

View streamich's full-sized avatar
🕶️
married

Va Da streamich

🕶️
married
  • Switzerland
  • 03:24 (UTC +02:00)
View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>For loop benchmark</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script>
<script src="./suite.js"></script>
</head>
<body>
<h1>Open the console to view the results</h1>
@streamich
streamich / react16-css.js
Created October 7, 2017 01:21
Dynamic CSS for React components using React's v16 element array render result
class Button extends Component {
@css`
background-color: #ff0000;
width: 320px;
padding: 20px;
border-radius: 5px;
border: none;
outline: none;
&:hover {
@streamich
streamich / gist:a06b056cc18a69811c423bde646b5e73
Created October 4, 2017 15:30 — forked from millermedeiros/gist:891886
iPad HTML5 video quirks and hacks
/*
* Example how to preload HTML5 video on the iPad (iOS 3.2+)
* @author Miller Medeiros
* Released under WTFPL
*/
var vid = document.createElement('video');
vid.src = 'lol_catz.mp4';
document.getElementById('video-holder').appendChild(vid);
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Webpack Bundle Analyzer</title>
<!-- viewer.js -->
<script>