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
### USAGE | |
### | |
### ./ElasticSearch.sh 1.5.0 will install Elasticsearch 1.5.0 | |
### ./ElasticSearch.sh 1.4.4 will install Elasticsearch 1.4.4 | |
### ./ElasticSearch.sh will fail because no version was specified (exit code 1) | |
### | |
### CLI options Contributed by @janpieper | |
### Check http://www.elasticsearch.org/download/ for latest version of ElasticSearch | |
### ElasticSearch version |
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
<script type="text/template" id="content"> | |
<div class="header-block"></div> | |
<div class="index-content fill"> |
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
if self.temp_state != self.status && self.temp_state.present? and !self.uncompleted? | |
event = self.temp_state | |
self.send(event) | |
self.temp_state = "" | |
self.save | |
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
if !self.video_answers.empty? and self.interview.questions.count == (self.video_answers.with_state(:to_merge).count + self.video_answers.with_state(:convert_finish).count) and self.uncompleted? | |
self.complete | |
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
class Api::SessionsController < ApplicationController | |
before_action :current_user, except: :create | |
def show | |
render json: @user, serializer: UserSerializer | |
end | |
def create | |
@auth = false | |
if params[:password].present? |
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 Api::SessionsController < ApplicationController | |
before_action :current_user, except: :create | |
def show | |
render json: @user, serializer: UserSerializer | |
end | |
def create | |
@auth = false | |
if params[:password].present? |
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
define([ | |
'core/Model', | |
'./BaseWizardStep', | |
'text!./_tmpl/RecordVideoAnswer.tmpl.html', | |
'record-rtc', | |
'jquery', | |
'underscore', | |
'backbone' |
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
if (this.isFirefox) { | |
this.recordAudio.stopRecording(_.bind(function(url) { | |
this.preview.get(0).src = url; | |
// this.sendBlob(this.recordAudio.getBlob()); | |
this.recordAudio.getDataURL(_.bind(function(audioDataUrl){this.sendBlob(audioDataUrl)},this)); | |
}, this)); | |
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
<!DOCTYPE html> | |
<html> | |
<head lang="en"> | |
<meta charset="UTF-8"> | |
<title></title> | |
<link rel="stylesheet" type="text/css" href="css/bootstrap.css" /> | |
<link rel="stylesheet" type="text/css" href="css/style.css" /> | |
<script type="text/javascript" src="/socket.io/socket.io.js"></script> | |
<script type="text/javascript" src="/underscore-min.js"></script> | |
<script type="text/javascript" src="http://cdn.peerjs.com/0.3/peer.js"></script> |
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 roomid = moderator.channel; | |
var SIGNALING_SERVER = 'wss://wsnodejs.nodejitsu.com:443'; | |
var websocket = new WebSocket(SIGNALING_SERVER); | |
websocket.onmessage = function (event) { | |
var data = JSON.parse(event.data); | |
if (data.isChannelPresent == false) { | |
moderator.open(); |