LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Blogs > linux-related notes
User Name
Password

Notices


Just annotations of little "how to's", so I know I can find how to do something I've already done when I need to do it again, in case I don't remember anymore, which is not unlikely. Hopefully they can be useful to others, but I can't guarantee that it will work, or that it won't even make things worse.
Uncategorized Entries with no category
Old

Scary massive Debian-testing upgrade went well, it seems

Posted 11-12-2015 at 04:52 PM by the dsc (linux-related notes)

Probably the largest upgrade I've done so far, at least in the last five years or so. Most individual upgradeable packages, if selected individually, would require uninstalling half of the system. But "mark all upgrades" on synaptic in contrast required uninstalling just a few obscure packages, seemingly not affecting anything I use often. There were a few bugged packages, but the bugs didn't seem to apply to me, so I upgraded them anyway, as there was no choice.

But the...
Member
Posted in Uncategorized
Views 1612 Comments 0 the dsc is offline
Old

Terminal with similar keybindings to kwrite / kate / gedit / html text fields?

Posted 10-06-2015 at 10:04 PM by the dsc (linux-related notes)
Updated 01-13-2016 at 06:02 AM by the dsc (alternative solution)

EDIT: As it turns out, it's not really needed.

With control+x+e your current command line will be opened with the $EDITOR application. From there you edit freely, then you save it, and as you exit, it will run.

http://www.commandlinefu.com/command...to-text-editor

I think the text editor Nedit is an excellent $EDITOR to have for that. It uses the tcl/tk toolkit (or actually motiff, if it's not the same thing),...
Member
Posted in Uncategorized
Views 1285 Comments 0 the dsc is offline
Old

Google reverse image search from command line/Geeqie/etc with python and shell scripts

Posted 10-04-2015 at 01:43 AM by the dsc (linux-related notes)
Updated 10-04-2015 at 02:42 AM by the dsc

There's another method which consists in uploading the image from your computer in some free host and then giving this URL to google via command line, but it's kind of a scumbag-ish thing to do, I think.

Based on/essentially identical to the first answer to a question in stack overflow:

Code:
#!/usr/bin/env python
# WARNING: I DON'T KNOW PYTHON AT ALL, THIS MAY BE GRUESOME AND IDIOTIC
import sys
filePath = sys.argv[-1]

import requests
...
Member
Posted in Uncategorized
Views 1497 Comments 0 the dsc is offline
Old

Semi-auto-generated, nicely formatted, apropos-like list of your custom bash functions

Posted 10-01-2015 at 01:35 AM by the dsc (linux-related notes)

Code:
bold=$(tput bold)
normal=$(tput sgr0)

lsfunctions ()
{
tail -n+10 /path/to/custom-bash-functions | grep "()" | sort | sed 's|(.*#||'  | sed "s|^|${bold}|;s|\ |${normal}\ |"
}
↑ Change the number "10" to whichever line you want to start grepping the functions

"lsfunctions" would be like "apropos /usr/bin/*", or whatever really works, but restricted to your custom...
Member
Posted in Uncategorized
Views 1012 Comments 0 the dsc is offline
Old

Collection of random small tricks

Posted 09-26-2015 at 09:40 PM by the dsc (linux-related notes)
Updated 04-30-2016 at 01:45 PM by the dsc (recycling)

☻☻☻ Pipeing youtube-dl output to a given player (and having it as a mini-script)

Code:
youtube-dl -f ${2:-5} $1 -q -o - | mpv -
The first parameter is the youtube url, for a single video, and the second, optional, the quality code, like "best", "worst", or a given number. The default there (5) is the 240p flv.

Just "mpv youtube-URL" was supposed to work, but isn't working right now for me. It says the youtube-dl version is old,...
Member
Posted in Uncategorized
Views 1591 Comments 4 the dsc is offline

  



All times are GMT -5. The time now is 07:45 AM.

Main Menu
Advertisement
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration