Friday, December 16, 2016

Everything I learned about Linux, Mac OS X, and Hip Hop... In Whatever time period...1481372427

Let me start with an announcement. I am planning on recording another album, so you have that to look forward too. In preparation I wrote some command line tools for helping with that:
https://github.com/bsdpunk/hipHopTools

And at that point I was like why not try to roll those into a shell:

https://github.com/bsdpunk/hipHopShell
So that shell doesn't work that great right now, but maybe it will in the future. Or maybe I'm done with it I don't know.
I took a challenge to only use Safari for the past week. I only cheated twice. Once was because of a wireless issue I was trouble shooting and I wanted to eliminate the browser as an issue. The other was because I had some chrome saved password I wanted to use. So what did I think of Safari. Well...
There's no reason not to use it other than nitpick things. I don't like that it doesn't play webm's natively. It certainly takes less RAM than Chrome(my normal choice). It also seems to lend itself to managing your tabs better, as in I never had more than 9 or so open, as where with Chrome it can be in the 100s. I don't like the actual physical spacing of the tabs, I want the close tab button to stay in the same place, and I don't like the way the tabs can shift, those seem like terrible design errors on Apple's part. That being said the browser performed well, and I never had any issues in compatibility. Weirdly enough the better RAM performance has me eying firefox more. Like that makes sense or something.
In my efforts to keep track of my time usage, I wrote a bash function:
function snap () { ps aux | awk '{print $3,$4,$1,$2,$11}'| sort -rnk1,1 | grep -v '0.0 0.0' && echo bk && vm_stat && echo bk &&  osascript -e 'path to frontmost application as text' ; }

Just get's some information about the processes, memory usage and the current in focus window.

ps aux | awk '{print $3,$4,$1,$2,$11}'| sort -rnk1,1 | grep -v '0.0 0.0'

Get all processes. awk CPU%, MEM%, user, PID, and Location of Program, sort it, omit things not taking resources.

echo bk
Separate with a newline, two characters not naturally occurring in english, then a newline.

vm_stat
Get Memory info
echo bk
Separate with a newline, two characters not naturally occurring in english, then a newline.
osascript -e 'path to frontmost application as text'
Get the in focus window



You can get most of my one liners:
https://github.com/bsdpunk/one-liners

I wrote this function to grab videos off of websites, doing a recursive web crawl:
function wet () { wget -nc -c -r -A'*.flv' -A'*mp4' -A'*mkv' -A'*wmv' -A'*webm' -A'*.mpg' -A'*.mov' -A'.gif' -A'.jpg' -A'.wmv' $@ ;}
I think I had something else to write about but now I don't remember. So maybe another update soon.

No comments: