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
# blank lines and lines starting with pound are comments. | |
#Explicit mappings match any token sequence on the LHS of "=>" | |
#and replace with all alternatives on the RHS. These types of mappings | |
#ignore the expand parameter in the schema. | |
#Examples: | |
i-pod, i pod => ipod, | |
sea biscuit, sea biscit => seabiscuit | |
#Equivalent synonyms may be separated with commas and give |
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
<!-- BOTTOM POPUP --> | |
<div class="bottom-popup"> | |
<span class="close" onclick="bottomClose();"></span> | |
<div class="top"></div> | |
<div class="center"> | |
<div class="form"> | |
<p class="notext">Subscribe to <strong>Portero Luxury</strong> for special offers plus an extra $50 off your first luxury purchase*</p> | |
<form action="" method="post" id="IBNSubscribeForm" class="bottom-subscribe-form"> |
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
<sample> | |
<test>asd</test> | |
<testtwo>asd</testtwo> | |
</sample> |
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 updateScore = function(count){ | |
db.articles.find().sort({createdAt:-1}).limit(count).forEach(function (article) { | |
var referencing_tweets = 0 | |
var oneDayAgo = new Date(); | |
oneDayAgo.setDate(oneDayAgo.getDate() - 1); | |
var score = 0 | |
if (article.referencing_tweets) { | |
for (var i = 0; i < article.referencing_tweets.length; i++) { | |
if (article.referencing_tweets[i].createdAt > oneDayAgo) { | |
referencing_tweets++ |
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
From mongo db console: | |
> db.system.js.save({_id:'_testFunc',value:function(a,b){db.testCol.save({a:a,b:b}); return 'hello world';}}); | |
> db.system.js.find(); | |
{ "_id" : "_testFunc", "value" : function cf__16__f_(a, b) { | |
db.testCol.save({a:a, b:b}); | |
return "hello world"; | |
} } | |
> db.eval("_testFunc(1,2)"); | |
hello world |
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
//Works | |
{ query: | |
{ custom_score: | |
{ query: {"match_all":{}}, | |
params: {lat:43,lon:73}, | |
script: '(1-(doc["geo"].distanceInKm(lat,lon)/maxDistance))*distanceWeight+scoreWeight*_score' } }, | |
script_fields: { distance: { params:{lat:43,lon:73}, script: 'doc["geo"].distanceInKm(lat,lon)' } }, | |
fields: | |
[ '_id', | |
'name', |
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
conn.send(" V2"); | |
var cmd = new Buffer("PUB test\n"); | |
var body = new Buffer('hello world.'); | |
var size = new Buffer(4) | |
size.writeInt16BE(body.length,0) | |
var msg = Buffer.concat([cmd, body,size]); | |
conn.send(msg); |
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: philliprosen | |
* Date: 8/29/12 | |
* Time: 3:35 PM | |
*/ | |
var mongoose = require('mongoose'), | |
Schema = mongoose.Schema, |
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('request') | |
, assert = require("assert") | |
, config = require('../../../common/config'); | |
describe('api', function () { | |
describe('GET /api/users', function () { | |
it('should not return an error', function (done) { | |
http.get(config.distributor.routerPrefix + '/ping', function (err, 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
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAry4dQzJut6BbxuCOEFdog6a6Si7SlGSw5qkSNRXS9I6iiadftsYHcAEk+M5fNWPK17RtMBilJpOA32NdjK8HLakXcDs0BWgAZcPsap3E9VCfxUKgRIYNLbThJwFwudXZLyfVF0MfRsRpvgZpYZ0ixPJCxAtCadQFFMj9aKeHk5QvcfJd4+VQ/cXzRKRe89qs6Po7SMBUHxXgISBORWfCQN/CESHh12e9CQCfd5MuYcUlKIRPfCpIDk6UjjADr3IrFUQE0ChUeSSp0ycmgSDGH/xHTp0k1NsTNgWjhLh8U7/YkG2z005mnRGza5ntFacjyk9XMzA92K3j4MvxY2lf2Q== phillro3 |