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
require 'net/http' | |
require 'uri' | |
require 'rexml/document' | |
uri = URI.parse("ADD YOUR INSTAPAPER RSS FEED LINK HERE") | |
data = Net::HTTP.get_response(uri) | |
doc = REXML::Document.new(data.body) | |
doc.elements.each('rss/channel/item') do |s| | |
puts s[1][0] |
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
if (typeof define !== 'function') { var define = require('amdefine')(module); } | |
define(function() { | |
return { | |
indexOf : function(arr, item) { | |
return arr.indexOf( item ); | |
}, | |
sum : function(arr) { | |
var sum = 0; |
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 http = require('http'), | |
setup = require('./setup'), | |
card_catalog = require('cardcatalog'), | |
obj; | |
var setupFn = new setup(); | |
setupFn.on('ready', function(res) { | |
obj = res; | |
}); |
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
/** | |
* scrap | |
* v0.0.1 | |
* | |
* 07/15/13 | |
*/ | |
(function() { | |
var _, root, Scrap, Backbone; |
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
// Simple User model | |
// /api/models/User.js | |
module.exports = { | |
attributes: { | |
name: 'string' | |
} | |
}; |
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
// An example controller from /api/controllers/StoreController.js | |
module.exports = { | |
typeA: function(req, res) { | |
res.send('typeA action with Lang Type: ' + req.languageType); | |
}, | |
typeB: function(req, res) { | |
res.send('typeB action with Lang Type: ' + req.languageType); |
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
/** | |
* Bootstrap | |
*/ | |
var Sails = require('sails'); | |
/** | |
* Before ALL the test bootstrap the server | |
*/ |
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
/** | |
* A simple example of how to use Waterline v0.10 with Express | |
*/ | |
var express = require('express'), | |
_ = require('lodash'), | |
app = express(), | |
Waterline = require('waterline'); | |
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 _ = require('lodash'), | |
async = require('async'), | |
Waterline = require('waterline'); | |
// Instantiate a new instance of the ORM | |
var orm = new Waterline(); | |
var mysqlAdapter = require('sails-mysql'); | |
var config = { |
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
/** | |
* User.js | |
* | |
* @description :: TODO: You might write a short summary of how this model works and what it represents here. | |
* @docs :: http://sailsjs.org/#!documentation/models | |
*/ | |
module.exports = { | |
attributes: { |
OlderNewer