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
# Derived from https://gist.github.com/allenporter/e70d9eb090c7dbdd593cf526e07b4abe with extensions from the comment thread applied | |
blueprint: | |
name: Daily Conversation Agent Agenda Notification | |
description: | | |
Conversation agent generates a personalized notification based on the | |
upcoming calendar agenda, birthday reminders, location, and weather information in your language. | |
domain: automation | |
input: | |
notify_time: | |
name: Notification time |
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 calculateContainsWindow(image) { | |
var imageComputedStyle = window.getComputedStyle(image); | |
var imageObjectFit = imageComputedStyle.getPropertyValue("object-fit"); | |
var coordinates = {}; | |
var imagePositions = imageComputedStyle.getPropertyValue("object-position").split(" "); | |
var naturalWidth = image.naturalWidth; | |
var naturalHeight= image.naturalHeight; | |
if( image.tagName === "VIDEO" ) { | |
naturalWidth= image.videoWidth; |
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
For my own sanity ;) Scraped from a variety of places, including: http://stackoverflow.com/questions/14130560/nodejs-udp-multicast-how-to?utm_medium=twitter&utm_source=twitterfeed | |
!Server | |
var news = [ | |
"Borussia Dortmund wins German championship", | |
"Tornado warning for the Bay Area", | |
"More rain for the weekend", | |
"Android tablets take over the world", | |
"iPad2 sold out", |
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
Verifying my Blockstack ID is secured with the address 1FKAVZYEV9TbLRm77y4t4Kv5KjAirKeK46 https://explorer.blockstack.org/address/1FKAVZYEV9TbLRm77y4t4Kv5KjAirKeK46 |
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
#! /bin/bash | |
SSH_ENV="$HOME/.ssh/environment" | |
function start_agent { | |
echo "Initialising new SSH agent..." | |
/usr/bin/ssh-agent | sed 's/^echo/#echo/' > "${SSH_ENV}" | |
echo succeeded | |
chmod 600 "${SSH_ENV}" | |
. "${SSH_ENV}" > /dev/null | |
/usr/bin/ssh-add; |
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
#!/bin/sh | |
cd "$(dirname "$0")" && . ../common/update-lib.sh | |
#check_pristine | |
package=openssh | |
version=6.0p1 | |
url=http://mirror.bytemark.co.uk/OpenBSD/OpenSSH/portable/ |
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
Suspicious log entries: | |
2011-10-24 10:42:39.203 -> Entered ChatPollerHandler with queryString : ajax_timeout=-1&pollSeqId=10&poll=true&sessionId=86ee4d9b-a696-4d92-b1ce-d73dcb27616c&chatWindowId=35ac44a9-fb2f-434b-bae8-4fda524cb491&handle=null&participantId=ca1e9956-b419-411f-b306-10d2d20e3ff6&seq=1, EVT_RSC: 26961876 | |
2011-10-24 10:42:39.203 -> Entered ChatPollerHandler with queryString : ajax_timeout=-1&pollSeqId=10&poll=true&sessionId=e87ede08-b7c2-4b47-8332-7050f1e3944a&chatWindowId=d3e35f7b-11ca-463a-836b-aa7e918aac59&handle=null&participantId=7b8bd5ba-bc8a-4a3a-b310-8cd97f94d933&seq=1, EVT_RSC: 26961876 | |
Relevant code: | |
public void onRequest(AtmosphereResource<HttpServletRequest, HttpServletResponse> resource) throws IOException { |
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 sys= require('sys'); | |
var OAuth= require('oauth').OAuth; | |
oa= new OAuth("https://twitter.com/oauth/request_token", | |
"https://twitter.com/oauth/access_token", | |
yourConsumerKey, yourConsumerSecret, | |
"1.0A", "http://localhost:3000/oauth/callback", "HMAC-SHA1"); | |
var request= oa.get("https://userstream.twitter.com/2/user.json", yourAccessToken, yourTokenSecret ); | |
request.addListener('response', function (response) { | |
response.setEncoding('utf8'); |
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 express= require('express') | |
, auth= require('./.node_modules/connect-auth') | |
, url= require('url'); | |
var app = express.createServer() | |
, yourTwitterConsumerKey= "xxx" | |
, yourTwitterConsumerSecret= "yyyy" | |
, fbId= "asdsd" | |
, fbSecret= "asdsdsds" | |
, fbCallbackAddress= "http://somehost.com/auth/facebook_callback"; |
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 rehash (values) { | |
var hash = {} | |
, len | |
, i=0; | |
if (!Array.isArray(values)) return hash; | |
len= values.length | |
if( len % 2 == 1) return []; //mis-matched array ? | |
while( i < len) { // for(i =0 ;i < len; ) { | |
hash[values[i++]]= values[i++]; |
NewerOlder