montage -label '%f' -geometry +4+4 -pointsize 20 -tile 4x6 *.tiff mtg.jpg
i.e. some stuff and junk about Python, Perl, Matlab, Ruby, Mac X, Linux, Solaris, ...
Wednesday, June 21, 2017
ImageMagick: montage images into one
Labels:
imagemagick
Tuesday, June 13, 2017
ImageMagick: Flatten image results in white image
Instead of -flatten option try using -layers trim-bounds
Labels:
imagemagick
Monday, June 12, 2017
UFW: forward trafic on a port 8333 to different computer/ip and back
Full node is running on: ip_full_node
Redirection is done on server: ip_of_uwf_server
*nat
:PREROUTING ACCEPT [0:0]
:POSTROUTING ACCEPT [0:0]
-F
-A PREROUTING -i eth0 -p tcp --dport 8333 -j DNAT --to-destination ip_full_node:8333
-A POSTROUTING -p tcp -d ip_full_node --dport 8333 -j SNAT --to-source ip_of_uwf_server
-A POSTROUTING -s 10.8.0.0/8 -o eth0 -j MASQUERADE
COMMIT
Based on: https://serverfault.com/a/586553
Wednesday, May 10, 2017
ImageMagick: remove alpha channel from tiff images
mogrify -flatten -alpha off *.tiff
Labels:
imagemagick,
Linux
Monday, May 01, 2017
HDMI audio output in Arch for KDE
aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC898 Analog [ALC898 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 1: ALC898 Digital [ALC898 Digital]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 7: HDMI 1 [HDMI 1]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 8: HDMI 2 [HDMI 2]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 9: HDMI 3 [HDMI 3]
Subdevices: 1/1
Subdevice #0: subdevice #0
aplay -D plughw:1,7 /usr/share/sounds/alsa/Front_ Right.wav
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC898 Analog [ALC898 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 1: ALC898 Digital [ALC898 Digital]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 7: HDMI 1 [HDMI 1]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 8: HDMI 2 [HDMI 2]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 9: HDMI 3 [HDMI 3]
Subdevices: 1/1
Subdevice #0: subdevice #0
aplay -D plughw:1,7 /usr/share/sounds/alsa/Front_
Monday, March 27, 2017
VirtualBox: resize disk in linux
Resize to 350GB using VirtualBox 5.18:
VBoxManage modifyhd "/home/myhome/VirtualBox VMs/arc/arc.vdi" --resize 350000
Full path to virtual disk (e.g., arc.vdi) is important. Without the full path, the following error occurs:
VBoxManage: error: Cannot register the hard disk '/home/myhome/VirtualBox VMs/arc/./arc.vdi' {54199b9e-0a91-4d84-a7d0-fe2b47ed8f47} because a hard disk '/home/myhome/VirtualBox VMs/arc/arc.vdi' with UUID {54199b9e-0a91-4d84-a7d0-fe2b47ed8f47} already exists
VBoxManage: error: Details: code NS_ERROR_INVALID_ARG (0x80070057), component VirtualBoxWrap, interface IVirtualBox, callee nsISupports
VBoxManage: error: Context: "OpenMedium(Bstr(pszFilenameOrUuid).raw(), enmDevType, enmAccessMode, fForceNewUuidOnOpen, pMedium.asOutParam())" at line 179 of file
Labels:
Linux,
VirtualBox
Thursday, March 23, 2017
Linux: mkdir and cd in one command
mkcd () {
case "$1" in
*/..|*/../) cd -- "$1";; # that doesn't make any sense unless the directory already exists
/*/../*) (cd "${1%/../*}/.." && mkdir -p "./${1##*/../}") && cd -- "$1";;
/*) mkdir -p "$1" && cd "$1";;
*/../*) (cd "./${1%/../*}/.." && mkdir -p "./${1##*/../}") && cd "./$1";;
../*) (cd .. && mkdir -p "${1#.}") && cd "$1";;
*) mkdir -p "./$1" && cd "./$1";;
esac
}
From: http://unix.stackexchange.com/a/9124/90216
Monday, March 20, 2017
Windows 8.1: start chrome in new session and monitor
"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --user-data-dir=c:/monitor1
Monday, March 13, 2017
Linux SPSS 24: R 3.2 was not found in this location.
When installing R essentials for linux it is unclear how to specify R path. Without this, the following error occures:
In the screenshot /opt/r32 is my installation folder (I compiled version 3.2.2 it myself from source). The binary R is in /opt/r32/bin. This will not work. The path must be to R folder inside lib64 folder.
R 3.2 was not found in this location. Please click Previous to select a different location, or install R 3.2 on this computer and run this installation again.For me the answer was to proved a path where `lib64` of the R package is located, not where the R binary is as show on this screenshot
In the screenshot /opt/r32 is my installation folder (I compiled version 3.2.2 it myself from source). The binary R is in /opt/r32/bin. This will not work. The path must be to R folder inside lib64 folder.
Tuesday, March 07, 2017
Chrome through ssh tunel
ssh -ND 1080 user@remote_server_ip -p 2222
google-chrome-stable --proxy-server="socks5://localhost:1080" --proxy-bypass-list="localhost;127.0.0.1"
Subscribe to:
Posts (Atom)
