Setup Google Apps Custom Domain (e.g. @techienotes.info) on Empathy

Create a new Jabber account and enter the following details:

account :  username@techienotes.info
encryption required TLS/ssl : (unmarked)
ignore ssl certificate error : (unmarked)
server : talk.google.com
port : 5222 (default)
use old ssl : (unmarked)





Source

Posted in Jabber | Tagged , , | Leave a comment

Bash Script to run a sql file (Draft) – Part 1

#!/usr/bin/bash

# This script calls the Ad_1.sql script and spools the output with date stamp to a log file
# Update: You MUST add your environment variables one way or another, e.g. look below

export ORACLE_BASE=/oracle
export ORACLE_HOME=/oracle/OraHome_1
PATH=${PATH}:${ORACLE_HOME}/bin; export PATH
export LIBPATH=${LIBPATH}:${ORACLE_HOME}/lib32:${ORACLE_HOME}/lib

if [ ! -f lock ]; then

sqlplus -s user/password@sid << EOF
column dcol new_value mydate noprint
select sysdate dcol from dual;
spool log_ad_1_&mydate..log
@Ad_1.sql;
spool off
EOF

fi

where:

if [ ! -f lock ]: very useful statement, it checks whether a file named “lock” exists or not, if it doesn’t exist, it will not execute the code block within.

sqlplus -s usr/passwod@sid: to run sqlplus commands as if I’m entering the commands manually, the -s flag lets sqlplus accept the standardin input until it finds the word “EOF”

Part 2 will be about adding the above script in crontab and executing it daily.

Tagged , | Leave a comment

Putting the Current Date in a Spool File Name in sqlplus

 Using SYSDATE you can query the current date and put it in a substitution variable. The substitution variable can then be used in a SPOOL command:

column dcol new_value mydate noprint
select to_char(sysdate,’YYYYMMDD’) dcol from dual;
spool &mydate.report.txt


— my report goes here
select last_name from employees;
spool off

Tagged | Leave a comment

Some useful Google Chrome extensions that I use – Part 3

Well, this is the article number 200 in this blog, I’m so proud of this 🙂

  1. Copy Without Formatting: Enables you to copy text from any website without its formatting, very useful in some situations where you just need to extract the text without its specific font, color …etc, I found it very useful in blogging, there is a similar addon for firefox that does the same exactly.
Tagged , , | Leave a comment