Skip to content

Instantly share code, notes, and snippets.

@bulain
bulain / instant_client_sqlplus_win.sh
Created March 31, 2012 06:18
oracle instant client sqlplus configuration in windows
oracle server configuration
#listener.ora
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = orcl)
(ORACLE_HOME = C:\oracle\product\11.2.0\dbhome_1)
(SID_NAME = orcl)
)
(SID_DESC =
@bulain
bulain / create_tablespace.sql
Created March 31, 2012 06:53
create tablespace and user in oracle
create tablespace demos
logging
datafile '<path>/demo01.dbf'
size 256m
autoextend on
next 64m maxsize 2048m
extent management local;
CREATE USER demo
IDENTIFIED BY demo
@bulain
bulain / vim_command.sh
Created April 2, 2012 10:17
vim command
#replace in vim
[addr]s/src/dist/[option]
addr: the range
nothing Work on current line only.
number Work on the line whose number you give.
% The whole file.
option: the arguments
@bulain
bulain / ora_dict.txt
Created May 3, 2012 07:22
oracle dictionary
1. USER_*, ALL_*, DBA_*.
2. V_$, GV_$, V$, GV$.
3. X$.
@bulain
bulain / java_remote_debug.sh
Last active October 4, 2015 06:18
java debug remote
#java debug remote
x.debug=-Xdebug
x.noagent=-Xnoagent
x.compiler=-Djava.compiler=NONE
x.debugport=-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000
@bulain
bulain / full_search_ora.sql
Created November 8, 2012 09:25
full search in oracle
select * from all_source where text like 'ddl column';
@bulain
bulain / java_oom.sh
Created December 6, 2012 06:43
java OutOfMemoryError
#Kind of OOM
java.lang.OutOfMemoryError: Java heap space
java.lang.OutOfMemoryError: Direct buffer memory
java.lang.OutOfMemoryError: unable to create new native thread
java.lang.OutOfMemoryError: PermGen space
java.lang.OutOfMemoryError: Requested array size exceeds VM limit
java.lang.OutOfMemoryError: <reason> <stack trace> (Native method)
#JVM options
-verbosegc -XX:+HeapDumpOnOutOfMemoryError
@bulain
bulain / putty_key_pair.sh
Created February 27, 2013 03:57
putty login with key pair
ssh-keygen -t rsa -C "[email protected]"
cat id_rsa.pub >> ~/.ssh/authorized_keys
puttygen.exe generate bulain.ppk
@bulain
bulain / linux_http_proxy.sh
Created March 5, 2013 07:22
linux through http proxy
vim /etc/profile.d/proxy.sh
export http_proxy=http://proxy:8080
export https_proxy=https://proxy:8080
@bulain
bulain / apt_http_proxy.sh
Created March 5, 2013 07:22
apt update through http proxy
vim /etc/apt/apt.conf
Acquire::http::proxy "http://proxy:8080";