Skip to content

Instantly share code, notes, and snippets.

@troywarr
troywarr / index.html
Created July 10, 2017 20:15
Self-Sizing Popup Example
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Index</title>
</head>
<body>
<a href="javascript:;">Open Popup</a>
<script>
document.querySelector('a').onclick = function (event) {
@troywarr
troywarr / gist:4053ea6c2ef4b535c95d88c815923c2f
Last active November 3, 2016 07:22
Form tracking with uStudio Oracle Eloqua module
<form>
<p>
<label for="first_name">First Name</label>
<input type="text" id="first_name" name="first_name"/>
</p>
</form>
<script>
window.uStudio.Player.registerPlayerCallback(function (player) {
player.subscribe('OracleEloqua.ready', function () {
$('form').submit(function (event) {
@troywarr
troywarr / Wikipedia Edit
Created June 20, 2015 17:47
Attempted Wikipedia edit that was flagged as unconstructive
===Cinema lenses===
Carl Zeiss AG has long been renowned for its motion picture lenses. Zeiss manufactures prime, and zoom lenses for 35mm, 16mm, and 65mm film production. They also make lenses for digital cinema, and high definition video. Zeiss is mainly known in the trade for their association with the German camera manufacturer Arri for whom they currently produce lenses.
{{clear}}
Current models of Zeiss cinema lenses are:
<div style="float:left; width:48%;">
* Compact Prime CP.2 T✻ Distagon 15mm T2.9
* Compact Prime CP.2 T✻ Distagon 18mm T3.6
* Compact Prime CP.2 T✻XP Distagon 21mm T2.9
@troywarr
troywarr / gulpfile.coffee
Created March 25, 2015 22:45
Complete gulpfile to demonstrate an issue using BrowserSync.
gulp = require('gulp')
gulpIf = require('gulp-if')
less = require('gulp-less')
minifyCSS = require('gulp-minify-css')
notify = require('gulp-notify')
rename = require('gulp-rename')
imageMin = require('gulp-imagemin')
uglify = require('gulp-uglify')
jade = require('gulp-jade')
svgSprite = require('gulp-svg-sprite')
<?xml version="1.0" encoding="utf-8" ?>
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="100" height="100">
<defs>
<linearGradient id="gradient" x1="0" x2="0" y1="0" y2="1">
<stop offset="0%" stop-color="#7085ac"></stop>
<stop offset="100%" stop-color="#233753"></stop>
</linearGradient>
</defs>
</svg>
@troywarr
troywarr / gist:7548522
Created November 19, 2013 16:51
check for FB object before using it
var fbCheck = setInterval(function() {
if (window.FB) {
FB.Canvas.setSize();
clearInterval(fbCheck);
}
}, 200);