Skip to content

Instantly share code, notes, and snippets.

View tbranyen's full-sized avatar

Tim Branyen tbranyen

View GitHub Profile
@tbranyen
tbranyen / foo1.js
Created April 27, 2011 18:39 — forked from remy/foo1.js
(function () {
// export the API, but also create a global called "foo"
foo = module.exports = function (s) {
console.log('foo1 (global): ' + s);
};
})();
if request.method == 'GET':
id = request.GET['id']
tagging = Images.objects.get(id=id)
tags = Tag.objects.usage_for_model(tagging, counts=True)
usageNum = [{"tag": tagfreq.name, "count": tagfreq.count} for tagfreq in tags]
dump = simplejson.dumps(usageNum)
message = dump
$.getJSON('/tags/',
{
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Detect Credit Card Type</title>
<style type="text/css">
#cards, #statuses {
padding-left: 5px;
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Detect Credit Card Type</title>
</head>
<body>