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
sudo -u root /opt/Aptana_Studio_3/AptanaStudio3 |
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
//carrega a lib Http do Node | |
var http = require('http'); | |
//Cria um serviço web para tratar requisicao | |
var _server = http.createServer(function(request,response) | |
{ | |
//parametros do cabeçalho | |
response.writeHead(200,{'Content-Type': 'text/html'}); |
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 fs = require('fs'); | |
var contents = | |
fs.readFile('index.html' , function(err, ctt) | |
{ | |
console.log(ctt); | |
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 MailListener = require("mail-listener2"); | |
var Cylon = require("cylon"); | |
var mailListener = new MailListener({ | |
username: "[email protected]", //seu email | |
password: "", //sua senha | |
host: "imap.gmail.com", | |
port: 993, | |
tls: true, | |
tlsOptions: { rejectUnauthorized: false }, |
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 mvcApp = angular.module('diretivasAng', []); | |
mvcApp.controller('dirController', function dirController($scope) { | |
$scope.frutas = [ | |
{name:'Maça'}, | |
{name:'Uva'}, | |
{name:'Jaca'} | |
]; |
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
<!DOCTYPE html> | |
<!-- diretiva ng-app --> | |
<html ng-app="diretivasAng"> | |
<head> | |
<meta charset="utf-8" /> | |
<title> Diretivas</title> | |
<script> | |
document.write('<base href="' + document.location + '" />'); |
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
<!DOCTYPE html> | |
<html ng-app> | |
<head> | |
<title>TRABALHANDO COM CONTROLLERS</title> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/angularjs/1.0.7/angular.min.js"></script> | |
<script type="text/javascript" src="contatos.js"> </script> | |
</head> | |
<body> |
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
function ContatoController($scope) { | |
$scope.contatos = ["renato", "astrogildo"]; | |
$scope.adicionar = function() { | |
$scope.contatos.push($scope.novo); | |
$scope.novo = ""; | |
} | |
} |
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
<html ng-app='AngularIntro'> | |
<head> | |
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.0.7/angular.min.js"></script> | |
</head> | |
<body ng-controller='SimpleController'> | |
<input type='text' ng-model='name'> | |
<input type='button' value='Adicionar' ng-click='addName()'> | |
<table> |
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
<!DOCTYPE html> | |
<html ng-app="app"> | |
<head> | |
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.0.7/angular.min.js"></script> | |
<script type="text/javascript"> | |
app = angular.module("app", []); | |
app.controller('MainCtrl', function($scope, config) { | |
$scope.config = config; |