Friday, June 29, 2018

Protect Image on Website

https://mediatemple.net/community/products/dv/204644230/prevent-hotlinking-with-a-htaccess-file

https://stackoverflow.com/questions/21110130/protect-image-download

Monday, June 18, 2018

Exist XML: Recovery

> Is there a documentation out there for how to recover from corrupt db (not 
> recover from backup)? 

It depends on what kind of issues you have. If it's just index failures: 

* stop the database 
* run a consistency check via the emergency export tool 
(http://exist-db.org/backup.html#d8e750
* remove all .dbx, .lck and .log files except dom.dbx, 
collections.dbx, symbols.dbx; also remove the lucene index dir 
* restart the db 
* trigger a reindex 

If the consistency check reports errors in documents or the collection 
hierarchy, it will be better to do a full restore. 

Source:
http://exist.2174344.n4.nabble.com/Recover-from-corrupt-db-exist-1-4-td3692989.html 

Sunday, June 17, 2018

Tomcat: 403

https://stackoverflow.com/questions/40503771/tomcat-8-5-403-access-denied

https://stackoverflow.com/questions/38551166/403-access-denied-on-tomcat-8-manager-app-without-prompting-for-user-password

Monday, June 11, 2018

Batch script to open ports on Windows

https://helpdeskgeek.com/networking/windows-firewall-command-prompt-netsh/

https://stackoverflow.com/questions/6811372/how-to-code-a-bat-file-to-always-run-as-admin-mode?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa




runas /user:Administrator openfirewall.bat
netsh advfirewall firewall add rule name="Open Remote Desktop" protocol=TCP dir=in localport=3389 action=allow