Skip to content

Instantly share code, notes, and snippets.

@edivandecastro
Last active September 4, 2017 19:47
Show Gist options
  • Save edivandecastro/9bc76b0582d5f9733db6 to your computer and use it in GitHub Desktop.
Save edivandecastro/9bc76b0582d5f9733db6 to your computer and use it in GitHub Desktop.
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
# [2.2] Listando pacotes .deb no linux
$~> sudo dpkg -l | grep nome_do_infeliz
# [3] Buscando valores entre datas em rails
Pessoa.where(:created_at => params["data_inicial"].to_date.beginning_of_day..params["data_final"].to_date.end_of_day)
# [4] com problemas para executar git commit --amend
# Consider using Damien Cassou's PPA:
# To add this PPA:
$~> sudo add-apt-repository ppa:cassou/emacs
$~> sudo apt-get update
# For emacs-snapshot:
$~> sudo apt-get install emacs-snapshot-el emacs-snapshot-gtk emacs-snapshot
# Or, for emacs24 (i.e. 24.3, stable):
$~> sudo apt-get install emacs24 emacs24-el emacs24-common-non-dfsg
# Update
# As mentioned in Damien Cassou's PPA, the repository will not be maintained further (currently features Emacs 24.3) and it is
# recommended to use the Ubuntu Elisp PPA.
# Hence, use this to add the PPA:
$~> sudo add-apt-repository ppa:ubuntu-elisp/ppa
$~> sudo apt-get update
$~> sudo apt-get install emacs-snapshot emacs-snapshot-el
# Ref: Emacs guide
# Procurando pacotes no repositório do linux:
$~> apt-cache search keyword
# Alterar a senha do usuário no postgresql
ALTER USER "user_name" WITH PASSWORD 'new_password';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment