Skip to content

Instantly share code, notes, and snippets.

task :deploy do
puts 'Deploying site to Heroku ...'
puts `git push heroku`
puts 'Running database migrations ...'
puts `heroku rake db:migrate`
release_name = "release-#{Time.now.utc.strftime("%Y%m%d%H%M%S")}"
puts "Tagging release as '#{release_name}'"
puts `git tag -a #{release_name} -m 'Tagged release'`
@RSpace
RSpace / Gemfile
Created April 23, 2011 12:49
Running Capybara and RSpec without Rails
source 'http://rubygems.org'
gem 'rspec'
gem 'capybara', :git => 'https://github.com/jnicklas/capybara.git'
gem 'launchy'
gem 'ruby-debug19'
// This results in correct positioning on the Rift
this.el.setAttribute('position', {
x: 0,
y: currentPosition.y,
z: 0
})
// REMOVED: This is what previously worked for Vive and Gear VR - needs testing!
// this.el.setAttribute('position', {
// x: currentPosition.x - this.data.position.x,
<a-scene altspace="usePixelScale: false; verticalAlign: bottom;" vr-mode-ui="enabled: false;">
<a-sphere position="0 1.25 -1" radius="1.25" color="#EF2D5E"></a-sphere>
<a-cube position="-1 0.5 1" rotation="0 45 0" width="1" height="1" depth="1" color="#4CC3D9"></a-cube>
<a-cylinder position="1 0.75 1" radius="0.5" height="1.5" color="#FFC65D"></a-cylinder>
<a-plane rotation="-90 0 0" width="4" height="4" color="#7BC8A4"></a-plane>
<a-sky color="#ECECEC"></a-sky>
</a-scene>
<script src="https://cdn.rawgit.com/AltspaceVR/aframe-altspace-component/v0.2.2/dist/aframe-altspace-component.min.js"></script>
// This in A-Frame:
<a-entity position="10 10 10" rotation="0 90 0">
<a-cube position="1 5 0">
<a-image position="2 0 5">
</a-entity>
// ... is similar to this in HTML/CSS:
<div style="position: relative; left: 200px; top: 100px;">
<div style="position: absolute; left: 10px; top: 0px;"></div>
<div style="position: absolute; left: 50px; top: 50px;"></div>
@RSpace
RSpace / Wrapper.js
Last active January 3, 2016 18:53
MeetupVR - Wrapper
class Wrapper extends Component {
render() {
const { vrMode } = this.props
if (vrMode) {
return (
<div>
<Scene>
<Camera><Cursor/></Camera>
<Members/>
@RSpace
RSpace / Member.js
Last active January 3, 2016 10:58
MeetupVR - Member.js
export default class Member extends Component {
render () {
const { id, name, photoUrl } = this.props
if (this.props.vrMode) {
const { width, height, depth } = this.props
const { x, y, z } = this.props.position
const color = `#${TYPE_TO_COLOR_MAP[this.props.type || '']}`
return (
@RSpace
RSpace / Members.js
Last active January 3, 2016 10:57
MeetupVR - Members.js
class Members extends Component {
render () {
let members = this.props.members
if (this.props.vrMode) {
return (
<Entity>
{members.map(this.renderMember.bind(this))}
</Entity>
)
[0, [0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0]]
[20, [1,1, 1,1, 1,1, 1,1, 1,1, 1,1, 1,1, 1,1, 1,1, 1,1]]
[6, [1,1, 1,1, 1,1]] # incomplete
[18, [1,1, 6,4, 3]] # incomplete w/ spare
[150, [5,5, 5,5, 5,5, 5,5, 5,5, 5,5, 5,5, 5,5, 5,5, 5,5, 5]]
[47, [1,1, 1,1, 1,1, 1,1, 1,1, 1,1, 1,1, 1,1, 1,1, 10, 10 ,9]]
[173, [7,3, 7,3, 7,3, 7,3, 7,3, 7,3, 7,3, 7,3, 7,3, 7,3, 10]]
[300, [10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10]]
[280, [10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 5]] # incomplete
[300, [10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10]] # extras