Skip to content

Instantly share code, notes, and snippets.

<video
id="myvideo"
controls="controls"
class="playr_video"
width="640" height="480"
poster="http://media.w3.org/2010/05/sintel/poster.png">
<!--
These are the three sources. This should cover most of ourr deployed player base
-->
<source src="http://media.w3.org/2010/05/sintel/trailer.mp4" type="video/mp4" />
<video
id="myvideo"
controls="controls"
class="playr_video"
width="640" height="480"
poster="http://media.w3.org/2010/05/sintel/poster.png">
<!--
These are the three sources. This should cover most of
our deployed player base.
-->
gulp.task('images', function () {
return gulp.src('[app/images/**/*.{jpg,png}]')
.pipe($.responsive({
// Resize all JPG images to three different sizes: 200, 500, and 630 pixels
'*.jpg': [{
width: 200,
rename: { suffix: '-200px' }
}, {
width: 500,
rename: { suffix: '-500px' }
<!doctype html>
<html>
<head>
<title>Hitch Demo</title>
<meta charset="utf-8">
<script src="hitch-0.6.3.min.js"></script>
<style data-hitch-interpret>
@-hitch-requires http://www.hitchjs.com/bkardell.math/1;
.car:-math-lessthan(data-price, 200000){
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>EQCSS Demo</title>
<style type="text/eqcss">
/* type="text/eqcss tells the script to parse the styles*/
@element ".minwidthpixels" and (min-width: 500px) {
.minwidthpixels {
global => {
'use strict';
// Load the sw-toolbox library.
importScripts('bower_components/sw-toolbox/sw-toolbox.js');
// Turn on debug logging, visible in the Developer Tools' console.
global.toolbox.options.debug = true;
// By default, all requests will use the toolbox.networkFirst cache
@caraya
caraya / example.json
Created May 25, 2016 19:56
demo of json to feed into Polymer
[ {
"description" : "Based on [Explorable Explanations](http://worrydream.com/ExplorableExplanations/) and [Parable of the Polygons](http://ncase.me/polygons/) research",
"name" : "Engaged Readers",
"notes" : "",
"stage" : "Concept",
"type" : "Code",
"url" : {
"code" : "",
"other" : "",
"writeup" : ""
@caraya
caraya / dns-prefetch.php
Created July 21, 2016 03:45 — forked from leogopal/dns-prefetch.php
DNS Prefetching in WordPress
<?php
// Prefetch For Speed Up
function dns_prefetch() {
$prefetch = 'on';
echo "\n <!-- DNS Prefetching Start --> \n";
echo '<meta http-equiv="x-dns-prefetch-control" content="'.$prefetch.'">'."\n";
if ($prefetch != 'on') {
@caraya
caraya / gulpfile.babel.js
Created August 3, 2016 04:09 — forked from timothyis/gulpfile.babel.js
Gulp 4, ES6 gulpfile example
// Gulp module imports
import {src, dest, watch, parallel, series} from 'gulp';
import del from 'del';
import livereload from 'gulp-livereload';
import sass from 'gulp-sass';
import minifycss from 'gulp-minify-css';
import jade from 'gulp-jade';
import gulpif from 'gulp-if';
import babel from 'gulp-babel';
import yargs from 'yargs';
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install caskroom/cask/brew-cask
brew cask install google-chrome
ln -sf ~/Applications/Google\ Chrome.app /Applications
brew cask install megasync
ln -s '/opt/homebrew-cask/Caskroom/megasync/latest/MEGAsync.app' '/Applications/MEGAsync.app'
brew cask install dropbox
brew cask install google-drive
brew cask install iterm2
brew cask install spectacle