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
/** | |
* Start main render loop | |
*/ | |
beginRenderToContainer: function(container){ | |
// Prepare render | |
this.scene.defaultCamera.updateProjectionMatrix(); | |
this.container = container; | |
this.clock.start(); |
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 () { | |
"use strict"; | |
var Toolbox = window.Toolbox = {}; | |
// `ctor` and `inherits` are from Backbone (with some modifications): | |
// http://documentcloud.github.com/backbone/ | |
// Shared empty constructor function to aid in prototype-chain creation. | |
var ctor = function () {}; |
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
/** | |
* Gruntfile | |
* | |
* If you created your Sails app with `sails new foo --linker`, | |
* the following files will be automatically injected (in order) | |
* into the EJS and HTML files in your `views` and `assets` folders. | |
* | |
* At the top part of this file, you'll find a few of the most commonly | |
* configured options, but Sails' integration with Grunt is also fully | |
* customizable. If you'd like to work with your assets differently |
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
/** | |
* Cross-Origin Resource Sharing (CORS) | |
* | |
* CORS is like a more modern version of JSONP-- it allows your server/API | |
* to successfully respond to requests from client-side JavaScript code | |
* running on some other domain (e.g. google.com) | |
* Unlike JSONP, it works with POST, PUT, and DELETE requests | |
* | |
* For more information on CORS, check out: | |
* http://en.wikipedia.org/wiki/Cross-origin_resource_sharing |
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
sudo iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-ports 3000 |
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/sh | |
### BEGIN INIT INFO | |
# Provides: disable-transparent-hugepages | |
# Required-Start: $local_fs | |
# Required-Stop: | |
# X-Start-Before: mongod mongodb-mms-automation-agent | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Disable Linux transparent huge pages | |
# Description: Disable Linux transparent huge pages, to improve |
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 | |
##############ADD NEW HOST ############## | |
HOME_BASE="/home/" | |
read -p "Enter username : " username | |
read -p "New host name : " hostname | |
mkdir ${HOME_BASE}$username/$hostname | |
mkdir ${HOME_BASE}$username/$hostname/public_html | |
mkdir ${HOME_BASE}$username/$hostname/log |
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 | |
##############ADD NEW USER############## | |
HOME_BASE="/home/" | |
read -p "Enter username : " username | |
useradd -m -d ${HOME_BASE}$username -s /bin/false $username | |
chown root:root ${HOME_BASE}$username |
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.Collections.Generic; | |
using UnityEngine; | |
using System.Collections; | |
[RequireComponent(typeof(SelectLevelDataSource))] | |
public class SelectLevelSwipe : MonoBehaviour, IGuiMove, IGuiTouch | |
{ | |
const float SWIPE_MAX_DURATION = 0.3f; | |
//************************************************************************** |
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.Collections.Generic; | |
using UnityEngine; | |
using System.Collections; | |
public class GuiTouchListener : RuntimeInteractiveObject | |
{ | |
const float SWIPE_MIN_LENGTH = 25.0f; | |
const float TOUCH_BEGIN_DELAY = 0.03f; | |
// Events methods names |