Re: Post your handy self made command line utilities

My netbook (n280 asus eeepc 1005ha) is becoming old and too slow to browse the internet nowdays.The following would try to preserve battery life and giving it more speed by modifying FSB frequency (super hybrid engine) depending on the total cpu load.Unfortunately i was unable to find a way to "trigger" the change, so i ended up by polling the cpu load every 0.5 sec, which seems a good tradeoff, the following takes 0.3% cpu load, not bad.

It's affine day for a new sig:13XQLTXH?R%20GLVHDVB!1046210467104640201045B104731046F02010458104731045902010450104681045B1046910462104681046F02E0201045A10473104510201045810475020104780201046F1046A104510201046902010461104671045B1047202010458104671045102E

Re: Post your handy self made command line utilities

Re: Post your handy self made command line utilities

Yeah I know that now - as I said it was a learning exercise

It's affine day for a new sig:13XQLTXH?R%20GLVHDVB!1046210467104640201045B104731046F02010458104731045902010450104681045B1046910462104681046F02E0201045A10473104510201045810475020104780201046F1046A104510201046902010461104671045B1047202010458104671045102E

Re: Post your handy self made command line utilities

2 simple bash scripts to record TV streams. The first is manual start-stop, the second is a programmable DVR. These are for my U.S. ATSC over the air broadcast's, but can be modified for DVB-T,S,C. The scripts pause with a signal strength display so you can adjust your antenna position in case you are using a small portable antenna sitting by your computer. You must have a working tv tuner on your machine or they won't do anything. That means have the USB device plugged in with working firmware. They don't require X, gtk, qt, ncurses, python, java,....just bash.

Modify for your channels and broadcast type.To run the scripts, make them executable, launch them, follow the prompts.

Re: Post your handy self made command line utilities

Because I was not happy with the new “arch-wiki-docs” structure, created a way to get back the old situation, with 'index.html. I like the one file situation.

Since I run these on my own server(home), I decided to clean up anything I can't read.So I created this tool. The only thing you really need to change is 'path1', the rest should happen on it's own.The last 10 items in 'find' are not languages, but subjects like printer linguistics, etc. , since I can't read them, they're removed.

Re: Post your handy self made command line utilities

So following on from my last post I have massively updated my script. I followed the advice of Awebb to define variables in my script.

A lot has also changed since then. I now use an encrypted external hard drive which utilise BTRFS subvolumes. I also have a lot of script output going to my log. This is so I can discover which stage of the script it fails, if it does. It is also helpful to me when I add to or change the script. Some silly scripting errors which were hard to find, but were very easy to pin point after checking my log.

I know that I probably shouldn't of used so many '#' lines but I wanted to clearly seperate each function. I started getting too confused when I didn't include them and as I'm still trying to learn I wanted to keep it simple to read. I'm happy with the result and have tested the back-up many times. Especially when I was setting up encryption on my main laptop drive for the first time.

The $root_part and $home_part variable is left over from when I used seperate partitions and again from when I used an encrypted LVM. I could of just used $decrypt_path now that I'm using one partition and just BTRFS subvolumes but it seemed best to keep them in. I believe this script could be quite flexible, considering the amount of options and then parts are easily commented out to be disabled (e.g. Decryption can easily be turned off), although of course I have only tested my use case. I'm posting this because I'm actually proud of where this has come from and what I have learned. Hopefully I can do some more interesting scripts next.

Re: Post your handy self made command line utilities

Re: Post your handy self made command line utilities

jasonwryan wrote:

The shebang should be on the first line of your script...

I figured that since the rest was all '#' it wouldn't have any effect. Just read up on how a shebang works now, didn't know what it was called previously. I honestly just saw that other people included it when I had the previous version so included it myself and since my script always just worked I have never looked any further into it like I have with variables and functions since then. Feel quite silly now. Oh well, live and learn. Thanks a lot!

Re: Post your handy self made command line utilities

Don't know if someone's already written this, but I got tired of having to reload my terminal settings just to check out other people's terminal colors so I wrote an (ugly) bash script to preview color schemes without having to edit ~/.Xresources. It automatically restores your previous colors and works with both xdefaults and termite color formats.