Wednesday, February 17, 2016

Remove  from the beginning of a file

This is the BOM.
vi my_file
set nobomb
wq

Oracle: how to post to https address

The normal way to achieve that is to push the certificates into the Oracle wallet via orapki.
However, if using 11.2.0.1 or XE, this is not feasible because SHA-2 certificates are not supported, and you will get
ORA-29273: HTTP request failed
ORA-06512: at “SYS.UTL_HTTP”, line 1722
ORA-28857: Unknown SSL error
ORA-06512: at line 1
A workaround is to use Apache Reverse Proxy:
Make sure that you have mod_ssl installed, and add into httpd.conf
SSLProxyEngine on
ProxyPass /oneagain https://oneagain.net
ProxyPassReverse /oneagain https://oneagain.net
Then replace:
utl_http.begin_request(‘https://oneagain.net’,’POST’);
with:
utl_http.begin_request(‘http://apache-host/oneagain/’,’POST’);
And forget about the wallet.

Friday, February 12, 2016

Git: see only one user's commits

git lol --author='John Smith' --name-only

Tuesday, February 2, 2016

Git: cancel a git stash apply

If you haven't pushed:
git reset --hard [last_good_commit]
or if you have pushed:
git revert [last_good_commit]