Skip to content

Instantly share code, notes, and snippets.

View PhillipSenn's full-sized avatar

Phillip Senn PhillipSenn

View GitHub Profile
@PhillipSenn
PhillipSenn / KeepListening.cfm
Last active August 29, 2015 13:55
Server Sent events
<cfscript>
if (IsDefined('form.Save')) {
Application.myTransmission = form.myTransmission;
} else {
param Application.myTransmission = '';
}
</cfscript>
<cfoutput>
<cfinclude template="/Inc/html.cfm">
<cfscript>
</cfscript>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta content="Phillip Senn" name="author">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="sortable.css">
@PhillipSenn
PhillipSenn / draggable.cfm
Created February 7, 2014 22:40
Draggable
<cfscript>
</cfscript>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta content="Phillip Senn" name="author">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="draggable.css">
@PhillipSenn
PhillipSenn / filterable.cfm
Last active June 30, 2023 02:25
Filterable
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta content="Phillip Senn" name="author">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="filterable.css">
</head>
<body>
<div class="col-md-5">
<link rel="import" href="../components/polymer/polymer.html">
<polymer-element name="my-element">
<template>
<style>
#paper_button {
left: 190px;
top: 100px;
position: absolute;
<link rel="import" href="../components/polymer/polymer.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
height: 100%;
@PhillipSenn
PhillipSenn / gist:f069909094667d3747bb
Created October 23, 2014 19:24
Renaming requestAnimationFrame to whenever(Ready)
// http://paulirish.com/2011/requestanimationframe-for-smart-animating/
// http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating
// requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel
// MIT license
(function() {
var lastTime = 0
var vendors = ['ms', 'moz', 'webkit', 'o']
@PhillipSenn
PhillipSenn / Stripe.js
Created November 25, 2014 03:12
Stripe.cfm
Stripe.setPublishableKey('pk_WMRAFml8LGNp9ryfsctbhECkE84jE') // Test\
dom.form = $('form')
;(function() {
$(document).on('click','[name=Save]',clicked)
function clicked() {
$(this).prop('disabled',true)
Stripe.card.createToken(dom.form,done) // Ask Stripe to create a one time token before truly submitting the form.
}
@PhillipSenn
PhillipSenn / Application.cfc
Last active August 29, 2015 14:16
beforeunload
component {
this.Name = 'beforeunload'
this.dataSource = 'beforeunload'
this.SessionManagement = true
this.ScriptProtect = 'all'
this.currentTemplatePath = GetCurrentTemplatePath()
this.directoryFromPath = GetDirectoryFromPath(this.currentTemplatePath)
this.mappings['Inc'] = this.directoryFromPath & 'Inc'
// this.mappings['com'] = this.directoryFromPath & 'com'
@PhillipSenn
PhillipSenn / Stripe1.cfm
Last active June 15, 2020 16:58
Stripe Example
<cfoutput>
<cfinclude template="/Inc/header.cfm">
<h1> Accepting Online Payments With Stripe </h1>
<form method="post" action="Stripe2.cfm">
<label for="PersonName">Name:</label>
<input id="PersonName" name="PersonName" value="Phillip Senn">
<label for="Email">Email:</label>
<input type="email" id="Email" name="Email" value="PhillipSenn@gmail.com">
<label for="amount">amount:</label>
<select id="amount" name="amount">