LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Blogs
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.
Old

A much faster "du" alternative for the current folder (non-recursive)

Posted 06-17-2014 at 09:55 PM by the dsc (linux-related notes)
Updated 06-17-2014 at 10:21 PM by the dsc (grammar, "benchmarks")

Code:
find . -maxdepth 1 -printf %k"000\n" | awk '{  sum += $1 } END { print sum }' | numfmt --from=auto --to=iec-i
I was annoyed with the fact that "du", with whatever parameters I tried to get only the usage for the files on the root of the current folder (i. e., non-recursive), took ages to give the result, while the value comes comparatively instantaneously when you're browsing the folders on a file manager like Konqueror or some other, with that indication. I don't...
Member
Posted in Uncategorized
Views 157 Comments 0 the dsc is offline
Old

Bash conversion of Opera sessions to "netscape standard" bookmarks

Posted 06-11-2014 at 03:34 AM by the dsc (linux-related notes)

You run it on the session folder (.win files, usually on ~/.opera/sessions/), and it will generate a single html file with all the bookmarks (taken from the last visited URL for any given tab in that session, hence the file/variable "lasturl" -- the session files record some "history", but this isn't being exported/converted here), and coded "subfolders" for each session file, with the filenames as titles. Every time it runs it rewrites this generated html file....
Member
Posted in Uncategorized
Views 170 Comments 0 the dsc is offline
Old

Restore some of chrome/ium performance by ditching extensions

Posted 06-05-2014 at 08:42 PM by the dsc (linux-related notes)
Updated 06-05-2014 at 08:44 PM by the dsc

It may be obvious at hindsight but took me a while to try it.

Chrome/ium already has the advantage of being able to enable/disable extensions without restart, so it's really a good practice, compared with Firefox. You can sometimes enable an extension just while you're using it.

I think the particular extension that was causing most of the slowness was/is Tampermonkey, which is sort of a scriptish/greasemonkey for Chrome. I think that there may be some bug with it because...
Member
Posted in Uncategorized
Views 151 Comments 0 the dsc is offline
Old

Simple "at"-like script thingie to run other things at a given time

Posted 05-31-2014 at 01:00 PM by the dsc (linux-related notes)
Updated 05-31-2014 at 01:16 PM by the dsc (bad phrasing/grammar)
Tags lazyness

Code:
#!/bin/bash
now=$(date +%s)
then=$(date --date "$1" +%s)
sleep $((then-now))
I was just tired to try to figure the syntax and usage of "at", when I just wanted gxmessage to pop up to remind me of something.

Usage: "when 17:20 && gxmessage whatever or whatever you want to start at 17:20"

Change "when" to whatever name you wish to call it. Perhaps "by" is more grammatically...
Member
Posted in Uncategorized
Views 160 Comments 0 the dsc is offline
Old

Possible key mechanism to disable xscreensaver automatically when watching youtube and the like

Posted 05-29-2014 at 08:07 PM by the dsc (linux-related notes)

I haven't even tried it yet, it just looks like a good candidate method to mess with eventually:

Code:
top p $mplayer_pid -bd 0.25 n 3 | grep $mplayer_pid | awk '{print $9}'
I saw it here:
https://forums.gentoo.org/viewtopic-...4-start-0.html

That would give "larger than zero" numbers when mplayer is playing (I think Debian's/current "top" syntax is a little bit different and requires "b" and "d" separated,...
Member
Posted in Uncategorized
Views 137 Comments 0 the dsc is offline

  



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

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