2022년 7월 19일 화요일

Google test

https://medium.com/@jgrant.esteve/google-test-compiled-from-source-c7ab87329321

 

 

 1. get google test source

git clone https://github.com/google/googletest.git
 
 
2.  cd into googletest.
cmake .. 
library files should be generated 
 
make install 
this command install header files and library to common path   
so you can include gtest header and start writing test cases for your code
 
3.  example files
#include "gtest/gtest.h"
#include "main.cpp"
   
TEST(Name, Test) {
ASSERT_TRUE(1 == 1);
}
 
 
int main(int argc, char **argv) 
{
testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}
 
4. compile with command 
 $ g++ example.cpp -o example -lgtest -lpthread

2022년 3월 24일 목요일

Keyboard shortcut for taking selected area screenshot in Mint 20.04

 

Keyboard shortcut for taking selected area screenshot in Mint 20.04

 
Mate 20 does not have a keybinding for a partial screen print.
You can make one yourself.

In a terminal window type:

Code: Select all

mate-keybinding-properties
This will give you the keyboard shortcut window.

Click the add button.
Choose a name like 'partial screenprint'
Copy the following line to the command field:

Code: Select all

bash -c "sleep 0.2; mate-screenshot -a"
Click apply.

Your key is now defined but it is still disabled.
Double click on the word disabled behind your key and enter your preferred key combination. I would suggest ctrl-prtscr as shift-prtscr is already taken.

Click close and you are done.

2021년 1월 4일 월요일

2020년 12월 25일 금요일

Firefox Delete all Saved Login.

use below address copy and paste into address bar and enter, current version 84.0.1

chrome://pippki/content/resetpassword.xhtml

  

Lack of basic feature, UI/UX guy must didn't do their job. I am not designer but I can say I can do better job than this one. ha!

2020년 9월 7일 월요일

How to Get Nautilus Typeahead Search Back in Ubuntu (PPA)

 https://www.omgubuntu.co.uk/2018/05/enable-nautilus-type-ahead-search-ubuntu

 

New version of Ubuntu's Nautilus default search is annoying.. 

fortunately, there is way to go back to good old type ahead search. 


add PPA

sudo add-apt-repository ppa:lubomir-brindza/nautilus-typeahead
 
update 
sudo apt dist-upgrade
 
 
restart nautilus, Press alt + f2 and run:
nautilus -r 

2018년 12월 15일 토요일

RealVnc server does not show proper resolution after boot without monitor, Ubuntu 16.04

RealVnc server does not show proper resolution after boot without monitor.
vncserver -geometry 2560x1440   not working..!! Ubuntu 16.04 xserver is probably not compatible to
work with vncserver command. so there is one solution I came with,

solution:
add dummy display into /usr/share/X11/

use gtf command to generator proper resolution.
ex) gtf 2560 1440 60

/usr/share/X11/xorg.conf.d/xorg.conf/xorg.conf
====================================================
section "Device"
    Identifier  "Configured Video Device"
    Driver      "dummy"
    VideoRam 256000
#    VideoRam 2000000
EndSection

Section "Monitor"
    Identifier  "Configured Monitor"
    HorizSync 5.0 - 1000.0
    VertRefresh 5.0 - 200.0

# 2560x1440 @ 60.00 Hz (GTF) hsync: 89.40 kHz; pclk: 311.83 MHz
    Modeline "2560x1440_60.00"  311.83  2560 2744 3024 3488  1440 1441 1444 1490  -HSync +Vsync

EndSection

Section "Screen"
    Identifier  "Default Screen"
    Monitor     "Configured Monitor"
    Device      "Configured Video Device"
    DefaultDepth 24
    SubSection "Display"
    Depth 24
      Virtual 2560 1440
    EndSubSection
EndSection
====================================================

restart x display manager
sudo systemctl restart display-manager

check xserver log
sudo grep Modeline /var/log/Xorg.0.log


** Issue:
1. since it is placed in xorg.conf, it only work for dummy display for remote access,
 it won't work for physical monitor.  even rename it as 10-dummy.conf  it won't work with real monitor.   


2018년 12월 2일 일요일

RealVNC Connect on Ubuntu 16.04.4

https://boringtechtutorials.wordpress.com/2018/06/15/realvnc-connect-on-ubuntu-16-04-4/


To install RealVNC Connect run this terminal command.


$ sudo dpkg –i package name.deb

Once you install RealVNC Connect you need launch the setup wizard to login with your home subscription account.
In terminal run vnclicensewiz


$ vnclicensewiz
 
This will launch the wizard and you just need to login with your realvnc credentials. You will also need root password when requested.
To start RealVNC Connect service, run the following terminal command.


$ sudo systemctl start vncserver-x11-serviced.service

You will now see the RealVNC Connect icon on the Unity top bar.
You should now be able to connect to this system using RealVNC Viewer from another computer.
If you restart the computer RealVNC Connect will not atomically start. To make it start each time run the following command.


$ sudo systemctl enable vncserver-x11-serviced.service

This should complete the setup.

sublime close without confirmation

  Close without confirm   Yes, you can just write a plugin to set the view as scratch and close it. Then create a keybinding for that c...