https://extensions.gnome.org/extension/5135/audio-selector/
Add aliases to long linux commands (Ubuntu 20.04 LTS)
1) nano ~/.bashrc
2) Add to the end:
alias cy="code . | yarn start"
alias cyd="code . | yarn dev"
alias gc='git add .; git status; git commit -am $@'
alias gs='git status'
Usage:
$ cy (run on folder to open vscode + start yarn server)
$ gc "message" (adds everything and makes a git commit with message)
Replace screenshot with flameshot (Ubuntu 20.04 LTS)
1) Install flameshot:
$ sudo apt install flameshot
2) Release the PrtScr binding:
$ gsettings set org.gnome.settings-daemon.plugins.media-keys screenshot '[]'
3) Add PrtScr Keyboard shortcut:
$ Go to Settings -> Keyboard and scroll to the end. Press + to create a custom shortcut.
Configure as: name="Print Screen with Flameshot", command="flameshot gui", shortchut="Print" (just press the PrtScr key)
Recursively count files of a given extension (mac/linux)
$ find . -name "*.c" | wc -l
Rails console crash on Model.connection
bin/spring stop
Add "Open in SublimeText" to Nautilus Folders (Ubuntu 14.04 LTS)
This is a quick method to add a Nautilus Action to open Folders with SublimeText:
Install SublimeText and find the command to open it by terminal (here is $/usr/bin/subl )
Install Nautilus Actions: $sudo apt-get install nautilus-actions
Open Nautilus Actions: $sudo nautilus-actions-config-tool
In Nautilus Actions, create a New Action (File>>New Action or CTRL+N)
..At "Action" tab, set Context Label to "Open in SublimeText"
..Check "Display Item in selection context menu" and "Display Item in location context menu"
..At "Command" tab set Label to default
..Set path to /usr/bin/subl (or your Sublime executable path)
..Set parameters to %b
..Set Working Directory to %d
..Save and quit Nautilus Actions
In the terminal type $sudo killall nautilus
Now you'll be able to open folders direct to SublimeText
Extra tip: avoid Sublime Text to re-open last files/folders
In Sublime Text go to Preferences >> Seetings - User
Add the following param to the file: "hot_exit": false, e.g:
{
"font_size": 9,
"hot_exit": false,
}
Adjust Screen Brightness for Ubuntu (14.04) Startup
$ sudo gedit /etc/default/grub
replace:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
with:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_backlight=vendor"
$ sudo update-grub
$ sudo reboot
Found in: http://askubuntu.com/questions/151651/brightness-is-reset-to-maximum-on-every-restart
Configuring Kile and Latex under Kubuntu 12.04 (Msc.)
sudo apt-get install kile
sudo apt-get install texlive-latex-extra
How to save an entire website with Wget - Linux
Update 2016: wget --mirror --convert-links --adjust-extension --page-requisites --no-parent http://ionicframework.com/docs
This is a very useful resource i found in http://www.linuxjournal.com/.
----------------------------------
If you ever need to download an entire Web site, perhaps for off-line viewing, wget can do the
job—for example:
--no-clobber: don't overwrite any existing files (used in case the download is interrupted and
resumed).
$ wget \ --recursive \ --no-clobber \ --page-requisites \ --html-extension \ --convert-links \ --restrict-file-names=windows \ --domains andresjesse.com \ --no-parent \ http://www.andresjesse.com/graduation/
This command downloads the Web site andresjesse.com/graduation
The options are:
--recursive: download the entire Web site.
--domains website.org: don't follow links outside website.org.
--no-parent: don't follow links outside the directory graduation/.
--page-requisites: get all the elements that compose the page (images, CSS and so on).
--html-extension: save files with the .html extension.
--convert-links: convert links so that they work locally, off-line.
--restrict-file-names=windows: modify filenames so that they will work in Windows as well.