Matt Sahr mattsahr

View index.html
1 2 3 4 5 6
 
 
<div id="message">hi</div>
 
 
<script type="text/javascript" src="http://download.pouchdb.com/pouchdb-nightly.min.js"></script>
View android.remote.debug.md

Chrome Remote Debugging on Android

The framework for debugging web pages (and phoneGap apps) on Android is finally getting easier.

https://developers.google.com/chrome-developer-tools/docs/remote-debugging

Following the instructions will get you there, but the notes below might help spell out some of the steps. Here's what you need.

  1. Chrome 31 or higher on your desktop.
View easing.js
1 2 3 4 5 6 7 8 9 10
/*
* Easing Functions - inspired from http://gizma.com/easing/
* only considering the t value for the range [0, 1] => [0, 1]
*/
EasingFunctions = {
// no easing, no acceleration
linear: function (t) { return t },
// accelerating from zero velocity
easeInQuad: function (t) { return t*t },
// decelerating to zero velocity
View swipeFunc.js
1 2 3 4 5 6 7 8 9 10
var swipeFunc = {
touches : {
"touchstart": {"x":-1, "y":-1},
"touchmove" : {"x":-1, "y":-1},
"touchend" : false,
"direction" : "undetermined"
},
touchHandler: function(event) {
var touch;
if (typeof event !== 'undefined'){
View require.main.js
1 2 3 4 5 6 7 8 9 10
/*
* This is an example build file that demonstrates how to use the build system for
* require.js.
*
* copied from here: https://github.com/jrburke/r.js/blob/master/build/example.build.js
* THIS BUILD FILE WILL NOT WORK. It is referencing paths that probably
* do not exist on your machine. Just use it as a guide.
*
*
*/
View CustomWidgetFile.php
1 2 3 4 5 6 7 8 9 10
<?php
/**
* Duplicate this file as many times as you would like, just be sure to change the
* Empty_Widget class name to a custom name of your choice. Have fun! redrokk.com
*
* Plugin Name: Empty Widget
* Description: Single Widget Class handles all of the widget responsibility, all that you need to do is create the html. Just use Find/Replace on the Contact_RedRokk_Widget keyword to rebrand this class for your needs.
* Author: RedRokk Interactive Media
* Version: 1.0.0
* Author URI: http://www.redrokk.com
View index.html
1 2 3 4 5 6 7 8 9 10
<html>
<body>
<form onsubmit="return saveText()">
<label for="name">Name</label><br>
<input id="name" /><br>
 
<label for="desc">Description</label><br>
<input id="desc" /><br>
 
<input type="submit" value="Save" />
View pubsub.md

Four Ways To Do Pub/Sub With jQuery 1.7 and jQuery UI (in the future)

Between jQuery 1.7 and some of work going into future versions of jQuery UI, there are a ton of hot new ways for you to get your publish/subscribe on. Here are just four of them, three of which are new.

(PS: If you're unfamiliar with pub/sub, read the guide to it that Julian Aubourg and I wrote here http://msdn.microsoft.com/en-us/scriptjunkie/hh201955.aspx)

Option 1: Using jQuery 1.7's $.Callbacks() feature:

$.Callbacks are a multi-purpose callbacks list object which can be used as a base layer to build new functionality including simple publish/subscribe systems. We haven't yet released the API documentation for this feature just yet, but for more information on it (including lots of examples), see my post on $.Callbacks() here:

View native.scroll.html
1 2 3 4 5 6 7 8 9
<!DOCTYPE html>
<html>
<!-- NOTES
Demo - uses IOS native scroll available in IOS5, but sidestep the document-bounce behavior. Tested on iPad 1, using IOS 5.1.
 
This approach uses a set of 3 nested divs.
OuterDiv -- fixed height, width, overflow-scrolling: touch;
MiddleDiv -- fixed height width, overflow-scrolling: touch; fits inside OuterDiv
InnerDiv -- fixed height width, bigger than MiddleDiv, so it kicks in the overflow behavior
Something went wrong with that request. Please try again.