Skip to content

Instantly share code, notes, and snippets.

View mappum's full-sized avatar
⛓️

Matt Bell mappum

⛓️
View GitHub Profile

feed

Feed is a simple yet flexible node.js middleware for connect/express that comes with a built-in websocket client (using Socket.io). It allows for the easy creation and access of feeds, which are collections of content items that are organized and filtered by tags (for example, comments in a thread or an activity feed of friends). MongoDB is used for storage.

The content that feeds are made up of are called Items. Items are models with a list of tags added to them, and Feeds are just lists of tags for filtering the saved Items.

Feeds can be sorted time-based (such as an activity feed or notification log) or score-based (like a Reddit comment section, sorted by the score of each comment) and organized by tags.

Usage

First, require the module.

Apr 30 04:34:19 alpha sshd[17767]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=c-71-228-12-226.hsd1.il.comcast.net user=mappum
Apr 30 04:34:22 alpha sshd[17767]: Failed password for mappum from 71.228.12.226 port 59435 ssh2
Apr 30 04:34:44 alpha sshd[17769]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=563407cb.rev.stofanet.dk user=mappum
Apr 30 04:34:46 alpha sshd[17769]: Failed password for mappum from 86.52.7.203 port 44646 ssh2
Apr 30 04:34:48 alpha sshd[17769]: Failed password for mappum from 86.52.7.203 port 44646 ssh2
Apr 30 04:34:54 alpha sudo: mappum : TTY=pts/5 ; PWD=/home/mappum/0x10code ; USER=root ; COMMAND=/usr/sbin/ufw status
Apr 30 04:35:01 alpha sshd[17775]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=c-71-228-12-226.hsd1.il.comcast.net user=mappum
Apr 30 04:35:03 alpha sshd[17775]: Failed password for mappum from 71.228.12.226 port 59436 ssh2
Apr 30 04:35:2
var irc = require('irc'),
dcpu = require('dcpu16'),
http = require('http'),
querystring = require('querystring');
var channels = ['#0x10c-dev', '#0x10c-blah', '#0x10c'];
var client = new irc.Client('irc.freenode.net', 'mappumbot', {
channels: channels
});
var irc = require('irc'),
dcpu = require('dcpu16'),
http = require('http'),
querystring = require('querystring');
var channels = ['#0x10c-dev', '#0x10c-blah', '#0x10c'];
var client = new irc.Client('irc.freenode.net', 'mappumbot', {
channels: channels
});
function keyEvent(key) {
if(keyInterrupts) {
cpu.interrupt();
}
};
$(document).keydown(function(e) {
if(cpu.running && e.target.nodeName !== 'INPUT' && e.target.nodeName !== 'TEXTAREA') {
var key = keyMap[e.which] || e.which;
keysDown[key] = true;
mappum@s15795101:/var/www/combat$ jitsu deploy
info: Welcome to Nodejitsu
info: It worked if it ends with Nodejitsu ok
info: Executing command deploy
info: Analyzing your application dependencies in app.js
warn: Local version appears to be old.
warn: Your package.json version will be incremented for you automatically.
warn: About to write /var/www/combat/package.json
warn: Using '*' as version for dependencies may eventually cause issues.
07:22:00 [SEVERE] null
org.bukkit.command.CommandException: Unhandled exception executing command 'money' in plugin iConomy v6.0.9b
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:42)
at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:166)
at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:461)
at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:818)
at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:778)
at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:761)
at net.minecraft.server.Packet3Chat.handle(Packet3Chat.java:33)
at net.minecraft.server.NetworkManager.b(NetworkManager.java:229)
(function(Minecraft) {
/** @constructor */
Minecraft.Client = function(args) {
if(Minecraft.ENVIRONMENT == 'node') {
if(typeof Minecraft.node.net == 'undefined') Minecraft.node.net = require('net');
if(typeof Minecraft.node.http == 'undefined') Minecraft.node.http = require('http');
if(typeof Minecraft.node.https == 'undefined') Minecraft.node.https = require('https');
if(typeof Minecraft.node.querystring == 'undefined') Minecraft.node.querystring = require('querystring');
this.host = args.host;
>> 02000d004d00690073007400650072004d00450052004b004c00450059
{ id: 2,
data:
[ { name: 'connectionHash',
type: 'string',
value: '248bc7153a0c9fe6' } ] }
>> 0100000017000d004d00690073007400650072004d00450052004b004c00450059000000000000000000000000000000000000
Minecraft.BetaClient = function(args) {
if(Minecraft.ENVIRONMENT == 'node') {
if(typeof Minecraft.node.net == 'undefined') Minecraft.node.net = require('net');
this.host = args.host;
this.port = args.port || 25565;
this.username = args.username || 'Player';
this.status = 0;
if(typeof args.onLogin == 'function') this.onLogin = args.onLogin;