Skip to content

Instantly share code, notes, and snippets.

const PKSupportsTouches = ("createTouch" in document);
const PKStartEvent = PKSupportsTouches ? "touchstart": "mousedown";
const PKMoveEvent = PKSupportsTouches ? "touchmove": "mousemove";
const PKEndEvent = PKSupportsTouches ? "touchend": "mouseup";
function PKUtils() {}
PKUtils.assetsPath = "";
PKUtils.t = function(b, a) {
return "translate3d(" + b + "px, " + a + "px, 0)"
};
PKUtils.px = function(a) {
@solidgoldpig
solidgoldpig / http-cookies.js
Created March 8, 2010 15:04 — forked from ThisIsMissEm/http-cookies.js
Add Cookies to Node
//---------------------------------------
// Enhancing the HTTP Lib for cookies.
//---------------------------------------
// summary:
// - Adds getCookie method to the httpRequest object.
// - Adds setCookie and clearCookie methods to the httpResponse object.
// acknowledgements:
// Code based on http://github.com/jed/cookie-node/blob/master/cookie-node.js