LinuxQuestions.org
Register a domain and help support LQ
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

Bash quickie: loop N times, without doing math

Posted 10-22-2012 at 09:07 PM by the dsc (linux-related notes)
Updated 03-10-2013 at 12:25 AM by the dsc (improving, varible version)
Tags bash, loop

I thought that the only way to do such type of loop in Bash would require something like "n=$(($n+1))" within the loop, with the loop being conditioned to "n" adding up to whatever you want, such as "until ((n==30)) ; do". But you can actually do "for i in {1..20} ; do <whatever> ; done". That's somewhat similar to Basic's "for i=1 to 20 ; whatever ; next i".

But it won't work with variables for the starting and ending numbers....
Member
Posted in Uncategorized
Views 675 Comments 0 the dsc is offline
Old

Pure-text de-truncator script, a work in progress

Posted 09-30-2012 at 01:28 PM by the dsc (linux-related notes)
Updated 09-30-2012 at 01:32 PM by the dsc
Tags epub, pdf, sed, truncated

Sometimes I want to quote some PDF on pure text, luckily enough it would have actual text rather than being an non-OCRed image, but often there's still the problem that the text on the PDF is truncated/formatted in a fake/dumb way, with actual "new lines" to break the page, which may not make the text completely unreadable when pasted in a text editor, but it's reasonably annoying, and may require quite some time to fix manually.

I'm trying to create a script or one-liner...
Member
Posted in Uncategorized
Views 494 Comments 0 the dsc is offline
Old

Rant: what was wrong/"bad" with mplayer-gui/gmplayer?

Posted 09-03-2012 at 10:41 AM by the dsc (linux-related notes)
Tags mplayer, rant

I don't get it. It wasn't like it inspired someone to say that it's the GUI that one ever dreamed about, but was fully functional, and funnily enough more reliable than all the alternative GUIs that used mplayer as a back-end, as far as I've looked at. I guess the decision eventually resulted in a (current to me at least) problem with subtitles/fontconfig, as subtitles will work on mplayer and mplayer2, but not on gmplayer, even though it never used to be that way before.

It's not...
Member
Posted in Uncategorized
Views 458 Comments 0 the dsc is offline
Old

Three convenient customizations to firefox / iceweasel

Posted 07-14-2012 at 04:40 PM by the dsc (linux-related notes)
Updated 07-14-2012 at 04:46 PM by the dsc

Restore an old/previous session, but do not load the tabs right away: an end to the dilemma of empty session versus restoring tabs. Add to "about:config", if it's not already there:

Code:
browser.sessionstore.restore_on_demand
Set to "true", and it doesn't hurt to add also:


Code:
browser.sessionstore.max_concurrent_tabs
Set to 0. I guess it depends on the version or whatever, I don't care to find out. I wish I knew that...
Member
Posted in Uncategorized
Views 823 Comments 0 the dsc is offline
Old

Mplayer configuration tips

Posted 07-07-2012 at 01:50 AM by the dsc (linux-related notes)
Updated 02-09-2013 at 08:32 PM by the dsc (adding more content)

Setting the default volume for mplayer and gmplayer

Despite of having different config files, "config" and "gui.conf", this is one configuration that gmplayer inherits from "config", and will be ignored if set on "gui.conf", with the volume being reset to max and the line in the config file removed. That's one of those easter-eggs to give type As heart attacks. I think that's valid for Debian squeeze's gmplayer version, it may have changed afterward....
Member
Posted in Uncategorized
Views 808 Comments 0 the dsc is offline

  



All times are GMT -5. The time now is 01:12 PM.

Main Menu

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration