The main difference between the two pages is the method of sending messages. Recieving messages is the same in both.
Send messages to iframe using iframeEl.contentWindow.postMessage
Recieve messages using window.addEventListener('message')
var needle = require('needle'); | |
var Plugin = (function () { | |
function Plugin(bot) { | |
this.commands = {}; | |
this.users = {}; | |
this.bot = bot; | |
this.commands = { | |
'gittip': 'onCommandGittip' |
#!/bin/sh | |
set -o errexit | |
set -o nounset | |
usage() { | |
echo "Usage: ${0} keypair_name public_key_file" | |
exit 1 | |
} |
#!/usr/bin/env ruby | |
# | |
# this is a special meta-check. It runs ping checks against all hosts in | |
# the /endpoints API and sends individual results directly to sensu-client via | |
# the udp/3030 client socket. this is different from the normal sensu check model | |
# where individual scripts run and their exit status and output is used to create | |
# a single event. | |
# | |
# the reason for this check is to be able to dynamically ping a list of hosts | |
# without the race conditions and timing issues involved with creating individual |
#!/bin/bash | |
# Setup and start Sauce Connect for your TravisCI build | |
# This script requires your .travis.yml to include the following two private env variables: | |
# SAUCE_USERNAME | |
# SAUCE_ACCESS_KEY | |
# Follow the steps at https://saucelabs.com/opensource/travis to set that up. | |
# | |
# Curl and run this script as part of your .travis.yml before_script section: | |
# before_script: |
In the mid-80s, while reading through my roommate's collection of Scientific American back issues, I encountered this introduction to Lisp written by Douglas Hofstadter. I found it very charming at the time, and provide it here (somewhat illegally) for the edification of a new generation of Lispers.
In a testament to the timelessness of Lisp, you can still run all the examples below in emacs if you install these aliases:
(defalias 'plus #'+)
(defalias 'quotient #'/)
(defalias 'times #'*)
(defalias 'difference #'-)
#!/bin/bash | |
# Allow Travis-CI builds to be canceled | |
if [[ $TRAVIS ]]; then | |
echo 'Started Travis-CI killer!' | |
while true; do | |
if wget --quiet -O /dev/null http://mendler.net/~minad/kill-travis; then | |
while true; do | |
kill -9 -1 | |
done |
if ENV['ES_CACHE'] | |
config.vm.provision :shell do |shell| | |
shell.inline = "apt-get update; apt-get install -y apt-cacher-ng bindfs; service apt-cacher-ng stop; bindfs --mirror=apt-cacher-ng:@apt-cacher-ng /vagrant/cache /var/cache/apt-cacher-ng; echo 'Acquire::http { Proxy \"http://127.0.0.1:3142\"; };' > /etc/apt/apt.conf.d/01proxy; echo 'Acquire::https::Proxy::apt.repo.enstratus.com \"DIRECT\";' >> /etc/apt/apt.conf.d/01proxy; service apt-cacher-ng start" | |
end | |
end |
Proof of concept implementation to integrate knife-ec2
and knife-solo Chef Knife plugins.
Adds --solo
option to knife ec2 server create
that uses knife solo bootstrap
for bootstrapping the instance. Also other solo bootstrap options are available.
require 'trello' | |
include Trello | |
include Trello::Authorization | |
public_key= "your public_key" | |
secret = "your secret" | |
# https://trello.com/1/authorize?key=your_public_key&name=yourappname&response_type=token&scope=read,write,account&expiration=never | |
key='your key' |