Thursday, February 26, 2015

Tuesday, February 24, 2015

Change remote repo in git

git remote –v                             # this will show you they old url
git remote remove origin
git remote add origin ssh://git@test.github.com/test/test.git
git push --set-upstream origin master

Tuesday, April 22, 2014

SSH escape squences

Hit Return and then tilde

[root@local ~]# ~?
Supported escape sequences:
 ~.   - terminate connection (and any multiplexed sessions)
 ~B   - send a BREAK to the remote system
 ~C   - open a command line
 ~R   - request rekey
 ~V/v - decrease/increase verbosity (LogLevel)
 ~^Z  - suspend ssh
 ~#   - list forwarded connections
 ~&   - background ssh (when waiting for connections to terminate)
 ~?   - this message
 ~~   - send the escape character by typing it twice
(Note that escapes are only recognized immediately after newline.)

Wednesday, February 12, 2014

Thursday, October 31, 2013

Change remote display resolution

xrandr
cvt 2560 1440 60
xrandr --newmode 2560x1440 312.25  2560 2752 3024 3488  1440 1443 1448 1493 -hsync +vsync
xrandr --addmode default 2560x1440
xrandr --output default --mode 2560x1440

Friday, July 9, 2010

Finding blocked sessions in oracle

select s1.username || '@' || s1.machine
|| ' ( SID=' || s1.sid || ' ) is blocking '
|| s2.username || '@' || s2.machine || ' ( SID=' || s2.sid || ' ) ' AS blocking_status
from v$lock l1, v$session s1, v$lock l2, v$session s2
where s1.sid=l1.sid and s2.sid=l2.sid
and l1.BLOCK=1 and l2.request > 0
and l1.id1 = l2.id1
and l2.id2 = l2.id2 ;

select SID||','||SERIAL# from v$session where sid = 20

alter system kill session '20,35205'