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
class CustomFailure < Devise::FailureApp | |
# Never do http authentication through Devise | |
def http_auth? | |
false | |
end | |
def redirect_url | |
send(:"new_#{scope}_session_path", :format => (request.xhr? ? 'js' : nil )) | |
end |
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 Location(id, data) { | |
// Public variables | |
this.id = id; | |
this.latitude = data["location"]["latitude"]; | |
this.longitude = data["location"]["longitude"]; | |
this.postal_district_id = data["location"]["postal_district_id"]; | |
this.area_from = data["location"]["area_from"]; | |
this.area_to = |
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
source 'http://rubygems.org' | |
gem 'rspec' | |
gem 'capybara', :git => 'https://github.com/jnicklas/capybara.git' | |
gem 'launchy' | |
gem 'ruby-debug19' |
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
using System; | |
using RestSharp; | |
using RestSharp.Deserializers; | |
namespace Podio | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ |
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
class Feature < Test::Unit::TestCase | |
include Capybara::DSL, FactoryGirl::Syntax::Methods | |
def teardown | |
Capybara.reset_sessions! | |
Capybara.use_default_driver | |
end | |
add_teardown_hook do |context| | |
context.instance_eval do |
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
[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 |
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
class Wrapper extends Component { | |
render() { | |
const { vrMode } = this.props | |
if (vrMode) { | |
return ( | |
<div> | |
<Scene> | |
<Camera><Cursor/></Camera> | |
<Members/> |
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
class Members extends Component { | |
render () { | |
let members = this.props.members | |
if (this.props.vrMode) { | |
return ( | |
<Entity> | |
{members.map(this.renderMember.bind(this))} | |
</Entity> | |
) |
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
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 ( |
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
// 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> |