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
require 'celluloid' | |
class FilePutter | |
include Celluloid | |
def initialize(filename) | |
@filename = filename | |
end | |
def load_file |
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
require 'celluloid' | |
class FilePutter | |
include Celluloid | |
def initialize(filename) | |
@filename = filename | |
end | |
def load_file |
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
E, [2012-08-22T10:27:03.495002 #7303] ERROR -- : FilePutter: async call `load_file_and_print' failed! | |
NoMethodError: undefined method `load_file_and_print' for #<Celluloid::Actor(FilePutter:0x4a6b7c) @filename="/home/cti/edivansoares/celluloid/kernel.log"> | |
/home/cti/edivansoares/.rvm/gems/ruby-1.9.3-p125/gems/celluloid-0.11.1/lib/celluloid/calls.rb:12:in `check_signature' | |
/home/cti/edivansoares/.rvm/gems/ruby-1.9.3-p125/gems/celluloid-0.11.1/lib/celluloid/calls.rb:93:in `dispatch' | |
/home/cti/edivansoares/.rvm/gems/ruby-1.9.3-p125/gems/celluloid-0.11.1/lib/celluloid/actor.rb:240:in `block in handle_message' | |
/home/cti/edivansoares/.rvm/gems/ruby-1.9.3-p125/gems/celluloid-0.11.1/lib/celluloid/task.rb:45:in `block in initialize' | |
E, [2012-08-22T10:27:03.495301 #7303] ERROR -- : FilePutter: async call `load_file_and_print' failed! | |
NoMethodError: undefined method `load_file_and_print' for #<Celluloid::Actor(FilePutter:0x4a6424) @filename="/home/cti/edivansoares/celluloid/system.log"> | |
/home/cti/edivansoares/.rvm/gems/ |
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
// Carrega a biblioteca HTTP do Node.js | |
var http = require('http'); | |
// var server = http.createServer(function(request, response) { | |
var server = http.createServer(function(request, response) { | |
// Define os parâmetros de cabeçalho de resposta. | |
response.writeHead(200, {'Content-Type': 'text/html'}); | |
// Escreve uma mensagem de resposta do servidor. | |
response.write('<html><body><h1>Hello World!</h1></body></html>'); | |
// Envia uma resposta para o cliente. |
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'); | |
var server = http.createServer(function(request, response) { | |
response.writeHead(200, {"Content-Type": "text/html", "encoding" : "utf8"}); | |
if(request.url == "/") { | |
response.write("<html><body><h1>Olá Node.js</h1>"); | |
response.write("<a href='/bemvindo'>Bem Vindo!</a>"); | |
response.write("</body><html>"); | |
} else if(request.url == "/bemvindo") { |
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'); | |
var url = require('url'); | |
var server = http.createServer(function(request, response){ | |
// Faz parse da url digitada. | |
var result = url.parse(request.url, true); | |
response.writeHead(200, {"Content-Type": "text/html", "encoding": "utf8"}); | |
response.write("<html><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
sudo fdisk -l |
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
<%= form_for(@ambiente, :html => {:class => "form-horizontal"}) do |f| %> | |
<% if @ambiente.errors.any? %> | |
<div id="error_explanation"> | |
<h2><%= pluralize(@ambiente.errors.count, "error") %> prohibited this ambiente from being saved:</h2> | |
<ul> | |
<% @ambiente.errors.full_messages.each do |message| %> | |
<li><%= message %></li> | |
<% end %> | |
</ul> |
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
edivan@mint-virtual-machine ~/Projetos/VidracariaPaulista $ cap development deploy | |
DEBUG [cfc067fd] Running /usr/bin/env [ -d ~/.rvm ] as [email protected] | |
DEBUG [cfc067fd] Command: [ -d ~/.rvm ] | |
DEBUG [cfc067fd] Finished in 2.421 seconds with exit status 1 (failed). | |
DEBUG [73c05d07] Running /usr/bin/env [ -d /usr/local/rvm ] as [email protected] | |
DEBUG [73c05d07] Command: [ -d /usr/local/rvm ] | |
DEBUG [73c05d07] Finished in 0.338 seconds with exit status 0 (successful). | |
DEBUG [0e7d0208] Running /usr/local/rvm/bin/rvm version as [email protected] | |
DEBUG [0e7d0208] Command: /usr/local/rvm/bin/rvm version | |
DEBUG [0e7d0208] rvm 1.26.10 (latest) by Wayne E. Seguin <[email protected]>, Michal Papis <[email protected]> [https://rvm.io/] |
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
# [1] Definir o Vim como editor default | |
# http://vim.wikia.com/wiki/Set_Vim_as_your_default_editor_for_Unix | |
# no ubuntu | |
$~> sudo update-alternatives --config editor | |
# [2] Instalando pacotes .deb no linux | |
$~> sudo dpkg -i nome_do_infeliz.deb | |
# [2.1] Removendo pacotes .deb no linux | |
$~> sudo dpkg --purge nome_do_infeliz |
OlderNewer