2022년 7월 26일 화요일

Linux Firefox broken sound

 https://tqdev.com/2021-firefox-ubuntu-crackling-sound

 

 

Fix 1:

Go to about:config in Firefox and search for "media.webspeech.synth.enabled" and set it to "false" (double clicking on the entry should do it) then close Firefox. Don't forget to restart Firefox.

Fix 2:

It seems related to speech-dispatcher (some text-to-speech utility), so you can try:

killall speech-dispatcher

If the sound comes back to normal you can remove it completely (if you don't need it) with:

sudo apt remove speech-dispatcher

Don't forget to restart Firefox.

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

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...