Lucas Neves Martins lucasmartins

View gist:8690171
1
heroku config:set BUILDPACK_URL=https://github.com/heroku/heroku-buildpack-ruby.git#v84 --app YOURAPP
View atualizando_ssl_heroku.md

(check the en_US version here)

Gerando um novo cert. SSL e atualizando no Heroku

Para gerar um novo certificado SSL você precisa dos seguintes procedimentos:

  • @dev Gerar um .CSR (é um arquivo texto com uma chave);
  • @dev Enviar o .CSR para a entidade certificadora (TheSSLstore);
    • @dev Verificar o Ownership do domínio via email (também da pra colocar um arquivo no srv. http);
    • @dev Baixar o .CRT (vem um zip com vários .CRT);
  • @dev Criar o bundle.crt
View updating_heroku_ssl.md

(check the pt_BR version here)

Updating your Heroku SSL certificate

To generate the new SSL you need to follow these steps:

  • @dev Generate a .CSR (a key text file);
  • @dev Send the .CSR to your certificate authority (We use TheSSLstore);
    • @dev Verify the domain ownership through email (you can also put a file at your http server);
    • @dev Download the .CRT file (probably a zipball with a bunch of .CRT files);
  • @dev Brew the bundle.crt
View dtrace_tips.md
View reports.rake
1 2 3 4 5 6 7 8 9 10
#@author: Lucas Martins
 
namespace :report do
desc 'Reports remaining time of tasks under work'
task :remaining => :environment do
data = []
Issue.find(:all, :conditions => ['status_id in (?)', [2,4] ],:order=>'id').each do |issue|
remaining = issue.estimated_hours-issue.spent_hours
puts "##{issue.id} '#{issue.subject}' => remaining: #{remaining}, spent: #{issue.spent_hours}, estimated: #{issue.estimated_hours}"
subtasks = []
View simple_socket_buffer.rb
1 2 3 4 5 6 7 8 9 10
require 'socket'
 
server = TCPServer.open(6060)
 
loop {
client = server.accept
loop {
buffer = client.gets()
if buffer.nil?
buffer.close
View readable_token.rb
1 2 3 4 5 6 7 8 9 10
#!/usr/bin/env ruby
# encoding: UTF-8
 
# Simple readable password generation in Ruby.
#
# Generate reasonably secure random passwords of any chosen length,
# designed to be somewhat easy for humans to read and remember.
# Each password has a capitalized letter and a digit.
#
# Example:
View rbenv-install
1 2 3 4 5 6 7 8 9 10
#!/usr/bin/env bash
 
# This is (kinda) a RBenv (plus ruby-build) installer for linux
# Just copy & paste off the install instructions from Github.
 
cd
git clone git://github.com/sstephenson/rbenv.git .rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
source ~/.bash_profile
View id_rsa.pub
1
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAtfa1ympybOXisMIlvinQ5nbDB0WGtu4q5SaUaQ67M7GJ8oacBCAy63pf9YCf+GuJ9XvQDhAhRGUPpmn0qtz5zP+ZTLrRdXZ9tYcl4RHo3ElCFgvaL5vWsISxwBXj4G4xLX4GTMSWYDJvQCzm2rWxqq98nswWvFOOgPh40Wx2ztU1uNXEq1tOO/1AtF/nTGL/xZzjw59fpjhP1UghkXfYd/nMPQDIytvNXJdc3V/O+Oo4vfkOqQ0+feL9laeJuht5XPDm/GMfLajkf+iJe7e9AIMIJhEsNCJj0GC4plricTXzqnY12iaIzupDf11M9/hbPNOImUFuB1zbmTaTIKCUYQ== siga
Something went wrong with that request. Please try again.