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 lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<title>Firebase Chat</title> | |
<script src="https://cdn.tailwindcss.com"></script> | |
</head> | |
<body> |
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 http = require( 'http' ); | |
module.exports.bootstrap = function(cb) { | |
//If the environment is production, then listen on port 80 | |
if(sails.config.environment === "production") { | |
http.createServer( sails.hooks.http.app ).listen( 80 ); | |
} | |
cb(); | |
} |
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
module.exports = function(req, res, next) { | |
if (req.secure) { | |
// Already https; don't do anything special. | |
next(); | |
} else { | |
// Redirect to https. | |
res.redirect('https://' + req.headers.host + req.url); | |
} | |
}; |
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
module.exports = { | |
ssl: { | |
ca: require('fs').readFileSync(__dirname + '/ssl/ca.crt'), | |
key: require('fs').readFileSync(__dirname + '/ssl/key.key'), | |
cert: require('fs').readFileSync(__dirname + '/ssl/cert.crt') | |
}, | |
port: 443, | |
policies: { | |
'*': 'isHTTPS' | |
} |
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
module.exports = { | |
ssl: { | |
ca: require('fs').readFileSync(__dirname + '/ssl/ca.crt'), | |
key: require('fs').readFileSync(__dirname + '/ssl/key.key'), | |
cert: require('fs').readFileSync(__dirname + '/ssl/cert.crt') | |
}, | |
port: 443 | |
} |
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
#!/bin/bash | |
# A bash script to setup GIT like deployment on your server | |
echo "Enter your server address e.g 25.32.132.1 or yourserver.com" | |
read serverAddress | |
echo "Enter Username which you use to login to your server e.g ubuntu" | |
read username | |
echo "Enter path of the private key (optional)" | |
read privateKeyPath | |
echo "Path of your server directory where code should reside: e.g ~/code or /var/www (required)" | |
read tempPath |
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
#! /bin/bash | |
export RUN_AS='sentry'; | |
export INSTALL_DIR='/var/www/sentry'; | |
HOSTNAME='http://mysentry.example.com'; # No trailing slash | |
DB_HOST='something.rds.amazonaws.com'; | |
DB_PORT='5432'; | |
DB_USER='sentry'; | |
DB_NAME='sentry'; | |
DB_PASSWORD='DB_PASSWORD'; |
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(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.mqtt = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){ | |
(function (process,global){ | |
'use strict'; | |
/** | |
* Module dependencies | |
*/ | |
/*global setImmediate:true*/ | |
var events = require('events'), | |
Store = require('./store'), | |
eos = require |
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
collaborativeLearningApp.service('screenShare', function($q, mainService) { | |
var $scope = undefined; | |
var that = this; | |
this.socket = mainService.socket; | |
this.getScope = function(s, room) { | |
$scope = s; | |
that.loadCount = 0; | |
var countx = 0, | |
county = 0; |
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
Environment: | |
Request Method: GET | |
Request URL: http://localhost:8000/me/ | |
Django Version: 1.7b4 | |
Python Version: 2.7.5 | |
Installed Applications: | |
('django.contrib.admin', |
NewerOlder