Code:
mount -o bind /media/disk1/pictures /home/user1/pictures mount -o bind /media/disk1/pictures /home/user2/pictures
Code:
/media/disk1/pictures /home/add1cker/pictures none defaults,bind 0 0
Software Developer, Programming, Web resources and entertaiment. Desarrollo de software, programación, recursos web y entretenimiento.
mount -o bind /media/disk1/pictures /home/user1/pictures mount -o bind /media/disk1/pictures /home/user2/pictures
/media/disk1/pictures /home/add1cker/pictures none defaults,bind 0 0
$sudo apt-get install freeglut3-dev
Distribution | Username | Password
---------------|------------|-------------
Debian Squeeze | pi | raspberry
Arch | root | root
QtonPi | root | rootme
Raspbian | pi | raspberry
OpenElec | root | openelec
Pidora | root | raspberrypi
RISC OS | n/a | n/a
raspbmc | pi | raspberry
2) add users
$sudo adduser username
$
usermod -aG sudo username
3) Ports
$lsof -nP -i | grep LISTEN
$netstat -tlpn | grep LISTEN
4) vncserver (reinstall, by default sometime doesn't works)
$sudo apt-get install tightvncserver
5) Firewalls
iptables -I INPUT -p tcp --dport 5900 -j ACCEPT iptables -I INPUT -p tcp --dport 5901 -j ACCEPT
Resources:
[1] https://www.digitalocean.com/community/tutorials/how-to-create-a-sudo-user-on-ubuntu-quickstart
[2] direct way https://www.shellhacks.com/how-to-grant-root-access-user-root-privileges-linux/
[3] vncserver https://quaintproject.wordpress.com/2013/03/24/establish-a-vnc-connection-to-your-raspberry-pi-from-a-linux-pc/
getchar_unlocked()
and putchar_unlocked()
for taking fast single character I/O.getchar()
and puchar()
repectively
$wget https://pypi.python.org/packages/e7/a8/7556133689add8d1a54c0b14aeff0acb03c64707ce100ecd53934da1aa13/pip-8.1.2.tar.gz
$tar -xzvf pip-8.1.2.tar.gz
$cd pip-8.1.2
$sudo python setup.py install
export CC=path_of_gcc/gcc-version
export CXX=path_of_g++/g++-version
cmake path_of_project_contain_CMakeList.txt
make
OR
#Current version is 6, but we need to compile using another version (installed for sure)
$CC="gcc-4.9" CXX="g++-4.9" cmake /CMakeLists.txt
OR$cmake -G "Unix Makefiles" -DCMAKE_CXX_COMPILER=/usr/bin/g++ CMAKE_C_COMPILER=/usr/bin/gcc -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_INSTALL_PREFIX=/usr/local -DWITH_TBB=ON -DBUILD_NEW_PYTHON_SUPPORT=ON -DWITH_V4L=ON -DINSTALL_C_EXAMPLES=ON -DINSTALL_PYTHON_EXAMPLES=ON -DBUILD_EXAMPLES=ON -DWITH_QT=ON -DWITH_OPENGL=ON -DBUILD_FAT_JAVA_LIB=ON -DINSTALL_TO_MANGLED_PATHS=ON -DINSTALL_CREATE_DISTRIB=ON -DINSTALL_TESTS=ON -DENABLE_FAST_MATH=ON -DWITH_IMAGEIO=ON -DBUILD_SHARED_LIBS=OFF -DWITH_GSTREAMER=ON -DWITH_OPENMP=OFF -DWITH_CUDA=OFF -DBUILD_opencv_gpu=OFF ..mmap()
combines the functions of CreateFileMapping()
and MapViewOfFile()
qmake -spec macx-g++ x.pro
on Mac OS X to generate Makefileqmake x.pro
on linux to generate Makefile (default behaviour)qmake -spec win32-g++ x.pro
on Windows to generate MakefilelibGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
sudo apt-get purge nvidia*
#This will remove your current nVidia driverssudo apt-get install --reinstall xserver-xorg-video-intel libgl1-mesa-glx libgl1-mesa-dri xserver-xorg-core
sudo dpkg-reconfigure xserver-xorg
#This should fix Xorgsudo update-alternatives --remove gl_conf /usr/lib/nvidia-current/ld.so.conf
sudo apt-add-repository ppa:xorg-edgers/ppa
#provides the necessary repository sudo apt-get update
sudo apt-get install bumblebee-nvidia nvidia-319 nvidia-settings-319
#include <iostream> #include <termios.h> //TCSANOW, ICANON, .. #include <unistd.h> //STDIN_FILENO .. #include <stdio.h> //getchar using namespace std; char getch(void) { struct termios oldattr, newattr; char ch; tcgetattr( STDIN_FILENO, &oldattr ); newattr = oldattr; newattr.c_lflag &= ~( ICANON | ECHO ); tcsetattr( STDIN_FILENO, TCSANOW, &newattr ); ch = getchar(); tcsetattr( STDIN_FILENO, TCSANOW, &oldattr ); return ch; } char getche(void) //with ECHO { struct termios oldattr, newattr; int ch; tcgetattr( STDIN_FILENO, &oldattr ); newattr = oldattr; newattr.c_lflag &= ~( ICANON ); tcsetattr( STDIN_FILENO, TCSANOW, &newattr ); ch = getchar(); tcsetattr( STDIN_FILENO, TCSANOW, &oldattr ); return ch; } int main(int argc,char *argv[]) { char ch1=getch(); char ch2=getche(); cout << "\nFirst : " << ch1 << "\nSecond: " << ch2 << endl; return 0; } //g++ getchx.cpp -o getchx
$sudo alsa force-reload
restart device and check if sound is workin? if it doesnt do this:$sudo apt-get remove --purge alsa-base pulseaudio
$sudo apt-get install alsa-base pulseaudio
References:
$wget -c https://download3.vmware.com/software/player/file/VMware-Player-12.5.0-4352439.x86_64.bundle
$sudo chmod u+x VMware-Player-12.5.0-4352439.x86_64.bundle
$sudo ./VMware-Player-12.5.0-4352439.x86_64.bundle
$sudo add-apt-repository ppa:atareao/atareao
$sudo apt-get update
$sudo apt-get install cpu-g
sudo add-apt-repository ppa:cpug-devs/ppa
sudo apt-get update
sudo apt-get install cpu-g
*create drives
$qemu-img create name
.img size|M|G
$qemu-img create win98hda.img 400M
*resize driver
$qemu-img resize filename [+|-]size[K|M|G|T]
$qemu-img resize win98hda.img +600M
$gparted win98hda.img #for expand physically
$qemu [-boot ] -cdrom .iso
[-m size]|128M -hda disk-name.img
$qemu -boot d -cdrom win98se.iso -m 512 -hda win98hda.img
other examples:
[1] install win98 using boot iso and installer iso (two disks)
$qemu-system-i386 -hda win98s2018.img -boot d -cdrom win98boot.iso -drive file=win98se.iso,index=3,media=cdrom
$qemu-system-i386 -hda win98s2018.img -boot c -cdrom win98boot.iso -drive file=win98se.iso,index=3,media=cdrom
$qemu-system-i386 -drive file=win98s2018.img,format=raw -m 512 #other way to run
apt-get install libglib2.0-dev zlib1g-dev
$./configure --target-list=i386-softmmu #for reduce time > 5hrs (normally)
$make
$sudo make install
https://b3n7s.github.io/update/2016/06/08/windows-xp-on-qemu.html$locate mod_mono.so
$sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
$echo "deb http://download.mono-project.com/repo/ubuntu stable-xenial main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list
$sudo apt-get update
$sudo apt-get install mono-devel
$sudo apt install libapache2-mod-mono
$sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
$echo "deb http://download.mono-project.com/repo/debian alpha main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list
$sudo apt-get update
$sudo apt-get install mono-devel mono-complete ca-certificates-mono mono-xsp4 #take time
$sudo apt-get install monodevelop=5.10.0.871-0xamarin2
#[1]
May be you will get this message at create project:
Access to the path “/etc/mono/registry” is denied, then
$sudo mkdir /etc/mono/registry
$sudo chmod uog+rw /etc/mono/registry
$sudo apt install radiotray python-xdg
$winetricks corefonts eufonts lucida opensymbol tahoma cjkfonts
$winetricks vb6run
$winetricks mdac28
$winetricks msxml4 mfc42 jet40 native_oleaut32
$winecfg #set libraries for overwrite
$wine msiexec /i mysql-connector-odbc-5.1.13-win32.msi #choice best driver
$wine control
uname -r
in terminal.Now type this command to get list of available kernels.
apt-cache search linux-image
this will give you a very big output.Now chose one of them that you
want to install and install it by following commands(Don't type these
commands like this,replace the word kernal_version with the kernel
version which you wish to install)sudo apt-get install linux-image-kernal_version
sudo apt-get install linux-image-extra-kernal_version
sudo apt-get install linux-headers-kernal_version
Now in my case i choose linux-image-4.10.0-22-generic
so my command will look like this sudo apt-get install linux-image-4.10.0-22-generic
sudo apt-get install linux-image-extra-4.10.0-22-generic
sudo apt-get install linux-headers-4.10.0-22-generic
now in the end remove old kernel by commandsudo apt-get autoremove
sudo reboot
#monodevelop 4
sudo apt-get install monodevelop
#upgrade to monodevelop
5
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb http://download.mono-project.com/repo/debian wheezy main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list
sudo apt-get update
sudo apt-get install monodevelop
References:
[1] Monodevelop versions https://download.mono-project.com/archive/
PDF Annotator
[1] online/free/for signatures https://www.pdfescape.com/
PDF Tools
$sudo apt-get install pdftk
$pdftk A.pdf cat 1-9 26-end output B.pdf # keep pages 1-9 and 26-end of the original file
$pdftk file1.pdf file2.pdf file3.pdf cat output newfile.pdf #join
$convert
file1.pdf file2.pdf file3.pdf output.pdf #reduce resolution
$sudo apt-get install pdfmod #remove pages
, works with A4
$sudo apt-get install pdfshuffler #remove pages, works with beamer too
$watch -n 1 nvidia-smi
#to obtain continuous updates without filling the terminal with output$sudo pip install gpustat
$gpustat
$sudo pip install glances
$sudo pip install glances[gpu]
$glances
$sudo fdisk /dev/sdb #commands d, n, w
$sudo mkntfs /dev/sdb1
$mkfs.ntfs -f /dev/sdb1
$dmesg | grep sd
$sudo lshw -C disk
Skype on Ubuntu 16
[1] http://ubuntuhandbook.org/index.php/2017/03/install-skype-5-0-for-linux-ubuntu-16-04/
Skype on Centos 6.5
When i tried install skype on centos 6.5 i received next message:
error: Failed dependencies: alsa-lib >= 1.0.23 is needed by skype-4.2.0.13-fc16.i586 libQtWebKit.so.4 is needed by skype-4.2.0.13-fc16.i586 libstdc++.so.6(GLIBCXX_3.4.15) is needed by skype-4.2.0.13-fc16.i586 qtwebkit is needed by skype-4.2.0.13-fc16.i586
then i tried next commands and works very well.
1) Install EPEL if you haven't already. #yum install http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm 2) Download the RPM here #wget http://www.bromosapien.net:8080/others/skype-4.2.0.11-4.el6.i686.rpm 3) Install it as so #yum install skype-4.2.0.11-4.el6.i686.rpm 4) If you receive an error about a GPG key, you may import my key as necessary. #wget http://www.bromosapien.net:8080/others/SYRKIT-GPG-KEY.pub #rpm --import SYRKIT-GPG-KEY.pub
#Grub Settings if doesn't starting
Push shift for stop grub and edit(e key)
Replace quit splash with nomodeset if video drive problems
F10 for start with new settings
#add repository
sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt-get update
#remove previous drivers
$sudo apt-get purge nvidia-*
titan@titan:~$ sudo apt-cache search nvidia-3
fter installation, execute next commands:
$sudo mv /usr/lib/nvidia-375/libEGL.so.1 /usr/lib/nvidia-375/libEGL.so.1.org
$sudo mv /usr/lib32/nvidia-375/libEGL.so.1 /usr/lib32/nvidia-375/libEGL.so.1.org
$sudo ln -s /usr/lib/nvidia-375/libEGL.so.375.39 /usr/lib/nvidia-375/libEGL.so.1
$sudo ln -s /usr/lib32/nvidia-375/libEGL.so.375.39 /usr/lib32/nvidia-375/libEGL.so.1
$sudo ldconfig #for verify correct link
PD:
We can't installed titan x on ubuntu 16, we replaced with Geforce 1070
We execute above instructions and that works.
Summary good commands:
$ lspci | grep VGA
#for verify nvidia series
$ lspci -vnn | grep -i VGA -A 12 #for verify kernel driver:nvidia
$ glxinfo | grep OpenGL | grep renderer #for verify opengl
References:
[1] https://askubuntu.com/questions/61396/how-do-i-install-the-nvidia-drivers/680826
[2] Instalar driver Nvidia manualmente no Ubuntu 16.04 (pt) https://linuxdicasesuporte.blogspot.com.br/2017/03/instalar-driver-nvidia-manualmente-no.html
[3] Nvidia drivers on Ubuntu 14.04 http://www.binarytides.com/install-nvidia-drivers-ubuntu-14-04/
Solving multiple python installation: sudo update-alternatives --install /usr/ bin /python3 python3 /usr/ bin /python3 .5 1 sudo update...