- feh
- nomacs
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
%% get axes handles | |
ax_hdls = findobj(groot, 'type', 'axes'); | |
ax_1 = ax_hdls(1); | |
ax_2 = ax_hdls(2); | |
% set Y limits | |
set([ax_1, ax_2], 'YLim', pitch_range); | |
% plot | |
plot(ax_1, x, y); |
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
Keyword: cppreference.com | |
Link: https://en.cppreference.com/mwiki/index.php?title=Special:Search&search=%s |
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
#!/usr/bin/env bash | |
session='xx' | |
# check session exists | |
tmux has-session -t $session 2>/dev/null | |
if [ $? -eq 0 ]; then | |
read -p "tmux session [$session] already exists, kill it and reopen one? [Y/n]" -n 1 -r | |
echo | |
if [[ $REPLY =~ ^[Nn]$ ]]; then | |
echo "abort." |
Download fonts:
- nerd-fonts
- Sarasa-Gothic (中文)
Installation:
- Run
mkdir -p ~/.local/share/fonts
- Move font files or folders to
~/.local/share/fonts
- Reboot or run
fc-cache -fv
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
///@brief Object pool that manages objects with std::shared_ptr. | |
///@note The object will be reused only when it's released outside the pool. | |
template <typename T> | |
class SharedPtrObjectPool { | |
protected: | |
struct CalleeHelper { | |
}; | |
public: | |
using Ptr = std::shared_ptr<T>; |
ref:
- Install fcitx
sudo apt install fcitx
- Download sogoupinyin package from https://pinyin.sogou.com/linux/?r=pinyin
- Install sogoupinyin package. There might be some depends problem such as libopencc2, fcitx-libs etc. Install them with
sudo apt install -f
. - Create .xprofile in the HOME dir, contents:
GTK_IM_MODULE=fcitx
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
/// @brief String format from OpenCV | |
inline std::string format(const char* fmt, ...) | |
{ | |
std::vector<char> buf(1024); | |
while (true) { | |
va_list va; | |
va_start(va, fmt); | |
int bsize = static_cast<int>(buf.size()); | |
int len = std::vsnprintf(buf.data(), bsize, fmt, va); | |
va_end(va); |
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
<scheme name="QtCreator" version="142" parent_scheme="Default"> | |
<option name="FONT_SCALE" value="1.0" /> | |
<metaInfo> | |
<property name="created">2022-08-30T19:39:56</property> | |
<property name="ide">CLion</property> | |
<property name="ideVersion">2022.2.1.0.0</property> | |
<property name="modified">2022-08-30T19:40:01</property> | |
<property name="originalScheme">QtCreator</property> | |
</metaInfo> | |
<option name="CONSOLE_FONT_NAME" value="MesloLGLDZ NF" /> |
Ref: https://stackoverflow.com/a/16715419/8263383
ffmpeg -f lavfi -i anullsrc=r=44100:cl=mono -t <seconds> -q:a 9 -acodec libmp3lame out.mp3
NewerOlder