Skip to content

Instantly share code, notes, and snippets.

@MikeGrace
MikeGrace / gist:661784
Created November 3, 2010 21:47
Testing going into a loop without passing the loop count parameter. Everything worked as expected.
ruleset a60x412 {
meta {
name "test-non-passed-parameter"
description <<
test-non-passed-parameter
>>
author "Mike Grace"
logging on
}
@MikeGrace
MikeGrace / StringBin-write-example.js
Created October 12, 2010 05:30
Write to StringBin Example
$.ajax({
dataType: "jsonp",
url: "http://api.stringbin.com/1/write?pin=t6BmN0Iw567L1MY&key=MikeGrace&value=creator",
success: function(data) {
$('body').append("<h1>Error Saving? "+data.error+"</h1>");
}
});
@MikeGrace
MikeGrace / StringBin-read-example.js
Created October 12, 2010 05:25
Read from StringBin Example
$.ajax({
dataType: "jsonp",
url: "http://api.stringbin.com/1/read?pin=t6BmN0Iw567L1MY&key=MikeGrace",
success: function(data) {
$('body').append("<h1>String: "+data.string+"</h1>");
}
});
@MikeGrace
MikeGrace / raise-event-from-javascript-and-pass-data.krl.js
Created August 23, 2010 19:49
Kynetx app that raises event in JavaScript and also shows how to pass data back to the Kynetx server
ruleset a60x301 {
meta {
name "js raise event pass data"
description <<
js raise event pass data
>>
author "Mike Grace"
logging on
}
@MikeGrace
MikeGrace / see-through-overlay.krl.js
Created August 23, 2010 15:58
Kynetx app that puts see through overlay on page as example
ruleset a60x307 {
meta {
name "see-through-overlay"
description <<
see-through-overlay
>>
author "Mike Grace"
logging on
}
@MikeGrace
MikeGrace / kynetx-use-external-resource-files.js
Created August 10, 2010 22:27
Use external resource files in your Kynetx apps!
ruleset a60x295 {
meta {
name "use-external-resources"
description <<
Pull in external CSS and JavaScript resources to be used by the app
>>
author "Mike Grace"
logging on
use javascript resource "http://dl.dropbox.com/u/1446072/tester.js"
@MikeGrace
MikeGrace / exlicit-events-data-passing.js
Created August 10, 2010 20:41
Raise explicit events in your Kynetx app!
ruleset a60x294 {
meta {
name "explicit-event-data-test"
description <<
explicit-event-data-test
>>
author "Mike Grace"
logging on
}
@MikeGrace
MikeGrace / default-params.js
Created July 14, 2010 17:52
Faking default param passing in JavaScript function
function defaultParams(name, class, id) {
if (class == null) class = "CS 101 [default]";
if (id == null) id = "Not yet set";
return "Name: " + name + ", Class: " + class + ", ID: " + id;
}
@MikeGrace
MikeGrace / kynetx-set-entity-var-on-click.krl.js
Created June 22, 2010 03:05
- Testing to see how to set entity variables on KRL click events - App can be run on different pages at different times and the click count will be saved
ruleset a60x275 {
meta {
name "Set entity var on click event"
description <<
- Testing to see how to set entity variables on KRL click events
- App can be run on different pages at different times and the click count will be saved
>>
author "Mike Grace"
logging on
}
@MikeGrace
MikeGrace / testing-jquery-each-function.js
Created June 21, 2010 22:34
Testing jQuery's each function in firebug console
test = [1,2,3,4,5];
$K(test).each(function() {
console.log(this + 1);
})