This file contains hidden or 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
1 - Após o acesso SSH na instância da amazon efetue atualize os pacotes da distribuição | |
$ sudo apt-get update | |
$ sudo apt-get upgrade | |
2 - Instalar o APACHE | |
$ sudo apt-get install apache2 -y | |
3 - Instalar o MySQL | |
$ sudo apt-get install mysql-server mysql-client -y |
This file contains hidden or 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
$stmt = $dbh->prepare(' | |
SELECT | |
* | |
FROM | |
table | |
ORDER BY | |
name | |
LIMIT | |
:limit | |
OFFSET |
This file contains hidden or 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
'use strict' | |
const express = require('express'); | |
const bodyParser = require('body-parser'); | |
const path = require('path'); | |
const app = express(); | |
//Handler to provider any function to parse in ObjectId | |
String.prototype.toObjectId = function() { | |
var ObjectId = (require('mongoose').Types.ObjectId); | |
return new ObjectId(this.toString()); |
This file contains hidden or 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 str = '0x41FC6733'; | |
function parseFloat(str) { | |
var float = 0, sign, order, mantiss,exp, | |
int = 0, multi = 1; | |
if (/^0x/.exec(str)) { | |
int = parseInt(str,16); | |
}else{ | |
for (var i = str.length -1; i >=0; i -= 1) { | |
if (str.charCodeAt(i)>255) { |
NewerOlder