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 cnvs=document.createElement('canvas'),ctx,img,idx,int,divs=document.getElementsByClassName('H-y-qa H-y-pe-ea c-m-l H-y');for(idx in divs){if(divs[idx].getAttribute('data-content-url')=='https://plus.google.com/photos/117576570968762597633/albums/5642001971943305281/5642001977563718610'){img=divs[idx].firstChild;break}}cnvs.width=img.width;cnvs.height=img.height;int=setInterval(function(){cnvs=cnvs.cloneNode();ctx=cnvs.getContext('2d');ctx.drawImage(img,0,0);document.body.appendChild(cnvs)},775); |
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
//create data structure for dijkstra algo hotness | |
var Node = function(name) { | |
this.name = name; | |
this.neighbors = []; | |
}; | |
Node.prototype = { | |
neighbors : null, | |
addNeighbor : function(node, distance) { |
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
// ----------------- | |
// app.js | |
var mongoose = require('mongoose'); | |
// your express server stuff here... | |
// it will make things easier to organize if you have routes defined | |
// in their own files and require them, passing in the app like: | |
require('routes/user')(app); | |
// after registering all your routes, connect to mongoose |
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
# Description | |
# Create a Google+ Hangout and print out the url in chat | |
# | |
# Dependencies | |
# phantomjs | |
# | |
# Configuration | |
# HUBOT_HANGOUT_USERNAME | |
# HUBOT_HANGOUT_PASSWORD | |
# HUBOT_HANGOUT_VERIFY_EMAIL |
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
// I'm just being lazy and loading both apps here for simpliciy, | |
// but these would be started by themselves as their own | |
// servers somewhere else | |
require('./this-app'); | |
require('./that-app'); | |
// core node http lib for your proxy server | |
// you'd probably use the "https" module here, and add certs | |
// you could really use any http server for this, even express, but this | |
// is probably sufficient and simpler, since you won't be providing anything |
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 nodemailer = require('nodemailer'); | |
var engineer, | |
password; | |
exports.init = function (engineer, password) { | |
engineer = engineer; | |
password = password; |
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 path = require('path') | |
var BLANK_GIF = 'data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IE1hY2ludG9zaCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDpDOTBBOTBCMjg2NUQxMUU1QUY1Nzk5NzEyNkQzRTdCMSIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDpGNUE4QzVCODg2Q0ExMUU1QUY1Nzk5NzEyNkQzRTdCMSI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOkM5MEE5MEIwODY1RDExRTVBRjU3OTk3MTI2RDNFN0IxIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOkM5ME |
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
// wa la, a redux store | |
var store = createStore() | |
// some action creators | |
var actions = { | |
add: function (value) { | |
type: 'ADD', | |
value: value | |
}, | |
remove: function (id) { |
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
// Useful for defining a standard synchronous action | |
exports.defineAction = function (actions, definition) { | |
var {name, type} = definition | |
var [actionFn, notification] = parseActionProps(definition) | |
// pass in `type` via `this` context object | |
var actionWrapper = function () { | |
var context = { |
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
// Send a message to the user that added the bot right after it connects | |
slapp.event('bb.team_added', function (msg) { | |
slapp.client.im.open({ token: msg.meta.bot_token, user: msg.meta.user_id }, (err, data) => { | |
if (err) { | |
return console.error(err) | |
} | |
let channel = data.channel.id | |
msg | |
.say({ channel, text: 'Thanks for adding me to your team!' }) |
OlderNewer