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
/* | |
USAGE: node cpu-watch.js <pid> <how-many-minutes> | |
*/ | |
var fs = require('fs'); | |
var format = require('util').format; | |
var PID = process.env.PID || process.argv[2]; | |
if(!PID) throw new Error('No PIC Provided!'); | |
var ENDIN_MINUTES = process.env.ENDIN_MINUTES || process.argv[3]; |
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 DDPClient = require('ddp'); | |
var totalClients = 0; | |
var postsList = 0; | |
var postsListUsers = 0; | |
var postsList | |
function createClient(closeTimeout) { | |
console.log('CREATING....', closeTimeout); | |
var client = new DDPClient({ |
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
<head> | |
<title>abc</title> | |
</head> | |
<body> | |
{{#sourceCode}} | |
<template name="books"> | |
<input type="text" placeholder="Search..." value="{{booksSearchQuery}}"> | |
{{#if searchResults.count}} |
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
{ | |
_id: "7Tij2HTGqhrRE3k78", | |
created: ISODate("2014-02-07T04:04:33.266Z"), | |
initialDataReceived: true, | |
name: "kadira-ui", | |
owner: "vapXLdykrravRPua8", | |
secret: "bfda539b-cf42-469a-9847-49f11883858f", | |
plan: "pro", | |
planToUSD: 0.003, | |
collaborators: [], |
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
ServiceConfiguration.configurations.remove({ | |
service: "meteor-developer" | |
}); | |
if(Meteor.settings.meteorDevelopers) { | |
var meteorDevelopersInfo = Meteor.settings.meteorDevelopers; | |
} else { | |
var meteorDevelopersInfo = { | |
clientId: "HcempmSyaawiyb4G4", | |
secret: "snC3snsmTebC8HHCwwhqhHaAzAFxtFsQRL" |
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 graphql = require('graphql'); | |
var userType = new graphql.GraphQLObjectType({ | |
name: 'User', | |
fields: () => ({ | |
id: {type: graphql.GraphQLString}, | |
name: {type: graphql.GraphQLString}, | |
friends: { | |
type: new graphql.GraphQLList(userType), | |
args: { |
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 mongo = require("./mongoHelper").connect("localhost", 27017, "test"); | |
mongo.collection("collname", function(coll) { | |
}); |
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'); | |
var sys = require('sys'); | |
function request() | |
{ | |
var host = 'google.com'; | |
var client = http.createClient(443, host, true); | |
var request = client.request('GET', '/', | |
{'host': host}); | |
request.end(); |
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 redis = require('redis'); | |
var cli = redis.createClient(); | |
cli.on('error', function(err) { | |
console.log('Err:' + err); | |
}); | |
function addWorker() { | |
console.log('adding worker again'); | |
cli.blpop('nl', 0, function(err, data) { |
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 redis = require('redis'); | |
var cli = redis.createClient(); | |
cli.on('error', function(err) { | |
console.log('Err:' + err); | |
}); | |
function addWorker() { | |
console.log('adding worker again'); | |
cli.blpop('nl', 0, function(err, data) { |
OlderNewer