Skip to content

Instantly share code, notes, and snippets.

@fragoulis
Last active March 6, 2019 08:59
Show Gist options
  • Save fragoulis/9b81b80c063d5279310945ae06ff7a9b to your computer and use it in GitHub Desktop.
Save fragoulis/9b81b80c063d5279310945ae06ff7a9b to your computer and use it in GitHub Desktop.
Linux

Firewall

View which ports are open

iptables -vn -L

Guide to handle ports: https://phabricator.skroutz.gr/w/doc/uservm/

Screenshot

Will require you to select the capture area:

$ import ~/Pictures/screenshot.png

Sound control

$ pavucontrol

Monitor setup

To re-order the monitors:

$ xrandr --auto

Automatically change screen layout. Very usefull because it runs with initd before i3 setups.

$ autorandr

Image viewer

$ eog

Config

Mime type association

$ cat ~/.config/mimeapps.list 
[Default Applications]
x-scheme-handler/mailto=thunderbird.desktop
text/calendar=org.gnome.Calendar.desktop
text/csv=sublime_text.desktop
x-scheme-handler/http=firefox-esr.desktop
x-scheme-handler/https=firefox-esr.desktop
x-scheme-handler/ftp=firefox-esr.desktop
x-scheme-handler/chrome=firefox-esr.desktop
text/html=firefox-esr.desktop
application/x-extension-htm=firefox-esr.desktop
application/x-extension-html=firefox-esr.desktop
application/x-extension-shtml=firefox-esr.desktop
application/xhtml+xml=firefox-esr.desktop
application/x-extension-xhtml=firefox-esr.desktop
application/x-extension-xht=firefox-esr.desktop
application/x-subrip=sublime_text.desktop

[Added Associations]
application/pdf=google-chrome.desktop;
application/x-extension-htm=firefox-esr.desktop;
application/x-extension-html=firefox-esr.desktop;
application/x-extension-shtml=firefox-esr.desktop;
application/xhtml+xml=firefox-esr.desktop;
application/x-extension-xhtml=firefox-esr.desktop;
application/x-extension-xht=firefox-esr.desktop;
image/png=eog.desktop;display-im6.q16.desktop;pinta.desktop;
image/jpeg=eog.desktop;display-im6.q16.desktop;pinta.desktop;
text/calendar=org.gnome.Calendar.desktop;
text/html=firefox-esr.desktop;
x-scheme-handler/chrome=firefox-esr.desktop;
x-scheme-handler/mailto=thunderbird.desktop;
x-scheme-handler/http=firefox-esr.desktop;
x-scheme-handler/https=firefox-esr.desktop;
x-scheme-handler/ftp=firefox-esr.desktop;
application/x-subrip=sublime_text.desktop;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment