Note: replace {{server}} with your domain or ip
- Login as the ec2-user
ssh -i key.pem ec2-user@{{server}}
- Switch to administrator
sudo -i
var target : Transform; | |
function Update(){ | |
//the direction vector to target | |
var dir = (target.position - transform.position).normalized; | |
var hit :RaycastHit; | |
if (Physics.Raycast(transform.position,transform.forward,hit ,20)){ | |
//no self collision | |
if(hit.transform !=transform) |
Note: replace {{server}} with your domain or ip
ssh -i key.pem ec2-user@{{server}}
sudo -i
<?php | |
$host = 'localhost'; // MYSQL database host adress | |
$db = ''; // MYSQL database name | |
$user = ''; // Mysql Datbase user | |
$pass = ''; // Mysql Datbase password | |
// Connect to the database | |
$link = mysql_connect($host, $user, $pass); | |
mysql_select_db($db); |
/* | |
* Backbone Session | |
* Source: https://github.com/makesites/backbone-session | |
* Copyright © Makesites.org | |
* | |
* Initiated by Makis Tracend (@tracend) | |
* Distributed through [Makesites.org](http://makesites.org) | |
* Released under the [MIT license](http://makesites.org/licenses/MIT) | |
*/ |
// Handlebars Localisation Helper | |
// Source: https://gist.github.com/tracend/3261055 | |
Handlebars.registerHelper('l10n', function(keyword) { | |
var lang = (navigator.language) ? navigator.language : navigator.userLanguage; | |
// pick the right dictionary (if only one available assume it's the right one...) | |
var locale = window.locale[lang] || window.locale['en-US'] || window.locale || false; | |
// exit now if there's no data | |
if( !locale ) return target; |
# compress a file | |
gzip -9 [filename] | |
# get the file headers of a url | |
curl -I [url] |
FB.api({ method: 'pages.isFan', page_id: '{PAGE_ID}' }, function(response) { | |
if (response) { | |
alert("user has liked the page"); | |
} else { | |
alert("user has not liked the page"); | |
} | |
}); |
# protect the htaccess file | |
<files .htaccess> | |
order allow,deny | |
deny from all | |
</files> | |
# disable the server signature | |
ServerSignature Off | |
# limit file uploads to 10mb |
Every line's been accounted for and tested… The community has voted with their applications and contributions… When all's said and done, there's a piece of software left, a monument, testament to the effort and ability put into creating a working solution. Now, lets make sure it stays relevant and delay the inevitability of becoming a relic of the past.
There are probably very few sayings more saturated than: "Sharing is caring". Yet, collaborative development is proven to generate better results. The more eyes look at the source the better the chances of improving it to create a better solution. This doesn't change after the core work is finished.
// Handlebars helper: Contains | |
// check if a value is contained in an array | |
Handlebars.registerHelper("contains", function( value, array, options ){ | |
// fallback... | |
array = ( array instanceof Array ) ? array : [array]; | |
return (array.indexOf(value) > -1) ? options.fn( this ) : ""; | |
}); |