Skip to content

Instantly share code, notes, and snippets.

@roooodcastro
Last active April 6, 2017 17:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save roooodcastro/daddab8f703b3eec72862da2d23ad746 to your computer and use it in GitHub Desktop.
Save roooodcastro/daddab8f703b3eec72862da2d23ad746 to your computer and use it in GitHub Desktop.
Scripts Ubuntu STI
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'
alias "abrir-rails"="~/.open_tabs.sh"
alias "preparar-deploy"="~/preparar-deploy.sh"
alias gpm='git push origin master'
alias gphlog='git push origin homologacao'
alias gpp='git push origin producao'
alias gphfix='git push origin hotfix'
alias gplm='git pull origin master'
alias gplhlog='git pull origin homologacao'
alias gplp='git pull origin producao'
alias gplhfix='git pull origin hotfix'
alias ghtop='git checkout producao && git merge hotfix && git push origin producao'
alias gits='git status'
alias gitb='git branch'
alias gita='git add .'
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
# don't put duplicate lines or lines starting with space in the history.
# See bash(1) for more options
HISTCONTROL=ignoreboth
# append to the history file, don't overwrite it
shopt -s histappend
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
HISTSIZE=10000
HISTFILESIZE=20000
# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize
# If set, the pattern "**" used in a pathname expansion context will
# match all files and zero or more directories and subdirectories.
#shopt -s globstar
# make less more friendly for non-text input files, see lesspipe(1)
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
# set variable identifying the chroot you work in (used in the prompt below)
if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
debian_chroot=$(cat /etc/debian_chroot)
fi
# set a fancy prompt (non-color, unless we know we "want" color)
case "$TERM" in
xterm-color) color_prompt=yes;;
esac
# uncomment for a colored prompt, if the terminal has the capability; turned
# off by default to not distract the user: the focus in a terminal window
# should be on the output of commands, not on the prompt
force_color_prompt=yes
if [ -n "$force_color_prompt" ]; then
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
# We have color support; assume it's compliant with Ecma-48
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
# a case would tend to support setf rather than setaf.)
color_prompt=yes
else
color_prompt=
fi
fi
export PS1="\[$(tput bold)\]\[\033[38;5;82m\]\u\[$(tput sgr0)\]\[$(tput sgr0)\]\[\033[38;5;15m\]:\[$(tput sgr0)\]\[\033[38;5;33m\]\w\[$(tput sgr0)\]\[\033[38;5;15m\]:\[$(tput sgr0)\]\[\033[38;5;220m\]\A\[$(tput sgr0)\]\[\033[38;5;15m\]\\$ \[$(tput sgr0)\]"
unset color_prompt force_color_prompt
# If this is an xterm set the title to user@host:dir
case "$TERM" in
xterm*|rxvt*)
PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
;;
*)
;;
esac
# enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
alias ls='ls --color=auto'
#alias dir='dir --color=auto'
#alias vdir='vdir --color=auto'
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
fi
# Add an "alert" alias for long running commands. Use like so:
# sleep 10; alert
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
# Alias definitions.
# You may want to put all your additions into a separate file like
# ~/.bash_aliases, instead of adding them here directly.
# See /usr/share/doc/bash-doc/examples in the bash-doc package.
if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi
# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
if ! shopt -oq posix; then
if [ -f /usr/share/bash-completion/bash_completion ]; then
. /usr/share/bash-completion/bash_completion
elif [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi
fi
export PATH="$PATH:$HOME/.rvm/bin" # Add RVM to PATH for scripting
export ORACLE_HOME=/u01/app/oracle/product/11.2.0/xe
export ORACLE_SID=XE
export NLS_LANG=`$ORACLE_HOME/bin/nls_lang.sh`
export ANDROID_HOME=${HOME}/Android/Sdk
export PATH=${PATH}:${ANDROID_HOME}/tools
export PATH=${PATH}:${ANDROID_HOME}/platform-tools
export ORACLE_BASE=/u01/app/oracle
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
export ANDROID_STUDIO_HOME=/opt/android-studio
export PATH=$ORACLE_HOME/bin:$ANDROID_STUDIO_HOME/bin:$PATH
eval $(thefuck --alias)
export GIT_SSL_NO_VERIFY=1
export ORACLE_USER=rodrigo.castro
export ORACLE_PASSWORD=iduff
#!/bin/sh
type_command() {
xdotool type --delay 50 --clearmodifiers "$1"; xdotool key Return
}
new_tab() {
sleep 0.5
type_command "cd ~/workspace/$1"
sleep 0.5
type_command "$2"
sleep 0.5
}
# Get active gnome-terminal
WID=$(xprop -root | grep "_NET_ACTIVE_WINDOW(WINDOW)"| awk '{print $5}')
# Focus on it
xdotool windowfocus $WID
# Aba do servidor da aplicação
new_tab $1 "rails s"
# Aba do servidor do portal
xdotool key ctrl+shift+t
new_tab $1 "la"
# Aba do console Rails
xdotool key ctrl+shift+t
new_tab $1 "rails c"
# Aba geral de desenv
xdotool key ctrl+shift+t
new_tab $1 "git status"
wmctrl -i -a $WID
#!/bin/bash
declare -A sistemas
sistemas=( \
[1]="academico-core" \
[2]="administracao-academica" \
[3]="api" \
[4]="barras" \
[5]="barras_uff" \
[6]="conexao-uff" \
[7]="enade" \
[8]="hrm" \
[9]="http_error_pages" \
[10]="inscricao" \
[11]="lancamento_notas" \
[12]="portal-iduff" \
[13]="portal" \
[14]="portal-sso" \
[15]="projeto_padrao_rails.git" \
[16]="quadro-de-horarios" \
)
dialog --keep-tite --menu "Selecione o Sistema" 25 50 16 \
1 "Acadêmico Core" \
2 "Administração Acadêmica" \
3 "API Graduação" \
4 "Barras (App)" \
5 "Barras UFF (Gem)" \
6 "Conexão UFF" \
7 "Enade" \
8 "HRM" \
9 "HTTP Error Pages" \
10 "Inscrição" \
11 "Lançamento de Notas" \
12 "Portal Git Antigo (App)" \
13 "Portal Git Novo (App)" \
14 "Portal SSO (Gem)" \
15 "Projeto Padrão" \
16 "Quadro de Horários" \
2>temp
sistema=""
# OK is pressed
if [ "$?" = "0" ]
then
_return=$(cat temp)
if [ "$_return" != "" ]
then
sistema=${sistemas[$_return]}
echo $sistema > ultimo_sistema
fi
else
echo "Inicialização automática cancelada ):"
fi
rm -f temp
#! /bin/bash
# (WIP)
array=()
while IFS= read -r -d $'\0'; do
array+=("$REPLY")
done < <(find $HOME/workspace/ -type d -name .git -print0)
echo 'If you choose to continue, the following directories, as well as all of its subdirectories and files will be erased!'
echo $array
read -p "Are you sure you want to continue? (Y/N)" -r
echo # (optional) move to a new line
if [[ $REPLY =~ ^[Yy]$ ]]
then
echo "Done."
else
echo "It's ok to have doubts. Nothing was deleted."
fi
#!/bin/sh
#
# NAME
# nlslang.sh
#
# DESCRIPTION
# This script generates the NLS_LANG value derived from the target
# system's locale configuration.
#
# Mapping rule from Linux locale to NLS_LANG follows.
#
# A. LANGUAGE and TERRITORY
#
# (1) "AMERICAN_AMERICA" when the locale doesn't map to any
# Oracle LANGUAGE and TERROTORY
# (2) "AMERICAN_<territory>" when the locale doesn't map to Oracle
# LANGUAGE but maps to TERRITORY
# (3) "<language>_<default-territory-of-language>" when the locale
# maps to Oracle LANGUAGE but not to TERRITORY
# (4) "<language>_<territory>" when the locale maps to both Oracle
# LANGUAGE and TERRITORY
#
# B. CHARACTERSET
#
# (1) Map from the locale charmap to Oracle CHARACTERSET using the
# following table.
# (2) AL32UTF8 is used when the charmap is not found in the table
#
# charmap --> CHARACTERSET
# ----------- --------------
# UTF-8 AL32UTF8
# ISO-8859-1 WE8ISO8859P1
# ISO-8859-2 EE8ISO8859P2
# ISO-8859-3 SE8ISO8859P3
# ISO-8859-4 NEE8ISO8859P4
# ISO-8859-5 CL8ISO8859P5
# ISO-8859-6 AR8ISO8859P6
# ISO-8859-7 EL8ISO8859P7
# ISO-8859-8 IW8ISO8859P8
# ISO-8859-9 WE8ISO8859P9
# ISO-8859-13 BLT8ISO8859P13
# ISO-8859-14 CEL8ISO8859P14
# ISO-8859-15 WE8ISO8859P15
# BIG5 ZHT16BIG5
# BIG5-HKSCS ZHT16HKSCS
# CP1251 CL8MSWIN1251
# CP1255 IW8MSWIN1255
# EUC-JP JA16EUC
# EUC-KR KO16KSC5601
# EUC-TW ZHT32EUC
# GB18030 ZHS32GB18030
# GB2312 ZHS16CGB231280
# GBK ZHS16GBK
# TIS-620 TH8TISASCII
# KOI8-R CL8KOI8R
# KOI8-U CL8KOI8U
#
# MODIFIED (MM/DD/YY)
# svaggu 12/22/10 - Fixed syntax issues in if and elif conditions.
# mtozawa 11/22/05 - rollback the workawound of bug 4598613 (ORA-02248
# with SWITZERLAND) for XE production
# mtozawa 11/03/05 - workaround bug 4598613 (ORA-02248 with SWITZERLAND
# territory) for XE beta
# mtozawa 10/24/05 - bug 4667489 - change CIS to RUSSIA
# svaggu 10/21/05 - svaggu_new_elements
# mtozawa 10/04/05 - Created
#
# Determine the CHARACTERSET part of NLS_LANG
# we query the charmap of the current locale, and map it to the
# corresponding Oracle character set name.
#
case "`locale charmap`" in
UTF-8) charset='AL32UTF8';;
ISO-8859-1) charset='WE8ISO8859P1';;
ISO-8859-2) charset='EE8ISO8859P2';;
ISO-8859-3) charset='SE8ISO8859P3';;
ISO-8859-4) charset='NEE8ISO8859P4';;
ISO-8859-5) charset='CL8ISO8859P5';;
ISO-8859-6) charset='AR8ISO8859P6';;
ISO-8859-7) charset='EL8ISO8859P7';;
ISO-8859-8) charset='IW8ISO8859P8';;
ISO-8859-9) charset='WE8ISO8859P9';;
ISO-8859-13) charset='BLT8ISO8859P13';;
ISO-8859-14) charset='CEL8ISO8859P14';;
ISO-8859-15) charset='WE8ISO8859P15';;
BIG5) charset='ZHT16BIG5';;
BIG5-HKSCS) charset='ZHT16HKSCS';;
CP1251) charset='CL8MSWIN1251';;
CP1255) charset='IW8MSWIN1255';;
EUC-JP) charset='JA16EUC';;
EUC-KR) charset='KO16KSC5601';;
EUC-TW) charset='ZHT32EUC';;
GB18030) charset='ZHS32GB18030';;
GB2312) charset='ZHS16CGB231280';;
GBK) charset='ZHS16GBK';;
TIS-620) charset='TH8TISASCII';;
KOI8-R) charset='CL8KOI8R';;
KOI8-U) charset='CL8KOI8U';;
*) charset='AL32UTF8';;
esac
# Detertmine the LANGUAGE_TERRITORY part of NLS_LANG
# we derive it from the current locale by inspecting the LC_ALL and
# the LANG environment variable. Other LC_* environment variables
# are not inspected.
#
if [ -n "$LC_ALL" ]; then
locale=$LC_ALL
elif [ -n "$LANG" ]; then
locale=$LANG
else
locale=
fi
# Truncate .<charset> or @<variant>.
# locale vi_VN.tcvn requires explicitly reset OS default locale
# in order for the sed to run properly. unset LC_ALL is not enough.
# Without it, sed: -e expression #1 Unterminated 's' command error
# is printed.
#
export LC_ALL=C
locale=`echo $locale | sed 's/[.@].*$//'`
# Map it to Oracle LANGUAGE_TERRITORY
#
default_language_territory='AMERICAN_AMERICA';
default_language='AMERICAN';
case "$locale" in
# Afrikaans - SOUTH AFRICA // no mapping to Oracle LANGUAGE
af_ZA) nlslang=${default_language}'_SOUTH AFRICA';;
# Aragonese - SPAIN // no mapping to Oracle LANGUAGE
an_ES) nlslang=${default_language}'_SPAIN';;
# Arabic - UNITED ARAB EMIRATES
ar_AE) nlslang='ARABIC_UNITED ARAB EMIRATES';;
# Arabic - BAHRAIN
ar_BH) nlslang='ARABIC_BAHRAIN';;
# Arabic - ALGERIA
ar_DZ) nlslang='ARABIC_ALGERIA';;
# Arabic - EGYPT
ar_EG) nlslang='ARABIC_EGYPT';;
# Arabic - INDIA
ar_IN) nlslang='ARABIC_INDIA';;
# Arabic - IRAQ
ar_IQ) nlslang='ARABIC_IRAQ';;
# Arabic - JORDAN
ar_JO) nlslang='ARABIC_JORDAN';;
# Arabic - KUWAIT
ar_KW) nlslang='ARABIC_KUWAIT';;
# Arabic - LEBANON
ar_LB) nlslang='ARABIC_LEBANON';;
# Arabic - LIBYAN ARAB JAMAHIRIYA
ar_LY) nlslang='ARABIC_LIBYA';;
# Arabic - MOROCCO
ar_MA) nlslang='ARABIC_MOROCCO';;
# Arabic - OMAN
ar_OM) nlslang='ARABIC_OMAN';;
# Arabic - QATAR
ar_QA) nlslang='ARABIC_QATAR';;
# Arabic - SAUDI ARABIA
ar_SA) nlslang='ARABIC_SAUDI ARABIA';;
# Arabic - SUDAN
ar_SD) nlslang='ARABIC_SUDAN';;
# Arabic - SYRIAN ARAB REPUBLIC
ar_SY) nlslang='ARABIC_SYRIA';;
# Arabic - TUNISIA
ar_TN) nlslang='ARABIC_TUNISIA';;
# Arabic - YEMEN
ar_YE) nlslang='ARABIC_YEMEN';;
# Byelorussian - BELARUS // no mapping to Oracle LANGUAGE & TERRITORY
be_BY) nlslang=${default_language_territory};;
# Bulgarian - BULGARIA
bg_BG) nlslang='BULGARIAN_BULGARIA';;
# Breton - FRANCE // // no mapping to Oracle LANGUAGE
br_FR) nlslang=${default_language}'_FRANCE';;
# Bosnian - BOSNIA AND HERZEGOVINA // no mapping to Oracle LANGUAGE & TERRITORY
bs_BA) nlslang=${default_language_territory};;
# Catalan - SPAIN
ca_ES) nlslang='CATALAN_SPAIN';;
# Czech - CZECH REPUBLIC
cs_CZ) nlslang='CZECH_CZECH REPUBLIC';;
# Welsh - UNITED KINGDOM // no mapping to Oracle LANGUAGE
cy_GB) nlslang=${default_language}'_UNITED KINGDOM';;
# Danish - DENMARK
da_DK) nlslang='DANISH_DENMARK';;
# German - AUSTRIA
de_AT) nlslang='GERMAN_AUSTRIA';;
# German - BELGIUM
de_BE) nlslang='GERMAN_BELGIUM';;
# German - SWITZERLAND
de_CH) nlslang='GERMAN_SWITZERLAND';;
# German - GERMANY
de_DE) nlslang='GERMAN_GERMANY';;
# German - LUXEMBOURG
de_LU) nlslang='GERMAN_LUXEMBOURG';;
# Greek - GREECE
el_GR) nlslang='GREEK_GREECE';;
# English - AUSTRALIA
en_AU) nlslang='ENGLISH_AUSTRALIA';;
# English - BOTSWANA // no mapping to Oracle TERRITORY
en_BW) nlslang='ENGLISH_UNITED KINGDOM';;
# English - CANADA
en_CA) nlslang='ENGLISH_CANADA';;
# English - DENMARK
en_DK) nlslang='ENGLISH_DENMARK';;
# English - UNITED KINGDOM
en_GB) nlslang='ENGLISH_UNITED KINGDOM';;
# English - HONG KONG
en_HK) nlslang='ENGLISH_HONG KONG';;
# English - IRELAND
en_IE) nlslang='ENGLISH_IRELAND';;
# English - INDIA
en_IN) nlslang='ENGLISH_INDIA';;
# English - NEW ZEALAND
en_NZ) nlslang='ENGLISH_NEW ZEALAND';;
# English - PHILIPPINES
en_PH) nlslang='ENGLISH_PHILIPPINES';;
# English - SINGAPORE
en_SG) nlslang='ENGLISH_SINGAPORE';;
# English/American - UNITED STATES
en_US) nlslang='AMERICAN_AMERICA';;
# English - SOUTH AFRICA
en_ZA) nlslang='ENGLISH_SOUTH AFRICA';;
# English - ZIMBABWE // no mapping to Oracle TERRITORY
en_ZW) nlslang='ENGLISH_UNITED KINGDOM';;
# Spanish - ARGENTINA
es_AR) nlslang='LATIN AMERICAN SPANISH_ARGENTINA';;
# Spanish - BOLIVIA // no mapping to Oracle TERRITORY
es_BO) nlslang='LATIN AMERICAN SPANISH_AMERICA';;
# Spanish - CHILE
es_CL) nlslang='LATIN AMERICAN SPANISH_CHILE';;
# Spanish - COLOMBIA
es_CO) nlslang='LATIN AMERICAN SPANISH_COLOMBIA';;
# Spanish - COSTA RICA
es_CR) nlslang='LATIN AMERICAN SPANISH_COSTA RICA';;
# Spanish - DOMINICAN REPUBLIC
es_DO) nlslang='LATIN AMERICAN SPANISH_AMERICA';;
# Spanish - ECUADOR
es_EC) nlslang='LATIN AMERICAN SPANISH_ECUADOR';;
# Spanish - SPAIN
es_ES) nlslang='SPANISH_SPAIN';;
# Spanish - GUATEMALA
es_GT) nlslang='LATIN AMERICAN SPANISH_GUATEMALA';;
# Spanish - HONDURAS // no mapping to Oracle TERRITORY
es_HN) nlslang='LATIN AMERICAN SPANISH_AMERICA';;
# Spanish - MEXICO
es_MX) nlslang='MEXICAN SPANISH_MEXICO';;
# Spanish - NICARAGUA
es_NI) nlslang='LATIN AMERICAN SPANISH_NICARAGUA';;
# Spanish - PANAMA
es_PA) nlslang='LATIN AMERICAN SPANISH_PANAMA';;
# Spanish - PERU
es_PE) nlslang='LATIN AMERICAN SPANISH_PERU';;
# Spanish - PUERTO RICO
es_PR) nlslang='LATIN AMERICAN SPANISH_PUERTO RICO';;
# Spanish - PARAGUAY // no mapping to Oracle TERRITORY
es_PY) nlslang='LATIN AMERICAN SPANISH_AMERICA';;
# Spanish - EL SALVADOR
es_SV) nlslang='LATIN AMERICAN SPANISH_EL SALVADOR';;
# Spanish - UNITED STATES
es_US) nlslang='LATIN AMERICAN SPANISH_AMERICA';;
# Spanish - URUGUAY // no mapping to Oracle TERRITORY
es_UY) nlslang='LATIN AMERICAN SPANISH_AMERICA';;
# Spanish - VENEZUELA
es_VE) nlslang='LATIN AMERICAN SPANISH_VENEZUELA';;
# Estonian - ESTONIA
et_EE) nlslang='ESTONIAN_ESTONIA';;
# Basque - SPAIN // no mapping to Oracle LANGUAGE
eu_ES) nlslang=${default_language}'_SPAIN';;
# Persian - IRAN, ISLAMIC REPUBLIC OF // no mapping to Oracle LANGUAGE & TERRITORY
fa_IR) nlslang=${default_language_territory};;
# Finnish - FINLAND
fi_FI) nlslang='FINNISH_FINLAND';;
# Faeroese - FAROE ISLANDS // no mapping to Oracle LANGUAGE & TERRITORY
fo_FO) nlslang=${default_language_territory};;
# French - BELGIUM
fr_BE) nlslang='FRENCH_BELGIUM';;
# French - CANADA
fr_CA) nlslang='CANADIAN FRENCH_CANADA';;
# French - SWITZERLAND
fr_CH) nlslang='FRENCH_SWITZERLAND';;
# French - FRANCE
fr_FR) nlslang='FRENCH_FRANCE';;
# French - LUXEMBOURG
fr_LU) nlslang='FRENCH_LUXEMBOURG';;
# Irish - IRELAND // no mapping to Oracle LANGUAGE
ga_IE) nlslang=${default_language}'_IRELAND';;
# Galician - SPAIN // no mapping to Oracle LANGUAGE
gl_ES) nlslang=${default_language}'_SPAIN';;
# Manx - UNITED KINGDOM // no mapping to Oracle LANGUAGE
gv_GB) nlslang=${default_language}'_UNITED KINGDOM';;
# Hebrew - ISRAEL
he_IL) nlslang='HEBREW_ISRAEL';;
# Hindi - INDIA
hi_IN) nlslang='HINDI_INDIA';;
# Croatian - CROATIA
hr_HR) nlslang='CROATIAN_CROATIA';;
# Hungarian - HUNGARY
hu_HU) nlslang='HUNGARIAN_HUNGARY';;
# Indonesian - INDONESIA
id_ID) nlslang='INDONESIAN_INDONESIA';;
# Icelandic - ICELAND
is_IS) nlslang='ICELANDIC_ICELAND';;
# Italian - SWITZERLAND
it_CH) nlslang='ITALIAN_SWITZERLAND';;
# Italian - ITALY
it_IT) nlslang='ITALIAN_ITALY';;
# Hebrew - ISRAEL
iw_IL) nlslang='HEBREW_ISRAEL';;
# Japanese - JAPAN
ja_JP) nlslang='JAPANESE_JAPAN';;
# Georgian - GEORGIA // no mapping to Oracle LANGUAGE & TERRITORY
ka_GE) nlslang=${default_language_territory};;
# Greenlandic - GREENLAND // no mapping to Oracle LANGUAGE & TERRITORY
kl_GL) nlslang=${default_language_territory};;
# Korean - KOREA, REPUBLIC OF
ko_KR) nlslang='KOREAN_KOREA';;
# Cornish - UNITED KINGDOM // no mapping to Oracle LANGUAGE
kw_GB) nlslang=${default_language}'_UNITED KINGDOM';;
# Lao - LAO PEOPLE'S DEMOCRATIC REPUBLIC // no mapping to Oracle LANGUAGE & TERRITORY
lo_LA) nlslang=${default_language_territory};;
# Lithuanian - LITHUANIA
lt_LT) nlslang='LITHUANIAN_LITHUANIA';;
# Latvian/Lettish - LATVIA
lv_LV) nlslang='LATVIAN_LATVIA';;
# Maori - NEW ZEALAND // no mapping to Oracle LANGUAGE
mi_NZ) nlslang=${default_language}'_NEW ZEALAND';;
# Macedonian - MACEDONIA, THE FORMER YUGOSLAV REPUBLIC OF
mk_MK) nlslang='MACEDONIAN_FYR MACEDONIA';;
# Marathi - INDIA
mr_IN) nlslang='MARATHI_INDIA';;
# Malay - MALAYSIA
ms_MY) nlslang='MALAY_MALAYSIA';;
# Maltese - MALTA // no mapping to Oracle LANGUAGE & TERRITORY
mt_MT) nlslang=${default_language_territory};;
# Norwegian Bokmal/Bokmal/Norwegian - NORWAY
nb_NO) nlslang='NORWEGIAN_NORWAY';;
# Dutch - BELGIUM
nl_BE) nlslang='DUTCH_BELGIUM';;
# Dutch - NETHERLANDS
nl_NL) nlslang='DUTCH_THE NETHERLANDS';;
# Norwegian Nynorsk/Nynorsk/Norwegian - NORWAY
nn_NO) nlslang='NORWEGIAN_NORWAY';;
# Norwegian - NORWAY
no_NO) nlslang='NORWEGIAN_NORWAY';;
# Occitan - FRANCE // no mapping to Oracle LANGUAGE
oc_FR) nlslang=${default_language}'_FRANCE';;
# Polish - POLAND
pl_PL) nlslang='POLISH_POLAND';;
# Portuguese - BRAZIL
pt_BR) nlslang='BRAZILIAN PORTUGUESE_BRAZIL';;
# Portuguese - PORTUGAL
pt_PT) nlslang='PORTUGUESE_PORTUGAL';;
# Romanian - ROMANIA
ro_RO) nlslang='ROMANIAN_ROMANIA';;
# Russian - RUSSIAN FEDERATION
ru_RU) nlslang='RUSSIAN_RUSSIA';;
# Russian - UKRAINE
ru_UA) nlslang='RUSSIAN_UKRAINE';;
# Northern Sami - NORWAY // no mappig to Oracle LANGUAGE
se_NO) nlslang=${default_language}'_NORWAY';;
# Slovak - SLOVAKIA
sk_SK) nlslang='SLOVAK_SLOVAKIA';;
# Slovenian - SLOVENIA
sl_SI) nlslang='SLOVENIAN_SLOVENIA';;
# Albanian - ALBANIA // no mapping to Oracle LANGUAGE & TERRITORY
sq_AL) nlslang=${default_language_territory};;
# Serbian - // unknown ISO-3166 code 'YU'
sr_YU) nlslang='LATIN SERBIAN_SERBIA AND MONTENEGRO';;
# Swedish - FINLAND
sv_FI) nlslang='SWEDISH_FINLAND';;
# Swedish - SWEDEN
sv_SE) nlslang='SWEDISH_SWEDEN';;
# Thai - THAILAND
th_TH) nlslang='THAI_THAILAND';;
# Tagalog - PHILIPPINES // no mappig to Oracle LANGUAGE
tl_PH) nlslang=${default_language}'_PHILIPPINES';;
# Turkish - TURKEY
tr_TR) nlslang='TURKISH_TURKEY';;
# Ukrainian - UKRAINE
uk_UA) nlslang='UKRAINIAN_UKRAINE';;
# Vietnamese - VIET NAM
vi_VN) nlslang='VIETNAMESE_VIETNAM';;
# Walloon - BELGIUM // no mappig to Oracle LANGUAGE
wa_BE) nlslang=${default_language}'_BELGIUM';;
# Yiddish - UNITED STATES // no mappig to Oracle LANGUAGE
yi_US) nlslang=${default_language}'_AMERICA';;
# Chinese - CHINA
zh_CN) nlslang='SIMPLIFIED CHINESE_CHINA';;
# Chinese - HONG KONG
zh_HK) nlslang='TRADITIONAL CHINESE_HONG KONG';;
# Chinese - TAIWAN, PROVINCE OF CHINA
zh_TW) nlslang='TRADITIONAL CHINESE_TAIWAN';;
# we also support the locale aliases that are defined
# in /usr/share/locale/locale.alias
# alias of no_NO
bokmal) nlslang='NORWEGIAN_NORWAY';;
# alias of no_NO
bokmål) nlslang='NORWEGIAN_NORWAY';;
# alias of ca_ES
catalan) nlslang='CATALAN_SPAIN';;
# alias of hr_HR
croatian) nlslang='CROATIAN_CROATIA';;
# alias of cs_CZ
czech) nlslang='CZECH_CZECH REPUBLIC';;
# alias of da_DK
danish) nlslang='DANISH_DENMARK';;
# alias of da_DK
dansk) nlslang='DANISH_DENMARK';;
# alias of de_DE
deutsch) nlslang='GERMAN_GERMANY';;
# alias of nl_NL
dutch) nlslang='DUTCH_THE NETHERLANDS';;
# alias of et_EE
eesti) nlslang='ESTONIAN_ESTONIA';;
# alias of et_EE
estonian) nlslang='ESTONIAN_ESTONIA';;
# alias of fi_FI
finnish) nlslang='FINNISH_FINLAND';;
# alias of fr_FR
français) nlslang='FRENCH_FRANCE';;
# alias of fr_FR
french) nlslang='FRENCH_FRANCE';;
# alias of gl_ES
galego) nlslang=${default_language}'_SPAIN';;
# alias of gl_ES
galician) nlslang=${default_language}'_SPAIN';;
# alias of de_DE
german) nlslang='GERMAN_GERMANY';;
# alias of el_GR
greek) nlslang='GREEK_GREECE';;
# alias of he_IL
hebrew) nlslang='HEBREW_ISRAEL';;
# alias of hr_HR
hrvatski) nlslang='CROATIAN_CROATIA';;
# alias of hu_HU
hungarian) nlslang='HUNGARIAN_HUNGARY';;
# alias of is_IS
icelandic) nlslang='ICELANDIC_ICELAND';;
# alias of it_IT
italian) nlslang='ITALIAN_ITALY';;
# alias of ja_JP
japanese) nlslang='JAPANESE_JAPAN';;
# alias of ko_KR
korean) nlslang='KOREAN_KOREA';;
# alias of lt_LT
lithuanian) nlslang='LITHUANIAN_LITHUANIA';;
# alias of no_NO
norwegian) nlslang='NORWEGIAN_NORWAY';;
# alias of nn_NO
nynorsk) nlslang='NORWEGIAN_NORWAY';;
# alias of pl_PL
polish) nlslang='POLISH_POLAND';;
# alias of pt_PT
portuguese) nlslang='PORTUGUESE_PORTUGAL';;
# alias of ro_RO
romanian) nlslang='ROMANIAN_ROMANIA';;
# alias of ru_RU
russian) nlslang='RUSSIAN_RUSSIA';;
# alias of sk_SK
slovak) nlslang='SLOVAK_SLOVAKIA';;
# alias of sl_SI
slovene) nlslang='SLOVENIAN_SLOVENIA';;
# alias of sl_SI
slovenian) nlslang='SLOVENIAN_SLOVENIA';;
# alias of es_ES
spanish) nlslang='SPANISH_SPAIN';;
# alias of sv_SE
swedish) nlslang='SWEDISH_SWEDEN';;
# alias of th_TH
thai) nlslang='THAI_THAILAND';;
# alias of tr_TR
turkish) nlslang='TURKISH_TURKEY';;
# default
*) nlslang=${default_language_territory};;
esac
# construct the NLS_LANG
#
NLS_LANG=${nlslang}.${charset}
echo $NLS_LANG
#!/bin/bash
version_file="$PWD/config/initializers/version.rb"
while IFS= read -r var
do
regex="VERSAO = '([0-9]*\.[0-9]*\.)([0-9]*)'"
[[ $var =~ $regex ]]
base_version="${BASH_REMATCH[1]}"
patch_version="${BASH_REMATCH[2]}"
if [[ ! -z $patch_version ]]
then
new_version=$(($patch_version + 1))
new_version="${base_version}${new_version}"
echo "Atualizando versão de ${base_version}${patch_version} para ${new_version}"
sed -i -e "s/[0-9]*\.[0-9]*\.[0-9]*/${new_version}/g" $version_file
fi
done < "$version_file"
eval "git add ."
eval "git status"
eval "git commit -m \"por rodrigo.castro: Preparando para deploy\""
eval "git tag -a v${new_version} -m \"${1}\""
#!/bin/bash
notify-send 'Workspace Startup' 'Opening Console'
gnome-terminal &
sleep 15
notify-send 'Workspace Startup' 'Choosing Application'
# Get active gnome-terminal
WID=$(xprop -root | grep "_NET_ACTIVE_WINDOW(WINDOW)"| awk '{print $5}')
# Focus on it
xdotool windowfocus $WID
# Run system selection menu
xdotool type --delay 50 --clearmodifiers "~/.system_dialog.sh"
xdotool key Return
sleep 10
xdotool key Return
_sistema=$(cat ultimo_sistema)
echo $_sistema
notify-send 'Workspace Startup' "Configuring Console for \"$_sistema\""
~/.open_tabs.sh $_sistema &
sleep 30
notify-send 'Workspace Startup' 'Opening Google Chrome'
google-chrome &
sleep 30
notify-send 'Workspace Startup' 'Opening Rubymine'
/opt/rubymine/bin/rubymine.sh &
sleep 60
notify-send 'Workspace Startup' 'Startup Completed!'
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment