Skip to content

Instantly share code, notes, and snippets.

View benishor's full-sized avatar

Adrian Scripcă benishor

View GitHub Profile
@benishor
benishor / locale-demo.cpp
Created April 13, 2023 10:40
Using custom locale for number formatting in C++
#include <iostream>
#include <locale>
class comma_numpunct : public std::numpunct<char> {
virtual char do_decimal_point() const {
return ',';
}
virtual char do_thousands_sep() const {
return '.';
@benishor
benishor / fonts-install-noto.sh
Created October 7, 2016 06:47
Installs google noto fonts for all users
# acquire fonts
cd ~/Downloads
wget https://noto-website.storage.googleapis.com/pkgs/Noto-hinted.zip
unzip Noto-hinted.zip
cd Noto-hinted
# install for all users
sudo mkdir /usr/share/fonts/opentype/noto
sudo cp *.otf *.otc /usr/share/fonts/opentype/noto/
sudo fc-cache -f -v
@benishor
benishor / fonts-install-meslo.sh
Created October 7, 2016 06:44
Installs meslo fonts for all users of the system
# acquire fonts
cd ~/Downloads
wget https://github.com/andreberg/Meslo-Font/raw/master/dist/v1.2.1/Meslo%20LG%20DZ%20v1.2.1.zip
unzip Meslo\ LG\ DZ\ v1.2.1.zip
cd Meslo\ LG\ DZ\ v1.2.1
# install for all users
sudo mkdir /usr/share/fonts/truetype/meslo
sudo cp *.ttf /usr/share/fonts/truetype/meslo/
sudo fc-cache -f -v