Skip to content

Instantly share code, notes, and snippets.

View thiago-vieira's full-sized avatar
🏴

Thiago Vieira thiago-vieira

🏴
View GitHub Profile
@thiago-vieira
thiago-vieira / brasero.sh
Created September 15, 2013 21:39
Dependências para copiar DVD no Brasero
sudo apt-get install ubuntu-restricted-extras
sudo /usr/share/doc/libdvdread4/install-css.sh
@thiago-vieira
thiago-vieira / loop.sql
Created September 30, 2013 17:48
Loop PL/SQL
declare
CURSOR pessoas IS select * from pessoas;
begin
for pessoa in pessoas
loop
DBMS_OUTPUT.PUT_LINE(pessoa.nome);
end loop;
return;
end;
@thiago-vieira
thiago-vieira / .gemrc
Last active May 9, 2016 00:47
~/.gemrc file for setup default options to gem install
gem: --no-ri --no-rdoc --clear-sources --source http://rubygems.org/
@thiago-vieira
thiago-vieira / readme.txt
Created January 6, 2014 23:43
Roteiro de criação de uma máquina virtual Linux com Redmine e Mediawiki
Os seguintes software livres foram obtidos para a criação desta máquina:
- VirtualBox - http://download.virtualbox.org/virtualbox/4.2.12/VirtualBox-4.2.12-84980-Win.exe
- VBoxVMService - http://sourceforge.net/projects/vboxvmservice/files/latest/download
- Linux Mint - http://mint.c3sl.ufpr.br//stable/14/linuxmint-14.1-cinnamon-dvd-32bit.iso
- Redmine - http://rubyforge.org/frs/download.php/76933/redmine-2.3.1.tar.gz
- MediaWiki - http://download.wikimedia.org/mediawiki/1.20/mediawiki-1.20.5.tar.gz
- Ferramentas e bibliotecas diversas (ver abaixo)
@thiago-vieira
thiago-vieira / find.sh
Last active August 29, 2015 13:58
Finding all distinct file extensions in a folder hierarchy
find . -type f | perl -ne 'print $1 if m/\.([^.\/]+)$/' | sort -u
@thiago-vieira
thiago-vieira / remove_some_types.sh
Last active August 29, 2015 13:58
Remove some type of files in a folder tree
rm -rf `find /diretorio/que/quer/apagar/ -iname "*.extensao"`
# or
find ./ -type f -not -name "*.xls" -and -not -name "*.doc" -exec rm {} \;
@thiago-vieira
thiago-vieira / plone.sh
Last active March 27, 2021 01:11
Startup script for Plone
#!/bin/sh
# Startup script for Plone
if [ -f /etc/init.d/functions ] ; then
. /etc/init.d/functions
elif [ -f /etc/rc.d/init.d/functions ] ; then
. /etc/rc.d/init.d/functions
else
exit 1
fi
declare
l_MaxVal pls_integer;
l_Currval pls_integer default - 1;
begin
-- insert primary key and table name
select max(cod_os)
into l_MaxVal
from os;
while l_Currval < l_Maxval
loop
chrome.exe --restore-last-session
@thiago-vieira
thiago-vieira / schema_doc
Created January 13, 2015 19:34
Generate database schema document with search
select
TABLE_NAME,
decode(column_id,0,null,column_id) as COLUMN_ID,
COLUMN_NAME, NULLABLE, DATA_TYPE, COMMENTS
from (
select cc.TABLE_NAME,
tc.COLUMN_ID, tc.COLUMN_NAME,
tc.NULLABLE, tc.DATA_TYPE ||
case when tc.DATA_SCALE is not null then '(' || tc.DATA_PRECISION || ',' || tc.DATA_SCALE || ')'
when tc.DATA_PRECISION is not null then '(' || tc.DATA_PRECISION || ')'