Skip to content

Instantly share code, notes, and snippets.

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

M. Bellucci delbetu

🏠
Working from home
View GitHub Profile
function start_if_not_running {
service_name=$1
mypid=$(pgrep $service_name)
if [[ ! -n $mypid ]]; then
$service_name > log/$service_name.log 2>&1 &
mypid=$!
fi
echo $service_name $mypid
}
@delbetu
delbetu / .gitconfig
Created February 18, 2016 14:40
Current git configuration
[user]
name = Marcos Bellucci
email = <[email protected]>
[color]
branch = auto
status = auto
ui = auto
[apply]
whitespace = nowarn
[push]
@delbetu
delbetu / install_vim.md
Last active March 9, 2016 16:24
My vim installation
  cd ~
  wget ftp://ftp.vim.org/pub/vim/unix/vim-7.4.tar.bz2
  tar -xvfj vim-7.4.tar.bz2
  cd vim74/src
  make clean
  make distclean
  sudo make uninstall
  ./configure --prefix=/usr/local \
 --enable-rubyinterp \
@delbetu
delbetu / osx_pg_install.md
Last active April 19, 2016 23:37
Instructions to install postgres on mac os

#Postgres ##Install

brew install postgresql
brew services start postgresql
initdb /usr/local/var/postgres - create new database cluster
/usr/local/Cellar/postgresql/<version>/bin/createuser -s postgres

##To start server at startup

@delbetu
delbetu / refer_core_flow.md
Last active June 13, 2016 15:21
List of QA proceses for refer first release.

#Roles-Responsibilities ##Admin

  • Creates companies

##Company User (Human resource)

  • Manage employees
  • Manage positions
  • Hire candidates
  • Manage payments

#Guía para proceso de selección

##que es lo que precisamos ? Analizamos esto en base a lista de skills y como evaluarlas

##Skills Requeridas

1) Language        -> Candidate must speak, read and write english
2) Problem solving -> Debe poder resolver problemas que exijan un pensamiento lógico
@delbetu
delbetu / names.md
Created November 29, 2016 15:47
Uncle Bob best practices - Naming

#Names

Names are a powerfull tool for communcating your intent

If you have to put a comment to explain your name then you chose a bad name

Make sure the a names says what it means and means what it says

If you have to read the code to undertstand what it means that is a bad name

@delbetu
delbetu / functions.md
Last active December 5, 2016 00:31
Uncle Bob best practices - Functions

Functions

Functions are the first tier of organization Should have as few levels of indent as possible Functions should be well named and should be organized into well named classes within well named namespaces

Function size

Functions should be 4,6 lines.

A function should do one thing, it should do it well and it should do it only

@delbetu
delbetu / function_structure.md
Last active February 11, 2024 17:28
Uncle Bob best practices function structure

Intro

  • function signature should be small- the fewer the arguments the better
  • what types should be passed into those arguments
  • why switch and if cost such harm in the software structure ? -> how to get rid of them ?
  • why assign operator is consider harmful ?
  • Many software problems can be avoided by constraining state changing operators, and side effects.
  • How to structure our functions making error handling clean and maintainable fashion ?

Function arguments

@delbetu
delbetu / ruby_meta_programming.md
Created December 10, 2016 20:44
Ruby meta programming example. define_method, instance_eval, blocks