tail + grep (+ awk)

tail -f /var/log/apache2/error.log | grep –line-buffered mod_rewritetail -f /var/log/apache2/error.log | grep –line-buffered mod_rewrite with awk: tail -f /var/log/messages | grep –line-buffered auth | stdbuf -o0 awk -F" " ‘{print $2}’tail -f /var/log/messages | grep –line-buffered auth | stdbuf -o0 awk -F" " ‘{print $2}’

i3, floating windows default size

for_window [class="Eclipse" title="Preferences "] floating enable; for_window [class="Eclipse" title="Preferences "] resize set 980 680;for_window [class="Eclipse" title="Preferences "] floating enable; for_window [class="Eclipse" title="Preferences "] resize set 980 680;

Sublime Text 3: Linux sidebar and tabs fonts

$ vim ~/.config/sublime-text-3/Packages/User/Default.sublime-theme   [ … { "class": "sidebar_label", "color": [0, 0, 0], "font.bold": false, "font.size": 15, "font.face": "Open Sans" }, { "class": "tab_label", "font.size": 15, "font.face": "Arial" } ]$ vim ~/.config/sublime-text-3/Packages/User/Default.sublime-theme [ … { "class": "sidebar_label", "color": [0, 0, 0], "font.bold": false, "font.size": 15, "font.face": "Open Sans" }, { "class": "tab_label", "font.size": 15, "font.face": Read more about Sublime Text 3: Linux sidebar and tabs fonts[…]

gtk2 + gtk3 fonts change

~/.gtkrc-2.0   gtk-font-name="Open Sans 10"~/.gtkrc-2.0 gtk-font-name="Open Sans 10" ~/.config/gtk-3.0/settings.ini   [Settings] gtk-font-name = Open Sans 10~/.config/gtk-3.0/settings.ini [Settings] gtk-font-name = Open Sans 10 Soft for changing themes: gtk-chtheme, gtk-theme-switch

Resize images massively

Resize all images in current directory to 600px height: for i in *; do mogrify -verbose -resize x600 “$i” ; done Resize all images (*.jpeg, *.jpg, *.JPG) in current directory and subdirectories to 800px height: find -type f -iregex ‘\(.*\.jpeg\)\|\(.*\.jpg\)\|\(.*\.JPG\)’|xargs mogrify -verbose -resize x800

find & grep

Find ‘text to find‘ in *.xml files case-insensitive Method 1: grep -ir –include \*.xml ‘text to find’grep -ir –include \*.xml ‘text to find’ Method 2: find -name ‘*.xml’ -exec grep -i ‘text to find’ {} \;find -name ‘*.xml’ -exec grep -i ‘text to find’ {} \;