Skip to content

Instantly share code, notes, and snippets.

@ryanmcgary
ryanmcgary / chat.rb
Created May 1, 2012 20:23 — forked from rkh/chat.rb
Simple Chat Application using the Sinatra Streaming API
# coding: utf-8
require 'sinatra'
set server: 'thin', connections: []
get '/' do
halt erb(:login) unless params[:user]
erb :chat, locals: { user: params[:user].gsub(/\W/, '') }
end
get '/stream', provides: 'text/event-stream' do
@ryanmcgary
ryanmcgary / base.js
Created October 19, 2012 15:39 — forked from tomfuertes/base.js
Base Tag Restructuring Pending Bootstrapper.bindDomParsed
(function () {
var cdn = document.createElement('script');
cdn.type = 'text/javascript';
cdn.async = true;
cdn.src = '//sub.domain.com/shared/bootstrap/0.8.0.2/js/libs/gas-utils.js';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(cdn, s);
})();
(function () {
webPropertyId = [];
@ryanmcgary
ryanmcgary / base.js
Created October 19, 2012 15:39 — forked from tomfuertes/base.js
Base Tag Restructuring Pending Bootstrapper.bindDomParsed
(function () {
var cdn = document.createElement('script');
cdn.type = 'text/javascript';
cdn.async = true;
cdn.src = '//sub.domain.com/shared/bootstrap/0.8.0.2/js/libs/gas-utils.js';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(cdn, s);
})();
(function () {
webPropertyId = [];
@ryanmcgary
ryanmcgary / base.js
Created October 19, 2012 15:40 — forked from tomfuertes/base.js
Base Tag Restructuring Pending Bootstrapper.bindDomParsed
(function () {
var cdn = document.createElement('script');
cdn.type = 'text/javascript';
cdn.async = true;
cdn.src = '//sub.domain.com/shared/bootstrap/0.8.0.2/js/libs/gas-utils.js';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(cdn, s);
})();
(function () {
webPropertyId = [];
@ryanmcgary
ryanmcgary / all featured listings
Created November 15, 2012 22:08
new featured listing tag
#!/usr/bin/env bash
apt-get -y update
apt-get -y install build-essential zlib1g-dev libssl-dev libreadline-gplv2-dev libyaml-dev
cd /tmp
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p125.tar.gz
tar -xvzf ruby-1.9.3-p125.tar.gz
cd ruby-1.9.3-p125/
./configure --prefix=/usr/local
make
make install
# Problem:
#
# If you use git submodules linking two private github repos, you'll need to create a separate deploy key for each.
# Multiple keys are not supported by Ansible, nor does ansible (when running git module) resort to your `.ssh/config` file.
# This means your ansible playbook will hang in this case.
#
# You can however use the ansible git module to checkout your repo in multiple steps, like this:
#
- hosts: webserver
vars:

Experimental Generation of Interpersonal Closeness

Instructions to Subjects Included With Task Slips Packet

This is a study of interpersonal closeness, and your task, which we think will be quite enjoyable, is simply to get close to your partner. We believe that the best way for you to get close to your partner is for you to share with them and for them to share with you. Of course, when we advise you about getting close to your partner, we are giving advice regarding your behavior in this demonstration only, we are not advising you about your behavior outside of this demonstration.

In order to help you get close we've arranged for the two of you to engage in a kind of sharing game. You're sharing time will be for about one hour, after which time we ask you to fill out a questionnaire concerning your experience of getting close to your partner.

You have been given three sets of slips. Each slip has a question or a task written on it. As soon as you both finish reading these instructions, you should

@ryanmcgary
ryanmcgary / react-native-talk.md
Created October 8, 2015 15:19 — forked from peterjmag/react-native-talk.md
Let's build a React Native app in 20 minutes - React Berlin #1
@ryanmcgary
ryanmcgary / cookie_jar_fix.gemspec
Last active May 8, 2016 01:07 — forked from jodosha/cookie_jar_fix.gemspec
Support cookie jar options for all cookie stores