- 2014.09.12, 09:25
- To start selenium tests with chromium, specify following as Java VM option:
-Dwebdriver.chrome.driver=/usr/lib/chrom
ium-browser/chromedriver
also see: http://stackoverflow.com/questions/25695299/chromedriver-on-ubuntu-14-04-error-w hile-loading-shared-libraries-libui-base - 0 rakstair doma
- 2014.09.02, 09:45
- When setting up dev oracle server, it may be useful to stop passwords from expiring:
alter profile default limit password_life_time unlimited;
Change password:ALTER USER me IDENTIFIED BY my_new_password;
- 0 rakstair doma
- 2014.04.24, 21:50
- make 'dev' and 'tomcat' terminal profiles: size 160x60
title: prepend
run custom command: bash -c 'PROFILE=dev exec bash'
in .bashrc set:HISTCONTROL=ignoreboth:erasedups ... if [[ -n $PROFILE ]]; then HISTFILE=~/bash_history.$PROFILE fi
this way, your tomcat profile will contain command history related to running/shutting down tomcat, dev terminal will contain your build commands, etc.
bonus tip: use following to set terminal title to name of currently building directory. then you can see which build is running.function title { echo -en "\033]2;$1\007" } title "building ${PWD##*/}"
add "gedit buildlog.txt &" to end of build script, to notify you when build is done and immediately give you build log.
gedit is best because it will reload the file if it's already open. - 0 rakstair doma
- 2014.04.23, 21:48
- Make Eclipse more colorful: Window / Preferences / Java / Editor / Syntax Coloring / Java / Parameter Variables / [x] Enable
Color name: #6A3E3E - 0 rakstair doma
- 2014.04.23, 21:42
- performance-optimized Eclipse .ini:
--- cut ---
-vmargs
-DsuppressRawWhenUnchecked=true
-XX:+CMSClassUnloadingEnabled
-Xverify:none
-Xincgc
-Xss4m
-Duser.name=w
-Dfile.encoding=UTF-8
-Dosgi.requiredJavaVersion=1.7
-Declipse.p2.unsignedPolicy=allow
-Declipse.p2.MD5Check=false
-Xms1024m
-Xmx2560m
-XX:NewSize=16m
-XX:PermSize=128m
-XX:MaxPermSize=400m
-XX:MaxPermHeapExpansion=20m
-XX:+UseConcMarkSweepGC
-XX:CMSInitiatingOccupancyFraction=70
-XX:+UseCMSInitiatingOccupancyOnly
-XX:+UseParNewGC
-XX:+CMSConcurrentMTEnabled
-XX:ConcGCThreads=2
-XX:ParallelGCThreads=2
-XX:+CMSIncrementalPacing
-XX:CMSIncrementalDutyCycleMin=0
-XX:CMSIncrementalDutyCycle=5
-XX:GCTimeRatio=49
-XX:MaxGCPauseMillis=20
-XX:GCPauseIntervalMillis=1000
-XX:+UseCMSCompactAtFullCollection
-XX:+CMSClassUnloadingEnabled
-XX:+DoEscapeAnalysis
-XX:+UseCompressedOops
-XX:+AggressiveOpts
-XX:+ExplicitGCInvokesConcurrentAndUnloadsClasses
-XX:+DisableExplicitGC
--- cut --- - 1 rakstair doma
- 2014.04.23, 21:39
- Java settings:
#export JAVA_HOME=/usr/lib/jvm/java-6-oracle
export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64
export ANT_HOME=$HOME/java/apache-ant-1.9.1
export MAVEN_HOME=$HOME/java/apache-maven-3.0.5
PATH=$PATH:$MAVEN_HOME/bin:$ANT_HOME/bin
#PATH="$PATH:~/bin:~/java/sbt/bin"
export PATH
export JAVA_OPTS="-Xms1024m -Xmx3548m -XX:MaxPermSize=712m -Duser.language=en -Duser.country=US"
export MAVEN_OPTS="-Xmx2900m -XX:MaxPermSize=712m -XX:ReservedCodeCacheSize=100m -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled -Dmaven.artifact.threads=2" - 0 rakstair doma
- 2014.04.23, 21:11
- mount NFS volumes as _netdev on startup:
192.168.1xx.xx:/volume1/storage5 /media/diskstation5 nfs rsize=8192,wsize=8192,timeo=14,intr,_netdev 0 0
192.168.1xx.xx:/volume1/storage8 /media/diskstation8 nfs rsize=8192,wsize=8192,timeo=14,intr,_netdev 0 0
mount /tmp as RAM drive:tmpfs /tmp tmpfs defaults,nosuid,size=2G 0 0
- 0 rakstair doma
- 2013.12.30, 15:50
- MPD section for ODAC output (do not convert anything, only push raw data):
### AUDIO section start audio_output { type "alsa" name "DAC USB Audio" device "hw:1,0" mixer_type "hardware" mixer_device "hw:1" mixer_control "PCM" #force upsample to 24bit: format "*:24_3:2" #check if this helps auto_resample "no" auto_channels "no" auto_format "no" use_mmap "yes" } ### AUDIO section end
Verify:cat /proc/asound/card1/stream0
cat /proc/asound/card1/pcm0p/sub0/hw_params
You should see 'S24_3LE' stream is used. - 0 rakstair doma
- 2013.12.30, 08:19
- I am hitting a bug on Ubuntu 13.10 that my monitors don't turn off after they go to sleep. Folowing commands work around the issue (whatever the original bug is) - turning off monitors after 5 min of inactivity (300 seconds):
xset +dpms
xset dpms 300 - 0 rakstair doma
- [SOLVED] Synology DS1513+ slow 5mb/s write speed on Linux smb/cifs gvfsd on gigabit network
- 2013.12.07, 13:14
- I use Synology DS1513+ NAS box, 5 disks (3TB WD RED), as RAID6.
Quite for some time I was battling slow write speed to NAS - about 5mb/s (even less), when everybody says it's capable of pushing 50-100mb/s. (And it really is... read on.)
I need to take a step back. Turns out, slow write speed seems to be caused by specific configuration - a SMB share mounted using Nemo [a Nautilus fork - I use Cinnamon desktop on Ubuntu Saucy]. Some people say it's because it's mounted using NetBIOS name (and yes, mounting it via GUI of course uses network name. They say, if you mount it using IP address, slowness disappears. I am thinking the issue really is gvfsd (the share appears under /run/user/(userid)/gvfs/ folder) - it must be slow.)
For now, I simply switched to NFS. And I am seeing 100mb+/s write(!) speeds.
Here's the mount command:mount -t nfs 192.168.xxx.xxx:/volume1/storage /media/diskstation -o rsize=8192,wsize=8192,timeo=14,intr
I did not try if mounting via cifs would improve things.
Here's command to try in future:
[... create a file named cifs.conf in /etc/modprobe.d/ which has the following:options cifs CIFSMaxBufSize=130048
In fstab,//192.168.xxx.xxx/storage /media/diskstation cifs directio,rsize=130048,guest,uid=1000,ioc
harset=utf8,codepage=unicode,unicode 0 0
(to investigate: credentials=/root/.smbcredentials,nounix,file_mode=0777,dir_mode=0777)]
rsync:
rsync -rv --progress --whole-file --size-only --itemize-changes --human-readable (no) (/uz/) - 0 rakstair doma
- 2013.09.15, 17:25
- ja lieto gedit, un meklē kautko labāku, ir geany ir labs. ļoti pieklājīgs whitespace handling: māk rādīt, iztīrīt (tabs to spaces), ir "remove trailing spaces" komanda, un superhīts: strip trailing space on newline (kas īpaši pietrūkst Eclipsei, tur enter-enter-enter spiežot saražo daudz līniju kuras nav tukšas - aizpildītas ar space līdz virtuālā kursora pozīcijai. stulbi.)
lieliski noder arī labojot failus kuros daudz mēslu, bet tīrīt nevar, jo citi ar tiem strādā (un versiju kontrolē būtu tad daudz "izmaiņu"). - 4 rakstair doma
- 2013.07.10, 17:01
- lai atjaunotu .Xmodmap pēc pamodināšanas no miega (resume from suspend):( ... tālāk ... )
- 0 rakstair doma
- 2013.05.04, 13:42
- Lai neraustās video iekš Linux (tearing) ar Nvidia draiveri:( ... tālāk ... )
- 0 rakstair doma
- kaa palaist rsyncd
- 2011.02.06, 21:15
- rsyncd serveris: sudo rsync --daemon --no-detach --config=rsync.cfg --verbose --port=1984
=== rsyncd.cfg ===
[share]
path = /media/backup/w/
read only = false
uid = w
gid = w
==================
kopēt failus uz serveri:
rsync -r (folder) rsync://w@(serveris)/share --port=1984 --verbose --progress
kopēt lielus failus, bez salīdzināšanas:
rsync -r -u -w --size-only
(--update --whole-file) - 0 rakstair doma
- 2010.11.18, 16:36
- Lai piekļūtu datoriem lokālajā tīklā, tev vajag pieeju caur ugunssienu tikai vienam datoram lokālajā tīklā.
Pieņemsim, ka ir tīkls 192.168.1.x, ar publisko adresi 10.10.10.10. Pieņemsim, ka uz 10.10.10.10 ir ugunssiena, bet ports 22222 tiek forwardēts uz 192.168.1.10, uz kura ir tava darbastacija.
Tas ir, pieslēdzoties ar ssh pie 10.10.10.10:22222, tu īstenībā pieslēdzies 192.168.1.10:22 (ssh ports). (Vēl pieņemsim, ka tev ir authorized_keys pievienota RSA atslēdziņa, lai nebūtu paroles jāievada).
Sāksim ar vienkāršāko. 192.168.1.1 nav redzams no publiskā tīkla. Bet tur griežas router admin. Lai administrētu savu maršrutētāju, tev jāpieslēdzas pie 192.168.1.1.
Dari šādi:ssh -L 8080:192.168.1.1:80 10.10.10.10 -p 22222 -i mans.id_rsa -C -N -v
ssh pieslēdzas serverim 10.10.10.10, pie porta 22222, autentificējas ar mans.id_rsa, un no teva localhost:8080 porta atver tuneli uz iekšējā tīkla (kas dzīvojas aiz 10.10.10.10 ugunssienas) adresi 192.168.1.1:80.debug1: Local connections to LOCALHOST:8080 forwarded to remote address 192.168.1.1:80
Pieslēdzoties locahost:8080 tu redzēsi to pašu, ko mājās, pieslēdzoties 192.168.1.1.
Kā no ārpuses droši pieslēgties pie Windows Remote Desktop.
Es nekad neļaušu no ārpuses redzētu manu Windows RDP portu. Bet ssh portu gan es ļauju redzēt: ielogoties var tikai ar pub/private key, un to uzlauzt ir nereāli.
Daram līdzīgi:ssh -L 8080:192.168.1.10:3389 10.10.10.10 -p 22222 -i mans.id_rsa -C -N -v
Princips tieši tas pats. Pēc ssh pieslēguma izveides, slēdzoties ar Remote Desktop pie sava localhost:8080, tu īstenībā nokļūsti uz 192.168.1.10:3389 (t.i., Remote Desktop uz attālinātā datora). (Šeit 8080 vietā vari likt jebkuru citu portu, (piemēram 3391). Ja tu mēģinātu lokālo portu uzlikt 3389 (tādu pašu kā remote portu), var gadīties ka uz tava datora 3389 jau pašreiz tiek izmantots (ir aktīvs Remote Desktop serviss), un tad tu vnk caur Remote Desktop dabūtu pieslēgties pats pie sevis, nevis pie attālinātā datora.)
protip: 192.168.1.10 vietā var būt jebkura attālinātā(lokālā) tīkla adrese.
(+ priekš putty) - 0 rakstair doma