Recent Notes
Displaying keyword search results 1 - 10
Created by Dr. Xi on February 06, 2012 12:14:11
Last update: February 07, 2012 15:39:35
Oracle sqlplus command line tools does not support command line editing out-of-the-box. But on Linux there's a handy utility that enables command line editing with any command line tool: rlwrap - readline wrapper.
Install rlwrap:
$ sudo apt-get install rlwrap
Create a keywords file .sql.dict (optional, but convenient):
false null true
access add as asc begin by chec...
It would be nice to add the tables names also.
Create an alias for sqlplus (put it in .bashrc ):
alias sqlplus='rlwrap -f $HOME/.sql.dict sqlplus'
Created by Dr. Xi on February 06, 2012 09:19:27
Last update: February 06, 2012 09:19:27
These are the steps to install the Oracle sqlplus command line utility on Ubuntu Linux:
Get Oracle instant client packages from Oracle (you'll need basic or basiclite + sqlplus).
Install the RPM files with alien :
$ sudo alien -i oracle-instantclient11.2-basic-11....
Install Oracle shared libraries: create file /etc/ld.so.conf.d/oracle.conf and add this line:
/usr/lib/oracle/11.2/client/lib
then run
sudo ldconfig
Created by magnum on September 21, 2011 16:01:16
Last update: September 21, 2011 16:02:33
More like assign a second ip address to the same nic, instead of a virtual nic. Multiple IP addresses can be assigned to the same NIC, but all IP addresses must be on the same subnet - otherwise some IP addresses will not be accessible. From command line, assign IP address 192.168.0.2 to alias eth0:0 :
sudo ifconfig eth0:0 192.168.0.2 netmask 255.255.2... But IP addresses added this way are not persistent. They are lost whent he OS is restarted. To make the additions persistent: For Fedora: $ su - # cd /etc/sysconfig/network-scripts/ ... The contents of ifcfg-eth0:0 should look like this: DEVICE=eth0:0 IPADDR=192.168.0.2 NETMASK=255... Restart network: # service network restart For Ubuntu: $ sudo vi /etc/network/interfaces Append this to the file: auto eth0:0 iface eth0:0 inet static name Et......
Created by magnum on June 23, 2011 20:15:49
Last update: June 23, 2011 20:29:45
Linux services startup order in general: kernel runs /sbin/init /sbin/init reads /etc/inittab and runs script defined by this line:
si::sysinit:/etc/init.d/rcS switches to runlevel defined by id:3:initdefault: which causes /etc/init.d/rc to be called with the current run level. /etc/init.d/rc calls the scripts under the /etc/rc <current_run_level> .d directory (symbolic links to actual scripts under /etc/init.d/ ) in this order: The KILL scripts first (scripts with name starting with K, i.e., rc?.d/Knn name ): "script_name stop" then, the START scripts (scripts with name starting with S, i.e., rc?.d/Snn name ): "script_name start" Within each group (KILL or START), run scripts from lower priority number (i.e., the nn in the symlink name) to higher priority number. The Upstart init daemon does not use /etc/inittab . Instead, it...
Created by magnum on June 23, 2011 13:08:47
Last update: June 23, 2011 13:08:47
In Linux shell (bash & ksh), executing " set -m " turns on job control . This option is on by default for interactive shells . Background processes run in a separate process group and a line containing their exit status is printed upon their completion.
Created by voodoo on June 21, 2011 08:19:33
Last update: June 21, 2011 08:34:28
Got "base64: invalid input" error:
$ base64 -d base64_encoded.txt >original.bin
ba...
which can be easily dismissed as "input is invalid base64 encoded" or "partial input". But I know it's valid base64 encoded input!
The problem was, the input was base64 encoded on Windows! The error goes away after converting to Unix format with dos2unix .
dos2unix < base64_encoded.txt | base64 -d >origina...
Version of base64 used:
$ base64 --version
base64 (GNU coreutils) 8.5
...
Created by woolf on June 18, 2011 21:21:56
Last update: June 18, 2011 21:34:56
I haven't test these. They are collected for reference only. With mencoder, from HOWTO: Convert and write AVCHD (.mts) to DVD with Linux
mencoder -oac copy -ovc lavc -of mpeg -mpegopts fo... With HandBrake (GUI): Transcoding AVHD (Cannon HF100 .mts) into a usable open format (MKV w/ FFMPEG) With ffmpeg & WinFF (GUI and command line): How to convert Canon .mts video files to other formats in Ubuntu With mencoder, from Transcoding AVCHD (.mts or .m2ts) files using mencoder on Linux (no deinterlacing): # 1 pass mencoder $file -o ./$file.avi -oac cop... With ffmpeg, from Stuttering playback of canon MTS files #!/bin/bash for i in "$i"*.MTS; do name="${i%.*... #!/bin/bash for i in "$i"*.MTS; do name="${i%.*... With mencoder, from [MEncoder-users] problems with AVCHD (.mts) + Deinterlace...
Created by woolf on May 20, 2011 14:00:35
Last update: May 20, 2011 14:01:36
To remove new line characters from a file:
with tr :
tr -d '\n' < the-file.txt or
cat the-file.txt | tr -d '\n'
with sed :
sed ':a;N;$!ba;s/\n//g' the-file.txt or
cat the-file.txt | sed ':a;N;$!ba;s/\n//g'
The sed version is a bunch of commands to manipulate the register etc. Regex replace " s/\n//g " does not work because sed regex works on a single line.
More tips from this Linux blog: http://linux.dsplabs.com.au/rmnl-remove-new-line-characters-tr-awk-perl-sed-c-cpp-bash-python-xargs-ghc-ghci-haskell-sam-ssam-p65/
Created by woolf on May 15, 2011 14:35:58
Last update: May 15, 2011 14:36:47
Assign IP adrress and network mask:
sudo ifconfig eth0 192.168.183.5 netmask 255.255.2...
Add default gateway:
sudo route add default gw 192.168.183.2
Add name server: " sudo vi /etc/resolv.conf " and add:
nameserver 192.168.183.2
Created by freyo on August 26, 2010 20:55:44
Last update: August 26, 2010 20:56:39
Android adb failed to start after I installed the SDK. Running adb from the command line reveals the error:
/lib/ld-linux.so.2: bad ELF interpreter: No such f...
I'm running 64-bit Fedora but Android adb is looking for 32-bit Linux loader. This is resolved by installing the 32-bit libraries.
# yum whatprovides ld-linux.so.2
Loaded plugins...
I did the same for libncurses.so.5 and libstdc++.so.6 to resolve all dependencies.