This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Example: | |
* convertToPrettyDate("Sat, 23 Jan 2010 18:45:42 +0100") // => "7 hours ago" | |
*/ | |
var convertToPrettyDate = (function() { | |
var JUST_NOW = "Just now", | |
MINUTES_AGO = "{t} minute{s} ago", | |
HOURS_AGO = "{t} hour{s} ago", | |
YESTERDAY = "Yesterday", | |
DAYS_AGO = "{t} day{s} ago", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* toLolcatString() | |
* Converts a string from plain english to lolcat speak using YQL and jQuery | |
* | |
* @example | |
* toLolcatString("Hi. How are you?", function(lolcatStr) { alert(lolcatStr); }); // => "OH HAI. HOWZ U?" | |
*/ | |
var toLolcatString = (function() { | |
var YQL_QUERY = "SELECT content FROM html WHERE url=\"http://speaklolcat.com/?from={str}\" AND xpath='//textarea[@id=\"to\"]'"; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<Module> | |
<ModulePrefs title="os:Name Tag"> | |
<Require feature="opensocial-data"/> | |
<Require feature="opensocial-templates"/> | |
</ModulePrefs> | |
<Content type="html"><![CDATA[ | |
<script xmlns:os="http://ns.opensocial.org/2008/markup" type="text/os-data"> | |
<os:PeopleRequest key="Owner" userId="@owner" groupId="@self"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<Module> | |
<ModulePrefs title="Message Bundle Substitution in Remote Requests"> | |
<Require feature="opensocial-0.9" /> | |
<Require feature="opensocial-templates" /> | |
<Require feature="opensocial-data" /> | |
<Locale lang="all"> | |
<msg name="foo">Hello World</msg> | |
</Locale> | |
</ModulePrefs> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div>Message (remotely loaded): __MSG_foo__</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var sys = require('sys'), | |
http = require('http'), | |
urlModule = require('url'), | |
querystring = require('querystring'); | |
http.createServer(function(req, res) { | |
var urlObj = urlModule.parse(req.url), | |
params = querystring.parse(urlObj.query), | |
url = params.url, | |
dest = 'images/' + new Date().getTime() + '.png'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<Module> | |
<!-- | |
FIG - Feature Inspector Gadget, find out what gadget features are supported by any gadget container. | |
Copyright (C) 2009 XING AG | |
This program is free software: you can redistribute it and/or modify | |
it under the terms of the GNU General Public License as published by | |
the Free Software Foundation, either version 3 of the License, or | |
(at your option) any later version. |
OlderNewer