This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SPACESHIP_PROMPT_ORDER=( | |
user # Username section | |
dir # Current directory section | |
host # Hostname section | |
git # Git section (git_branch + git_status) | |
hg # Mercurial section (hg_branch + hg_status) | |
exec_time # Execution time | |
line_sep # Line break | |
vi_mode # Vi-mode indicator | |
jobs # Background jobs indicator |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Customizing your shell prompt | |
Shell prompts are extremely customizable. You can customize them in two ways: (1) by using command characters that print out special things and (2) by using colors. Also, customizing the prompt is different in different shells; I'm going to cover tcsh and zsh here. bash is the other popular shell, but I think it sucks, and I never use it, so I'm not going to waste any time on it. | |
tcsh | |
zsh | |
tcsh | |
I'll start with tcsh, since it's the default BSD and Mac OS X shell. Here's a very simple prompt: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Instalando o Ruby no RVM | |
rvm install 2.0.0-p451 | |
# Criando uma gemset e instalando o Rails | |
rvm gemset create rails_4_0_5 | |
rvm 2.0.0-p451@gastos_rails_4_0_5 #usando a gemset com a versão do ruby instalada | |
gem install rails -v 4.0.5 | |
# Verificando se tudo foi ok | |
ruby -v |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Get RVM and configure it | |
New - $ curl -sSL https://get.rvm.io | bash -s stable | |
Existent - $ rvm get stable | |
$ rvm requirements | |
Mac - $ brew install libyaml | |
Linux - $ apt-get install libyaml-dev | |
Mac - $ rvm install 2.0.0 --with-openssl-dir=$HOME/.rvm/opt/openssl | |
Linux - $ rvm install 2.0.0 --with-openssl-dir=$HOME/.rvm/usr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env sh | |
# Filename: update-hosts.sh | |
# Authors: George Lesica <[email protected]> | |
# Danilo Fasolin Salmazio <[email protected]> | |
# Description: Replaces the HOSTS file with a customized version (hosts-file.net) that blocks | |
# domains that serve ads and malicious software, creating a backup of the old | |
# file. | |
# Improvements: Add the partial file, a /etc/hosts_dev with some development hosts and creates | |
# a logfile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Configure the proxy settings in the .bashrc | |
If you want set the proxy for all the users you can do it in the system wide .bashrc file. | |
sudo vi /etc/bash.bashrc | |
#proxy settings | |
export http_proxy=http://DOMAIN\USERNAME:PASSWORD@SERVER:PORT/ | |
export ftp_proxy=http://DOMAIN\USERNAME:PASSWORD@SERVER:PORT/ | |
Additionally if you want APT to use a proxy server you can configure it in the /etc/apt/apt.conf configuration file. | |
sudo vi /etc/apt/apt.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# su - postgres | |
$ createdb mydb | |
$ psql -s mydb | |
# create user someuser password 'somepassword'; | |
# GRANT ALL PRIVILEGES ON DATABASE mydb TO someuser; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Use proxycfg -u to get the proxy informations | |
set http_proxy=http://username:[email protected]:port |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Uninstall your MySQL using the commands below | |
--------- | |
sudo rm /usr/local/mysql | |
sudo rm -rf /usr/local/mysql* | |
sudo rm -rf /Library/StartupItems/MySQLCOM | |
sudo rm -rf /Library/PreferencePanes/My* | |
edit /etc/hostconfig and remove the line MYSQLCOM=-YES- | |
sudo rm -rf /Library/Receipts/mysql* | |
sudo rm -rf /Library/Receipts/MySQL* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set linesize 1000 | |
set pagesize 0 | |
set trimspool on | |
set feedback off | |
set time off | |
set timing off | |
set echo off | |
select 'Inicio: ' || to_char(sysdate,'HH24:MI:SS') from dual; |
NewerOlder