Skip to content

Instantly share code, notes, and snippets.

@solidgoldpig
solidgoldpig / makeapp.sh
Created November 30, 2011 12:29 — forked from demonbane/makeapp.sh
Create a Fluid-style app launcher for single-window Chrome instances on OSX
#!/bin/sh
echo "What should the Application be called (no spaces allowed e.g. GCal)?"
read inputline
name=$inputline
echo "What is the url (e.g. https://www.google.com/calendar/render)?"
read inputline
url=$inputline
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