curl -L https://github.com/monero-project/monero/pull/1507.patch | git apply -v -
i.e. some stuff and junk about Python, Perl, Matlab, Ruby, Mac X, Linux, Solaris, ...
Tuesday, December 27, 2016
Git: apply pull request as patch
Labels:
git
Saturday, December 10, 2016
VirtualBox – Cannot Register the Hard Drive Because a Hard Drive with UUID Already Exists
After moving virtualbox folder to new location, cant boot any vm. To fix this, one can use this for example
vboxmanage internalcommands sethduuid /mnt/stuff/linux_backup/VirtualBox\ VMs/w7/w7.vdi
Labels:
Linux,
VirtualBox
Wednesday, December 07, 2016
Copy and paste adds adds 0~ and 1~
From here: http://unix.stackexchange.com/questions/196098/copy-paste-in-xfce4-terminal-adds-0-and-1
Add this to .bashrc:
Add this to .bashrc:
printf "\e[?2004l"
Labels:
Linux
Friday, November 18, 2016
ssh: copy your id_rsa.pub to remote host for no password
Execute on your localhost:
ssh-copy-id -i ~/.ssh/id_rsa.pub username@remote-host
Ubuntu 16:10: No D-BUS daemon running for vnc session
Open xterm in the vnc, and execute the following:
sudo dbus-launch --sh-syntax
Labels:
Ubuntu
Friday, November 04, 2016
Compile ImageMagick 7 on Ubuntu 16.04
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt install build-essential autoconf automake autopoint chrpath cm-super-minimal debhelper dh-autoreconf dh-strip-nondeterminism doxygen doxygen-latex gir1.2-rsvg-2.0 graphviz libbz2-dev libcairo-script-interpreter2 libcairo2-dev libcdt5 libcgraph6 libclang1-3.6 libdjvulibre-dev libexif-dev libfftw3-bin libfftw3-dev libfftw3-long3 libfftw3-quad3 libfile-stripnondeterminism-perl libfontconfig1-dev libfreetype6-dev libgdk-pixbuf2.0-dev libglib2.0-dev libgvc6 libgvpr2 libharfbuzz-dev libharfbuzz-gobject0 libice-dev libilmbase-dev libjasper-dev libjbig-dev libjpeg-dev libjpeg-turbo8-dev libjpeg8-dev libjs-jquery liblcms2-dev libllvm3.6v5 liblqr-1-0-dev liblzma-dev libobjc-5-dev libobjc4 libopenexr-dev libpango1.0-dev libpathplan4 libpcre3-dev libpcre32-3 libpcrecpp0v5 libperl-dev libpixman-1-dev libpng12-dev libpotrace0 libptexenc1 libpthread-stubs0-dev librsvg2-bin librsvg2-dev libsigsegv2 libsm-dev libsynctex1 libtexlua52 libtexluajit2 libtiff5-dev libtiffxx5 libwmf-dev libx11-dev libxau-dev libxcb-render0-dev libxcb-shm0-dev libxcb1-dev libxdmcp-dev libxext-dev libxft-dev libxml2-dev libxml2-utils libxrender-dev libxt-dev libzzip-0-13 m4 pkg-kde-tools po-debconf preview-latex-style tex-common texlive-base texlive-binaries texlive-extra-utils texlive-font-utils texlive-fonts-recommended texlive-latex-base texlive-latex-extra texlive-latex-recommended texlive-pictures x11proto-core-dev x11proto-input-dev x11proto-kb-dev x11proto-render-dev x11proto-xext-dev xorg-sgml-doctools xsltproc xtrans-dev zlib1g-dev libtiff5-dev xorg-dev libopenjp2-7-dev | |
wget http://www.imagemagick.org/download/ImageMagick.tar.gz | |
tar xzvf ImageMagick.tar.gz && cd cd ImageMagick-7.0.*/ | |
./configure --prefix=/opt/magick7 | |
make | |
sudo make install |
Labels:
imagemagick,
Ubuntu
Thursday, October 06, 2016
Ubuntu 16.04: openvpn dns leak
Direct copy from here:
https://bugs.launchpad.net/ubuntu/+source/openvpn/+bug/1211110/comments/58
I had the problem with Ubuntu 16.04 out-of-the-box. After a full week of 12 hour days trying to resolve this issue, I was finally about to fix it. I made a longer post about it here:
http://askubuntu.com/questions/829204/dns-routing-fails-for-vpn-connections-on-ubuntu-16-04-out-of-the-box
Here's the abbreviated version.
Step 1: Goto GitHub and clone the following repo to your home folder:
https://github.com/masterkorp/openvpn-update-resolv-conf
Step 2: Move the .sh files from your cloned rep to the /etc/openvpn folder:
sudo chmod +x *.sh && sudo mv *.sh /etc/openvpn
Step 3: Run the following command to install new packages for DNS:
sudo apt-get install openresolv nscd unbound
Step 4: Append the following line to your OpenVPN Client Configuration files (*.ovpn or *.conf). I did this after the configuration directives but before my inline certs ( tag):
script-security 2
up "/etc/openvpn/update-resolv-conf.sh /etc/openvpn/update-systemd-network.sh"
down "/etc/openvpn/update-resolv-conf.sh /etc/openvpn/update-systemd-network.sh"
This should resolve the DNS resolution problem. Dmitry has the right steps, but I needed the 2nd script for my system to update. Works like my 14.04 system... before I upgraded to 16.04...
https://bugs.launchpad.net/ubuntu/+source/openvpn/+bug/1211110/comments/58
I had the problem with Ubuntu 16.04 out-of-the-box. After a full week of 12 hour days trying to resolve this issue, I was finally about to fix it. I made a longer post about it here:
http://askubuntu.com/questions/829204/dns-routing-fails-for-vpn-connections-on-ubuntu-16-04-out-of-the-box
Here's the abbreviated version.
Step 1: Goto GitHub and clone the following repo to your home folder:
https://github.com/masterkorp/openvpn-update-resolv-conf
Step 2: Move the .sh files from your cloned rep to the /etc/openvpn folder:
sudo chmod +x *.sh && sudo mv *.sh /etc/openvpn
Step 3: Run the following command to install new packages for DNS:
sudo apt-get install openresolv nscd unbound
Step 4: Append the following line to your OpenVPN Client Configuration files (*.ovpn or *.conf). I did this after the configuration directives but before my inline certs (
script-security 2
up "/etc/openvpn/update-resolv-conf.sh /etc/openvpn/update-systemd-network.sh"
down "/etc/openvpn/update-resolv-conf.sh /etc/openvpn/update-systemd-network.sh"
This should resolve the DNS resolution problem. Dmitry has the right steps, but I needed the 2nd script for my system to update. Works like my 14.04 system... before I upgraded to 16.04...
Sunday, August 07, 2016
Tuesday, May 31, 2016
Monday, May 09, 2016
Sunday, May 08, 2016
Scallion on Ubuntu 16.04: The predefined type `System.Object' is not defined
Compile scallion on Ubuntu 16.04
xbuild scallion.sln /p:TargetFrameworkVersion="v4.5"
Without 4.5 target, geting following error:
CSC: error CS0518: The predefined type `System.Object' is not defined
Friday, May 06, 2016
Arch Linux: FAILED unknown public key
gpg --keyserver keys.gnupg.net --recv-keys KEY
More here: http://forums.netrunner-os.com/showthread.php?tid=18677
Labels:
Arch
Thursday, May 05, 2016
Ubuntu 16.04: Tmux mouse scrolling
add to ~/.tmux.conf
q to exit scroll mode.
set -g mouse on
q to exit scroll mode.
Labels:
Ubuntu
Tuesday, May 03, 2016
Ubuntu16:04: Matlab cant change font size on plots
xorg fonts need to be installed.
sudo apt install xfonts-100dpi xfonts-75dpi
Monday, May 02, 2016
Terminator: Set size and position in a config file
Example config file location:
Example content
/home/mwo/.config/terminator/config
Example content
[global_config]
[keybindings]
[layouts]
[[default]]
[[[child1]]]
parent = window0
profile = default
type = Terminal
[[[window0]]]
parent = ""
type = Window
size = 2000, 500
position = 420:900
[plugins]
[profiles]
[[default]]
Labels:
Arch,
lin,
termiantor
Wednesday, April 20, 2016
Ubuntu 16.04 and Matlab 2016a: MATLAB has encountered an internal problem and needs to close
There is some problem with matlab UI GPU-based rendering on nvidia as this is causing this problem
The workaround is to launch matlab without GPU rendering:
Stack Trace (from fault):
[ 0] 0x00007f5bbc4a024d /usr/lib/nvidia-361-updates/libGLX_nvidia.so.0+00344653
The workaround is to launch matlab without GPU rendering:
opt/MATLAB/R2016a/bin/matlab -softwareopengl
Thursday, April 14, 2016
Ubuntu: ssh to tor server
On the server:
Add this to /usr/tor/torrc
Restart tor
Onion hostname file for the ssh service should be created
Take note of the hostname
On the client:
Have tor browser running on the client.
Add this to ~/.ssh/config:
Add this to /usr/tor/torrc
HiddenServiceDir /var/lib/tor/sshd/
HiddenServicePort 22 127.0.0.1:22
Restart tor
sudo service tor restart
Onion hostname file for the ssh service should be created
sudo cat /var/lib/tor/sshd/hostname
Take note of the hostname
On the client:
Have tor browser running on the client.
Add this to ~/.ssh/config:
host hidden
hostname your_onion_hostname.onion
proxyCommand nc -x 127.0.0.1:9150 %h %p
Wednesday, April 13, 2016
Saturday, April 09, 2016
Ubuntu 16:04: Install Krusader with dependencies
sudo apt install krusader krename kdiff3 konsole kde-baseapps-bin
Without kde-baseapps-bin, bookmarks manager does not work.
Labels:
Ubuntu
Tuesday, March 29, 2016
Ubuntu 16:04: wt-3.3.5 compile error
When compiling latest wt-3.3.5, the following compile errors can occure:
This can be fixed, by compiling with C++11 mode:
To specify prefix folder (i.e., installation folder):
To build wt libraries as static (i.e. *.a), do:
usr/include/boost/core/ref.hpp:131:74: note: candidate: template const boost::reference_wrapper boost::ref(T&)
template BOOST_FORCEINLINE reference_wrapper BOOST_REF_CONST ref( T & t )
^
/usr/include/boost/core/ref.hpp:131:74: note: template argument deduction/substitution failed:
/tmp/wt-3.3.5/test/dbo/DboTest.C: In substitution of ‘template const boost::reference_wrapper
boost::ref(T&) [with T = dbo_test26::test_method()::CheckExpected]’:
/tmp/wt-3.3.5/test/dbo/DboTest.C:2381:76: required from here
/tmp/wt-3.3.5/test/dbo/DboTest.C:2381:76: error: template argument for ‘template const
boost::reference_wrapper boost::ref(T&)’ uses local type ‘dbo_test26::test_method()::CheckExpected’
model->dataChanged().connect(boost::bind(boost::ref(checkExpected),
^
/tmp/wt-3.3.5/test/dbo/DboTest.C:2381:76: error: trying to instantiate ‘template const
boost::reference_wrapper boost::ref(T&)’
This can be fixed, by compiling with C++11 mode:
cmake ../ -DWT_CPP_11_MODE:STRING="-std=c++11"
To specify prefix folder (i.e., installation folder):
cmake ../ -DWT_CPP_11_MODE:STRING="-std=c++11" -DCMAKE_INSTALL_PREFIX:PATH="/opt/wt"
To build wt libraries as static (i.e. *.a), do:
cmake ../ -DWT_CPP_11_MODE:STRING="-std=c++11" -DCMAKE_INSTALL_PREFIX:PATH="/opt/wt" -DSHARED_LIBS=0
Saturday, March 26, 2016
Ubuntu 16:04: Segmentation fault (core dumped), but no core file
Make core files to be located in the current working folder
sudo service apport stop
ulimit -c unlimited
Labels:
Ubuntu
Thursday, March 10, 2016
ImageMagick: Crop images in half verticly
Left half
mogrify -gravity West -crop 50%x100%+0+0 *.tiff
Right halfmogrify -gravity East -crop 50%x100%+0+0 *.tiff
Labels:
imagemagick,
Linux
Wednesday, January 06, 2016
ImageMagick: remove alpha and flatten
mogrify -flatten -type Grayscale -alpha remove *.tiff
Labels:
imagemagick
Subscribe to:
Posts (Atom)