Alt+Shift+S, R Batch getter/setter generation
Check Oracle synonyms
select * from ALL_SYNONYMS where synonym_name = 'my_name';
select * from ALL_VIEWS where view_name = 'my_name';
See http://docs.oracle.com/cd/B19306_01/server.102/b14231/views.htm
updatedb script for Cygwin
[sourcecode]
#!/bin/bash
updatedb –prunepaths=’
/proc /cygdrive/c/program_disk/cygwin
/cygdrive/c/Documents.and.Settings/[^/]*/Local.Settings/Temp
/cygdrive/c/Program.Files
/cygdrive/c/ProgramData
/cygdrive/c/Windows
/cygdrive/[^/]*/System.Volume.Information
/cygdrive/c/$Recycle.Bin
/home/hongyu.zhang/dumpster
‘
​[/sourcecode]
Create a new Oracle super account and grant permission
CREATE USER my_account IDENTIFIED BY my_password;
GRANT ALL PRIVILEGE TO my_account;
A safe program to replace unix command ‘rm’
[sourcecode]
#!/usr/bin/perl -w
## A safer program to replace unix command "rm"
## Author: Hongyu Zhang
if($#ARGV < 0) {
die("Usage: $0 filename\n");
}
$dir = `echo ~/dumpster`;
chomp $dir;
mkdir $dir unless(-d $dir);
for($i=0; $i<=$#ARGV; $i++) {
croak("Directory $ARGV[$i] not existed") unless(-e $ARGV[$i]);
my @arr = split /\//, $ARGV[$i];
if(-e "$dir/$arr[$#arr]") {
$command = "rm -rf $dir/$arr[$#arr]";
system("$command");
croak("error running command: $command") if($?);
}
$command = "mv -fv $ARGV[$i] $dir";
system("$command");
croak("error running command: $command") if($?);
}
[/sourcecode]