Change hostname hostnamectl set-hostname redhat7.localdomain hostnamectl status Change in /etc/sysconfig/network HOSTNAME=redhat7.localdomain Change in /etc/hosts (otherwise Oracle won’t start -> when using Oracle …) 127.0.0.1 redhat7 redhat7.localdomain reboot Static ip setup [root@localhost ~]# cat /etc/sysconfig/network NETWORKING=yes GATEWAY=172.16.148.2 HOSTNAME=redhat7.localdomain [root@localhost ~]# cat […]
JPA performance
http://java-persistence-performance.blogspot.ro/2011/06/how-to-improve-jpa-performance-by-1825.html# http://spitballer.blogspot.ro/2010/04/jpa-persisting-vs-merging-entites.html Use byte code weaving EclipseLink implements LAZY for OneToOne and ManyToOne relationships using byte code weaving Pagination Use setFirstResult, setMaxResults of javax.persistence.Query. Caching See https://docs.oracle.com/javaee/7/tutorial/persistence-cache001.htm#GKJIO. See in persistence.xml or javax.persistence.sharedCache.mode property when creating the EntityManagerFactory. See javax.persistence.Cacheable used […]
Mount DAV directory
see http://linux.die.net/man/5/davfs2.conf # see http://www.freebsd.org/cgi/man.cgi?query=mandoc_char&sektion=7&apropos=0&manpath=NetBSD%2B6.0 -> for cq character # see http://passwordsgenerator.net/ # edit /etc/updatedb.conf: # PRUNEFS=”… davfs davfs2″ adrhcbImpl() { # sudo mkdir -p /mnt/adrhc # sudo chmod g+rw /mnt/adrhc # sudo chmod u+s /sbin/mount.davfs # sudo usermod […]
Uninstalling login/window managers
Login/window manager information dpkg -l | grep -i kde > kde.txt dpkg -l | grep -i plasma > plasma.txt dpkg -l | grep -i gnome > gnome.txt dpkg -l | grep -i xfce > xfce.txt dpkg -l | grep -i […]
iPhone
iTunes – sync with wi-fi Connect to iTunes with the cable, go to iPhone’s summary and check “Sync with this iPhone over WI-FI” then press apply button. ERROR iTunes fails to detect iPhone over WI-FI SOLUTION1 restart iPhone or restart […]
Ubuntu and Windows domain
wget http://de.archive.ubuntu.com/ubuntu/pool/main/l/likewise-open/likewise-open_6.1.0.406-0ubuntu5.1_amd64.deb wget http://de.archive.ubuntu.com/ubuntu/pool/main/libg/libglade2/libglade2-0_2.6.4-2_amd64.deb wget http://de.archive.ubuntu.com/ubuntu/pool/universe/l/likewise-open/likewise-open-gui_6.1.0.406-0ubuntu5.1_amd64.deb sudo dpkg -i 1.likewise-open_6.1.0.406-0ubuntu5.1_amd64.deb sudo dpkg -i 2.libglade2-0_2.6.4-2_amd64.deb sudo dpkg -i 3.likewise-open-gui_6.1.0.406-0ubuntu5.1_amd64.deb sudo domainjoin-gui sudo domainjoin-cli query sudo dpkg -l likewise* sudo dpkg –purge likewise-open-gui sudo dpkg –purge libglade2-0 sudo dpkg –purge likewise-open sudo […]
Asrock N3150DC-ITX
Windows with High Precision Event Timer (HPET) I installed windows 7 with HPET disabled in BIOS. Then if you do: bcdedit /set useplatformclock true -> with HPET enabled windows won’t boot bcdedit /deletevalue useplatformclock -> disables HPET from an administrative […]
How to create a debian package
method 1 see also http://ubuntuforums.org/showthread.php?t=910717 supposing anything-sync-daemon-5.76 contains all package’s files Than simply create anything-sync-daemon-5.76/DEBIAN/control file with a similar content: Package: anything-sync-daemon Version: 5.76 Section: Utilities Priority: optional Architecture: amd64 Maintainer: Gigi Kent Description: anything sync daemon then run dpkg-deb […]
Compiling anything sync daemon
Environment variables NEW_BUILD_NAME=anything-sync-daemon NEW_BUILD_VER=5.76 NEW_BUILD_NAME_AND_VER=$NEW_BUILD_NAME-$NEW_BUILD_VER ls -l /tmp/$NEW_BUILD_NAME- ls -l ~/ubuntu_packages//$NEW_BUILD_NAME-* NEW_BUILD_NR=0 # rm -r $HOME/temp/$NEW_BUILD_NAME_AND_VER Download and unpack cd $HOME/compile wget http://repo-ck.com/source/anything-sync-daemon/anything-sync-daemon-5.76.tar.xz tar xpvf anything-sync-daemon-5.76.tar.xz Compilation cd $HOME/compile/anything-sync-daemon-5.76 with systemd use export DESTDIR=$HOME/temp/$NEW_BUILD_NAME_AND_VER;make V=1 install-systemd-all with upstart use export […]
Make ubuntu or applications run faster
See also https://doc.ubuntu-fr.org/optimisation Check ubuntu startup times systemd-analyze blame /etc/fstab http://www.lgqyc.com/move-tmp-to-ram/ http://jsmylinux.no-ip.org/performance/improving-performance/ http://askubuntu.com/questions/173094/how-can-i-use-ram-storage-for-the-tmp-directory-and-how-to-set-a-maximum-amount http://www.digitalinternals.com/unix/linux-io-performance-tuning-noatime-nodiratime-relatime/388/ mount | grep -P “^tmpfs.+/(tmp|var/run)” sudo du -sh /tmp /var/tmp; du -sh /****/apps/tmp /****/apps/var/run /run/user/id -u
/tmp/tomcat 2>/dev/null tmpfs /tmp tmpfs defaults,relatime,mode=1777,size=4G 0 0 tmpfs /var/tmp […]
Search music by mp3 audio file
Upload your mp3 file here and search for it’s artist and song name: http://audiotag.info/index.php
JAXB 2.2.10
see also http://docs.oracle.com/javaee/5/tutorial/doc/bnbbf.html see also https://jaxb.java.net/tutorial/index.html see also https://jaxb.java.net/guide/index.html – Unofficial JAXB Guide see also How to get simple and better typed binding in https://metro.java.net/guide/ch03.html globalBindings fixedAttributeAsConstantProperty fixed attributes will be generated as a java constant. @XmlSchemaType(name = “NMTOKEN”) public […]
JAX-WS RI
See also https://jax-ws.java.net/nonav/2.2.10/docs/index.html. You can view the WSDL file in browser using: http://localhost:8080/helloservice/HelloService?wsdl The below didn’t work for me with jax-ws 2.2.10 ri (java approach). Test the service without a client by typing the following URL in browser: http://localhost:8080/helloservice/HelloService?Tester
XSD schema
https://www.w3.org/TR/xmlschema-2/#built-in-datatypes http://www.xml.com/pub/a/2001/08/22/easyschema.html -> best article That leaves us with with , which ensures that there will not be any data content in the element. -> the default syntax for complex types is complex content that restricts anyType http://stackoverflow.com/questions/5457217/xsd-for-simplecontent-with-attribute-and-text Apparently, you […]
Spring Data REST
The core functionality of Spring Data REST is to export resources for Spring Data repositories. Spring Data REST exposes sub-resources of every item resource for each of the associations the item resource has. By default, Spring Data REST uses HAL […]