Skip to content

Instantly share code, notes, and snippets.

View thiagovsk's full-sized avatar
🏠
Working from home

Thiago Ribeiro thiagovsk

🏠
Working from home
View GitHub Profile
@thiagovsk
thiagovsk / gist:a69ed1de0a749e56d344
Created October 10, 2014 14:09
Passo a Passo hook
Dado o projeto principal no gitlab
e um projeto qualquer no github
1- criar uma chave ssh publica com usuario git aonde o gitlab está instalado.
$ su git
e depois seguir https://help.github.com/articles/generating-ssh-keys/
PS: Não adicionar passprhase
@thiagovsk
thiagovsk / gist:fd363f437240d800f020
Created October 20, 2014 17:25
COMO SUBIR O COLAB?
1- criar um project_cfg
2- hieradata em puppet/hieradata/common.yaml
3- em hostnmaes abaixo de localhost colocar o ip da maquina
4- criar um local settings com o nome do ambiente em src/cola
5- em allowed host colocar o ip da maquina
6- fab environment:'digitalocean' bootstrap
6- fab environment:'digitalocean' depoy
@thiagovsk
thiagovsk / cheff.txt
Created November 19, 2014 15:24
Instalação e configuração do cheff
https://www.digitalocean.com/community/tutorials/how-to-install-chef-and-ruby-with-rvm-on-a-ubuntu-vps
@thiagovsk
thiagovsk / gist:1c97be88875bc9ea8748
Created December 3, 2014 01:05
passo a passo cheff do shell ao cheff
Deixa tudo instalado como https://www.digitalocean.com/community/tutorials/how-to-install-chef-and-ruby-with-rvm-on-a-ubuntu-vps
gem install chef --no-ri --no-rdoc
gem install librarian-chef
gem install knife-solo --no-ri --no-rdoc
sudo apt-get install libxslt-dev libxml2-dev
gem install berkshelf --no-ri --no-rdoc
gem install foodcritic --no-ri --no-rdoc

Gems

  • Bundler - Bundler maintains a consistent environment for ruby applications. It tracks an application's code and the rubygems it needs to run, so that an application will always have the exact gems (and versions) that it needs to run.
  • rabl - General ruby templating with json, bson, xml, plist and msgpack support
  • Thin - Very fast and lightweight Ruby web server
  • Unicorn - Unicorn is an HTTP server for Rack applications designed to only serve fast clients on low-latency, high-bandwidth connections and take advantage of features in Unix/Unix-like kernels.
  • SimpleCov - SimpleCov is a code coverage analysis tool for Ruby 1.9.
  • Zeus - Zeus preloads your Rails app so that your normal development tasks such as console, server, generate, and specs/tests take less than one second.
  • [factory_girl](h
eu
15:08
tentar integrar as partes do mezuro com uma interface mais simples de comunicação
Diego Araújo
15:09
her
eu
15:09
eu
18:21
teste
ta escutando ?
caiu
criar outro opener
e instalar
opener_cookies
criar a jar antes
na hora de chamar o http_response passar a jar de cookie também
@thiagovsk
thiagovsk / gist:f05086ba6572401e38c6
Created February 3, 2015 13:38
Colab dia 03 de fevereiro
- ativar o plugin do track
vim /etc/colab/settings.yml
PROXIED_APPS:
# gitlab:
# upstream: 'http://localhost:8090/gitlab/'
# private_token: ''
trac:
upstream: 'http://localhost:5000/trac/'
- criar um database p/ track
@thiagovsk
thiagovsk / oop.md
Last active August 29, 2015 14:14 — forked from robotlolita/oop.md

Objeto é a noção de uma entidade que é definida inteiramente pelo seu comportamento. E esse comportamento é dinâmicamente selecionado. Em outras palavras, eu "peço" um objeto para "andar," e como ele vai fazer isso é inteiramente definido pelo objeto.

O exemplo:

objeto.anda()

Captura bem essa idéia. Eu tenho uma mensagem "anda," mas eu não consigo dizer o que essa função faz direto do meu código, porque isso depende no comportamento dinâmico da execução do programa (em uma linguagem estáticamente tipada você consegue optimizar isso, mas o raciocínio do código continua o mesmo).

# sudo nano /opt/nginx/conf/nginx.conf
worker_processes 2;
worker_rlimit_nofile 100000;
events {
worker_connections 768;
use epoll;
multi_accept on;