Skip to content

Instantly share code, notes, and snippets.

View karlosgliberal's full-sized avatar

karlos g liberal karlosgliberal

View GitHub Profile
Meteor.subscribe("Categories");
Meteor.autosubscribe(function() {
Meteor.subscribe("listdetails",
Session.get('current_list'));
});
Template.categories.lists = function () {
return lists.find({}, {sort: {Category: 1}});
}
<body>
<div style="float: right; margin-right:20px;">
{{loginButtons align="right"}}
</div>
<div id="lendlib">
<div id="categories-container">
{{> categories}}
</div>
<div id="list">
{{> list}}
Deps.autorun(function () {
Meteor.subscribe("messages", Session.get("currentRoomId"));
});
@karlosgliberal
karlosgliberal / .json
Created December 28, 2012 11:59 — forked from anonymous/.json
{
"info": {
"author": "meemoo",
"title": "Untitled",
"description": "Meemoo app description",
"parents": [],
"url": ""
},
"nodes": [
{
@karlosgliberal
karlosgliberal / test_meemo.html
Created September 2, 2012 21:50
test meemoo
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>text</title>
<meta name="author" content="forresto">
<meta name="description" content="add text to an image" />
<script type="text/javascript" src="http://meemoo.org/meemoo/v1/meemoo-min.js"></script>
@karlosgliberal
karlosgliberal / vlcrc.js
Created October 8, 2011 20:10 — forked from garth/vlcrc.js
Remote control multiple VLC apps via the command line using nodejs
// To start vlc with telnet remote control:
// ./VLC --extraintf rc --rc-host 0.0.0.0:3000
//
// To connect to multiple vlc's
// node vlcrc.js host1:3000 host2:3000
var net = require('net');
var readline = require('readline');
//addresses of servers
@karlosgliberal
karlosgliberal / nodejs-rfid.js
Created June 16, 2011 07:16 — forked from basham/nodejs-rfid.js
Use NodeJS to read RFID ids through the USB serial stream.
/*
DESCRIPTION
-----------
Use NodeJS to read RFID ids through the USB serial stream. Code derived from this forum:
http://groups.google.com/group/nodejs/browse_thread/thread/e2b071b6a70a6eb1/086ec7fcb5036699
CODE REPOSITORY
---------------
https://gist.github.com/806605
@karlosgliberal
karlosgliberal / gist:901812
Created April 4, 2011 15:21
Conectando nodejs a arduino mediante el puerto serie
//Ejemplo sencillo para poder manejar un motor servo conectado aun ardunio desde nodejs
//app.js fichero principal tipo express
var express = require('express');
//npm install serialport
//https://github.com/voodootikigod/node-serialport
var serialport = require("serialport");
var SerialPort = serialport.SerialPort; // localize object constructor
var app = module.exports = express.createServer();
@karlosgliberal
karlosgliberal / gist:894269
Created March 30, 2011 11:50
Ventana modal con jquery.ui y datos desde nodejs
$('#editarlocal').live('click', function(e) {
$.get(this.href, function(data) {
$('input[name$="l[municipio]"]').val(data.municipio);
$('input[name$="l[superficie]"]').val(data.superficie);
$('input[name$="l[tipolocal]"]').val(data.tipolocal);
$('input[name$="l[numpersonas]"]').val(data.numpersonas);
$('input[name$="l[id]"]').val(data._id);
$('form').attr('action', '/local/update/'+data._id);;
$("#editarventana").dialog();
});
@karlosgliberal
karlosgliberal / gist:894263
Created March 30, 2011 11:45
Forma simple en jquery de crear un post modificando el _method para el rest de nodejs
$.put = function(url, data, success) {
data._method = 'PUT';
$.post(url, data, success, 'json');
};
$.del = function(url, data, success) {
data._method = 'delete';
$.post(url, data, success);
};