Skip to content

Instantly share code, notes, and snippets.

require 'celluloid'
class FilePutter
include Celluloid
def initialize(filename)
@filename = filename
end
def load_file
require 'celluloid'
class FilePutter
include Celluloid
def initialize(filename)
@filename = filename
end
def load_file
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/
// 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.
@edivandecastro
edivandecastro / ServerHttp2.js
Created July 26, 2013 19:40
Estudo do node.js no site http://udgwebdev.com/node-js-para-leigos-trabalhando-com-http/ Recuperando a URL da requisição http.
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") {
@edivandecastro
edivandecastro / ServerHttp3.js
Created July 26, 2013 20:47
Estudo do node.js no site http://udgwebdev.com/node-js-para-leigos-trabalhando-com-http/ Realizando parse da url da requisição.
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>");
sudo fdisk -l
<%= 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>
edivan@mint-virtual-machine ~/Projetos/VidracariaPaulista $ cap development deploy
DEBUG [cfc067fd] Running /usr/bin/env [ -d ~/.rvm ] as deploy@devrb.agilgpr.com.br
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 deploy@devrb.agilgpr.com.br
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 deploy@devrb.agilgpr.com.br
DEBUG [0e7d0208] Command: /usr/local/rvm/bin/rvm version
DEBUG [0e7d0208] rvm 1.26.10 (latest) by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.io/]
@edivandecastro
edivandecastro / help
Last active September 4, 2017 19:47
Help
# [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