- Email: hdogan@vivaldi.net
- Resume: hdogan_resume.pdf
- Programmer Zone: Github, Stack Overflow
- Social Media: LinkedIn, Twitter
Contact
Slock OOM Killer
August 29, 2021
| By Haluk Dogan
Compiling slock from source needs further steps to make it work.
chown root ./slock
chmod u+s ./slock
Continue reading →
Changing MTU size for VPN
August 3, 2021
| By Haluk Dogan
I can't open some websites when I am connected to VPN. Default MTU size was 1500 when interface was up. In order to find the right MTU value, I tried following command:
ping -c 3 -M do -s 1300 stackoverflow.com
Continue reading →
Linux Font Rendering
July 19, 2021
| By Haluk Dogan
This is a great post for better font rendering in Linux.
# edit /etc/profile.d/freetype2.sh
export FREETYPE_PROPERTIES="truetype:interpreter-version=38"
cd /etc/fonts/conf.d
ln -s /usr/share/fontconfig/conf.default/10-hinting-slight.conf .
ln -s /usr/share/fontconfig/conf.avail/10-sub-pixel-rgb.conf .
ln -s /usr/share/fontconfig/conf.avail/11-lcdfilter-default.conf .
Continue reading →
Compiling GccEmacs
February 24, 2021
| By Haluk Dogan
I compile gccemacs from source.libgccjit
is required.
yay -S libgccjit
git clone git://git.savannah.gnu.org/emacs.git -b feature/native-comp
export LD="/usr/bin/ld.gold"
export CFLAGS="-g -flto -fuse-ld=gold"
export CXXFLAGS="-g -flto -fuse-ld=gold"
./autogen.sh
./configure \
--with-dbus \
--with-lcms2 \
--with-gif \
--with-jpeg \
--with-png \
--with-rsvg \
--with-xpm \
--with-tiff \
--with-xwidgets \
--with-x-toolkit=gtk3 \
--with-xft \
--without-xaw3d \
--with-cairo \
--with-xml2 \
--with-libotf \
--with-mailutils \
--with-json \
--with-gnutls \
--without-gconf \
--without-gsettings \
--with-sound=alsa \
--with-modules \
--with-native-compilation \
--enable-link-time-optimization \
--prefix=$HOME/.local/
make -j$(nproc)
Continue reading →
Show Only Matched Strings in a New Buffer
October 25, 2020
| By Haluk Dogan
(defun get-only-matched (query)
"Goto the beginning of the current buffer; perform the search and store the matched strings
Go back to the point of origin; create a new buffer; insert the matched strings into the new buffer
Switch to the new buffer; go to the beginning of the new buffer."
(interactive "sQuery:")
(let (matched-list)
(save-excursion
(goto-char (point-min))
(while (re-search-forward query nil t)
(push
(buffer-substring-no-properties (match-beginning 0) (match-end 0))
matched-list)))
(with-current-buffer (get-buffer-create "*MATCHED*")
(mapc
(lambda (matched)
(insert matched "\n"))
matched-list))
(switch-to-buffer (get-buffer "*MATCHED*"))
(goto-char (point-min))))
Continue reading →