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
//Using node-elasticsearch-client and meteor-npm | |
var ElasticSearchClient = Meteor.require('elasticsearchclient'), | |
url = Npm.require('url'); | |
//local elastic search envrionment running on port 9200 | |
// create an _opts object for remote systems with credentials: See ElasticSearch documentation | |
var serverOptions = { | |
host: 'localhost', | |
port: 9200, |
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
///Markup | |
<div id="st-container" class="st-container"> | |
<div class=" fullscreen-container animated fadeInDown" id="fullscreen-container"> | |
<div class=" custom_inner offset2" id="fullScreenAyahs"> | |
<div class="pageHolder" id=""> | |
</div> | |
<div class="pageHolder" id=""> | |
</div> |
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
<div class="PlainText"> | |
Date: 2013-10-28 20:00:43 -0500<br> | |
Source: Text<br> | |
Incident type: Text<br> | |
Incident detection rule: Text (ID=19762)<br> | |
Text: App - fard.com<br> | |
Text rating: 37<br> | |
Text: 171<br> | |
Description: Text d<br> | |
<br> |
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
function setPresence (whereAt) { | |
Meteor.Presence.state = function() { | |
return { | |
online : true, | |
whereAt: whereAt | |
} | |
} | |
} | |
function trackPageview (path) { |
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
# coding=UTF-8 | |
from __future__ import division | |
import re | |
# This is a naive text summarization algorithm | |
# Created by Shlomi Babluki | |
# April, 2013 | |
class SummaryTool(object): |
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
<template name="layout"> | |
{{yield 'header'}} | |
{{yield 'base'}} | |
<div class="content" id="content"> | |
<div id="main-content"> | |
{{yield 'mainContent'}} |
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
Meteor.users.update({ _id: userID}, { | |
$set: { | |
createdAt: new Date() | |
} | |
}, false, true, function(err, result){ | |
if(err) | |
console.log(err); | |
}); |
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
MyController = RouteController.extend({ | |
before: function () { | |
var onReady = function () { | |
if (/* whatever */) | |
this.render(); | |
}; | |
var onWait = function () { | |
// maybe show a loading or logging in function. | |
}; |
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
def create_token(): | |
message = bytes("Message") | |
secret = bytes("secret") | |
signature = base64.b64encode(hmac.new(secret, message, digestmod=hashlib.sha256).digest()); | |
print(signature) |
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
Deps.autorun(function () { | |
var current = Router.current(); | |
Deps.afterFlush(function () { | |
$('.content-inner').scrollTop(0); | |
$(window).scrollTop(0); | |
}); | |
}); | |
NewerOlder