Tuesday, March 14, 2017

bsdpunk vim and command line forever

this is my favorite picture of me ever

Saturday, December 24, 2016

The command line, an 18 year obsession, Or the one where I doubt myself

Since my first introduction to linux in 1999, I have been obsessed with the command line. With shells, commands and the glue that binds them. As a secondary programming languages, that extend that functionality. It's taken me to some weird places, some side journeys that I had to go on just to get further, like text manipulation, regex, and the movement of data around a file structure, and filetype standards. I work in JSON, and CSVs now primarily. I've gotten to a point where now I'm much closer than doing data science than text manipulation, it might have been a round about way to get there but it still feels like despite the windy path, it was the correct one to take. Particularly when I work in R, which seems to be special fitted for data wrangling but somehow I still manage to get more done in less time with some simple bash one liners than I can from within an R workspace. With R, in the form of RStudio, I find myself working with GUI tools regularly for the first time in 17 years. I don't know if I like it. I don't know if this is the right course. Is this where I need to be aiming. Stats, Forecasting, and more importantly Machine Learning seems like the future. If not that then certainly the field of AI which is but a hop skip an a jump away. But am I, a lowly admin, who just happens to be good at the command line, at text manipulation, at regex, am I the one to pick up this mantle. It seems far fetched to think of myself as being able to do anything revolutionary or even productive in these fields when there are experts who have trained exclusively in them, and didn't end up there from some twisty side path. Some linux open source inspired secret garden that opened up to them.

The only thing I know for sure, is you should buy something from amazon so I can make some damn money. Whether it's the hands down best security book I ever read, or just pay for more prime:

Made a tool for encrypting keybase messages, with a little better workflow

My friend at necrux.com and myself made this tool to improve keybase workflow.

This week in self promotion 1482573936

Currently reading: Automate the Boring Stuff with Python: Practical Programming for Total Beginners ... And watching associated videos.

I wanted to pimp out my hiphopShell again now that it's more stable. I hope to have a song out from the new album before the end of the year. I'll post it here, and probably soundcloud as well. I started working with SuperCollider again today, to write some of the more electronic beats in the album. I might also take a gander at CSound again, not that I have particularly fond memories of it.

I have to get my hands on a new midi controller as well, just to complete the album, and I've been listening to a lot of Mac Lethal to inspire me.

Anyway enough Amazon linking except this final word from our sponser, BUY A DAMN AMAZON DOT:

I'm still hurting for cash, can you tell?

Mr. Robot FBI Wall Season 2 Finale [SPOILERS]

Thursday, December 22, 2016

MakeAmericaMesh.org The trip and money.

I'm still trying to come up with the money to complete my Make America Mesh trip. I'm going to shill a bit for amazon associates the next few days in blog posts, I'm going to keep them informative of course, but they will be heavily amazon linked...just like this one.

Again I am trying to do something good, and if there is something I could write about that you would want to pay for, let me know. Your money... I needz it... http://makeamericamesh.org/ Paypal me bsdpunk@gmail.com You can email me too...I'll answer that shit. (No money necessary)

You are so wrong Mr. Robot Easter Egg

Merry Christmas

Everyday Carry PenTest Edition

This is an everyday carry but not in my pockets, in my man-purse, or briefcase as some have taken to calling it. The "bag" in question being a Kenneth Cole Reaction briefcase.

Within that I keep an Apple MacBook Book Air Early 2014 with MacOS Sierra. You may think that's insufficient power but it has proven that the lack of weight and the SSD certainly compensate for anything to be desired. In fact the only thing I noticed after ditching my (Debian) Dell XPS, is that a lost a lot of weight but lost practically no computational power. And further Within is yet another small case, and within that is where the magic lies:

So the tools most notably in here are USB rubber ducky( for quickly injecting malware in hypothetical within reach machines), Yardstick One( for hypothetically jamming wireless signals within it's rating or hypothetically intercepting rolling encryption car fob door opens, and starts), usb SDR( for playing with Software Defined Radio, and not cell signals), Ubertooth(For bluetooth operations), a host of usb fobs, and that concludes one side of the bag.[Most of these can be purchased at Hak5] On the other side of the bag* I have various antennae for the aforementioned devices, an RFID card reader, some blank cards and keychains, and a set of door shims of varying thickness.

Within the briefcase I also have a black tie, because why not. And a mechanical keyboard. The keyboard may seem like overkill but your fingers will thank you, and with the weight loss from upgrading to the apple from the Dell, I don't notice the extra weight.

*Forgot the Turtle Lan Shell

For less potato, but more linux / hacking pics, check out my instagram.

Friday, December 16, 2016

Making Dialog Appear in Unity, Game Dev

I followed this tutorial for melee combat: https://www.youtube.com/watch?v=HzTceINFowY Then just adjusted it for dialog. Basically using the same code to initiate dialoge instead of damage. Adjusting the MaxDistance to something farther away. And changing Fire1, to Fire2. Script for reciever:
function thingCast() {

Script for Sender:

                var hitt : RaycastHit;

                if(Physics.Raycast (transform.position, transform.TransformDirection(Vector3.forward), hitt))
                Distance = hitt.distance;
                if(Distance > MaxDistance){
                hitt.transform.SendMessage("thingCast", SendMessageOptions.DontRequireReceiver);

Assign the actual Canvas object to canvasObject in the inspector.

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:

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

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.

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:

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.

Saturday, December 10, 2016

Ourobouros, I almost made a thing

Totally forgot to announce it here but I'm almost finished with a thing...Interestingly enough I just did a full reinstall on my drive so I lost the latest build...but not to worry, I'll just post a thing about how to grep your empty space on your hard drive next...to show how to recover lost files. DOH...WHY DIDN'T I VERSION CONTROL...THOUGHT I DID. DOH.

Friday, December 9, 2016

Reasons I Hate A Certain Hosting Company

I don't hate them for my uncermonious firing. I don't hate them for their customer service, which is actually quite good. I don't hate them because they aren't up to the gold standard of hosting, that is RackSpace (Another former employer of mine) which I hold to be a gold standard of what hosting should be. I have criticisms of their tech, and security. But I don't hate them for that.

I hate them because I met a long time 3 character name. Because of a 16 bytes in unicode-32. I hate them because of 128 bits of utf-32. A long time malvagerite(the irc network I founded, and love), who would have remained a name on the screen if I hadn't have taken my short meaningless commission at that company. The first time we met I was so worried about my stay in that big city. Were things going to turn out well(they wouldn't) would I live comfortably and be ok(I would, but only because of those 128 bits).

I was this weird neurotic outcast, coming into a clove of already clicked people at my work. I didn't really fit in, and I was an asshole about it. I snubbed my nose at them for their brown cherry mx switches("You don't love yourself"), and their acursed use of the nano editor. So of course everybody loved me...no.

But that first paycheck I came to the actual city and I met that, 128 characters. Sen, as he was known in our community would come to be my greatest ally in a world that seemed out to get me. He was loud. He was big. He would shout obscenities in Polish. He had a knack for saying the most vulgar things. He was my friend. When I walked with Sen, no matter which part of the bombed out ghetto, or nicities the city had to offer, I walked with a 10 foot tall bullet proof, body gaurd.

He could be quick to anger, he was scary, and he could blame you for misfortunes on a dime. Sure those weren't the most charming qualities...But he made up for all of that in both genorosity and loyalty. When I walked with Sen I had no one to fear. If I needed food, BAM fucking scrapple on the table, even if I wanted beer, I didn't even have to ask he would provide. If he saw me scrounging for quarters suddenly a dollar would appear.

In less than a month of being there, I lived in the same building as him. This was before his greater qualities shown through. We both took a risk. I wish now that I would have stayed. But I didn't. Sen is dead now.

Typing those words puts me in a state. I recently did a stint in the hospital for over a week, as in I got out today. I had time to think about things in a neutral enviroment. I didn't know how much his death affected me until reflecting over it, in pale clinical lights. With lots of alone time. With my recent projects I have been running non stop, without reflection. I miss Sen, and I feel an overwhelming misplaced hatred for a company who has essentially done no ill will. They let me go because my performance was poor, as any company would do. But at least I can hate them. At least I can pretend it's someone elses fault and not the cruelty of the world that took Sen. I miss you Sen. Malvager misses you Sen.

Tuesday, November 22, 2016

What's real sadness.

It's smoking butts from an ashtray, while cuddling under a blanket your dead grandma made you on the balcony, while you cry because your friend is dead. If you have 15 bucks, send it to https://www.facebook.com/malwina.bartulska.5?fref=ts [Malwina Bartulska] on facebook. If you have 20, send 15 to her, and 5 to me for makeamericamesh.org ( paypal.me/bsdpunk ). Or just send it all to her, that would for sure not hurt my feelings.Either way she could use some healing, and I need some money for my meshnet charity mission. But I'm not going to lie...the next 5 dollars I get goes towards a pack of fucking newports.

Thursday, November 3, 2016


I started working on a top secret project, involving Machine Learning, and predictive analysis.But because of the territory I have been doing a lot of graphing. Just a by product of learning R I guess. tinyLove, is doing well. I would like to state if I was starting over, I would start my R installation from this page:


Rather than just bulldozing ahead with brew. I've had a little bit of an issue with one of the more obscure package installs. And I feel like i wouldn't have had to go to the extreme effort, to get that package installed if I would have known about the above site. I do love the mac, I can't live without a tiling desktop however. So I have KWM and KHD installed:

https://github.com/koekeishiya/kwm https://github.com/koekeishiya/khd

KWM and KHD are mighty powerful. Also a tad more complicated that I would prefer. I miss the simple mod4+# to switch to a space. And I think if I had the will I could edit the config file to be that simple, but I wanted to get a feel for what I thought the designer was going for. And I really appreciate the depth in thought they went for.

Also this evening I was fucking around with Julia, which is a language in it's infancy. I wanted to do something simple but practicle with it, so I made a weather getter with it. One thing I noticed was my curl command picked up a different set of information than the Julia Requests library. I took a gamble that it was the User-Agent making all the difference, and that resetting it in the infant Julia would actually work. That payed off.

using Requests
import Requests: get

cat = get("http://wttr.in/nashville"; headers = Dict("User-Agent" => "curl/7.37.0"))
thedata = transcode(String,cat.data)


Thursday, September 22, 2016

Everything I have learned about Linux...errr Mac, since Wednesday 1474607836

So I saw this post today:
Long story short...I used linux for a year, here are my thoughts. As someone who uses linux as a Desktop daily, I never understand what the big deal is. Well, I bit the bullet and bot a Mac on Wednesday. Not because I don't love my trusted linux box, but because the laptop itself was a loaner, and being that I cashed out my 401k, to you know...stay alive, I figured I could use some of it to buy a lappie for myself. I got the cheapest offering, a year old air. so this is:
Everything I learned about using a mac since Wednesday
One thing I have noticed, is that I have sacrificed A WHOLE LOT OF WEIGHT. I don't know what the XPS I was using weighed, but I went from one extreme to the other, and with seemingly no performance cost. To be fair the XPS was several years old and I don't think I ever got a good graphics driver for it. But man this thing flies.
The only thing I am actually having trouble with is Desktop snapping and Window management, in the past I have used Ametheyst, but I have not yet installed it and remember that it wasn't the full flavored solotion I really wanted, so I shall try some new ones, and get back to you.
Also, I have been using brew for package management, and fuck yeah vim is at 8 in brew. Brew...you rock. So I'm going to continue to do these mac updates, with the things I learn.

Monday, August 29, 2016

Straight Crushing it

I want to talk about two companies, that are just straight killing it. Crushing it.

Nutanix is like if a country, that has won more gold medals than the rest of the world, had the largest military, sent a man to the moon, is the youngest kid on the block, and is straight taking it face to face with the largest empire ever created, because they don't want to pay taxes on a war they forced that country to be in.
I don't particularly have a lot of pride in America. But it’s hard to argue with results, and America has been straight crushes it for 200 years. Sure it was built off the backs of subjugated people. And having the ability to keep factories open, after bombing the shit out of the rest of the world. Then moving into the modern era by having more mathematicians on staff to just utterly dominate the information of the world and it's own people.
And Nutanix might be like that. I don't know, I don't really know much about the Nutanix culture or day-to-day affairs. I do know they offer great products, at prices more affordable, than VMware.
The Nutanix VMware rivalry is well documented.
And I wouldn't be raving about Nutanix if there wasn't a reason. The capabilities of Nutanix’s hardware blows everything out of the water. They offer a layer of hardware for SSD cache to alleviate the bottleneck that is IO.
Nutanix is eating VMware's lunch. VMware tried to silently creep in and be your only hypervisor, like some clandestine takeover of the data center. But Nutanix came to the door and said, "I'm better, and sometimes I'm even cheaper."
And why wouldn't you let them in. Nutanix is winning for the foreseeable future. Nutanix is more affordable. By all accounts Nutanix seems to be crazy good and has crazy resilient hardware.

Now to switch gears, paid hosting, the cloud...
The Cloud Saves money, we know this. Some of us don't understand how but it does, so I'll give you a brief intro. Once upon a time I worked at a small search engine. And we needed anywhere between 7 and 30 servers a day, depending on fluctuations. Clearly keeping that hardware on hand was not justifiable as it would typically be sitting dormant in a corner. Renting made fiscal sense and had the added benefit of moving the expense from Capex to Opex. Plus when you're in the cloud, for whatever reason, you just really find ways to squeeze the juice out of those servers. That's it. Economics lesson over.
Let's talk about Amazon. They're offering crazy innovations for goddamn pennies. Seriously look at the services Amazon is offering. Are you even trying other hosting companies? I checked...they aren't.
If brash Nutanix is America, then Amazon is Finland. Amazon's mature for a tech company, maybe not for a normal corporation, but practically old age for a tech company. Finland has the best education in the world, they score high on the happiness index, life is good. Okay, okay we heard some not so great things about their employees not having the best time not too long ago, fair enough. Finland's also practically Eastern Europe. I don't really know if there's actually anything wrong with Finland. I hear they drink a lot, but really that's the kind of quality that endears me to a nation. So whatever, just get past that. I'm pretty sure Amazon's engineers are happy. I mean you can't be straight disrupting the entire paradigm you’re working in, and not feel good. Look at the products Amazon put on the table....no really, fucking look...NO seriously, take a goddamn look. I'll wait:


But I want to talk about two services particularly and, they’re all fucking gems. I'm just choosing these two because they're on opposite ends of the spectrum. But they both do one crazy thing...they save you a fuckton of money.


Okay I'm going to offer you a service, where you just upload code, and you only pay for the compute you use. What do you think?
Are you kidding me with this shit, not only am I only paying for the compute I use, with the right Dev, I don't even need an infrastructure team. I just want to note as someone whose bread and butter is infrastructure, this was very rude of Amazon.

Machine Learning

Okay, so we’re just gonna go ahead and implement some advanced math algorithms for you...So your devs don't have to like know math and shit. Oh what do they do. THEY PREDICT THE GODDAMN FUTURE. But they're hard to implement, or they're something tricky right? No, just upload a CSV with accurate data about the past, and the better your data, the better the predictions. Alright, so what kind of price tag are you talking about on the magic robot that predicts the future? I mean that's got to be expensive right! Well I've used the magic robot, with ginormous CSV files. And it ran me about $4 USD (which I am totally good for Amazon, just having a little streak of unemployment, so that card is maxed out, but like un-suspend my account so I can get that sweet, sweet Alexis skill shirt, plz).
So who else in hosting/cloud has it together. Well let's look at Rackspace, they've got two decisions under their belt, that make them still worthwhile. In all fairness I used to work there and still have a certain fondness for them. Firstly they partnered with Amazon to offer a managed cloud product. And second, they eliminated services not core to their business (Cloud Sites), and they're buying themselves out of stock holder hands’...Presumably so they won't be beholden to stock holders and can be engaging in the kind of shit that Amazon's already doing.
And I have no more nice things to say about hosting so, if you work for some other hosting company, continue read on at your own peril. Companies like Linode, Digital Ocean, and Vultr can be great...for devs only. Or for doing a single box set up. Or even a few box set up. But some of these places you can't even virtualize on the boxes, so don't even think about ESXi, Xen, KVM, Docker, LXC, or any microservices. They all offer around the same comparable features, with maybe a $5 option extra...You know because who wants to spend $10 USD a month on the thing that runs your business…
Oh hey and did I mention that Amazon is straight up cheaper than these guys.
So to hosting companies everywhere I say, Get your shit together. Get all your shit, put it in a backpack, sell it at the shit store if you have to........
It's like reading a goddamned Ayn Rand novel; everyone else is so comically far behind these guys, it seems like there lack of progress is a sure sign of malicious intent.
Amazon and Nutanix are primarily doing one thing that others aren't. They're innovating. They're taking risks in their fields and the features they offer are unique, and strangely enough cheaper than the alternatives. So everybody else, get it together already.

P.S. Nutanix, if you want to send me something for my home lab, that would be wicked awesome(Yeah, fucking right). No but seriously something to wrap around my torso would be great.

Join me next time, when I tell you what I really think of Microsoft.

Sunday, August 28, 2016

Shit I learned about linux, in like, this morning and last night when I didn't sleep, and maybe other times, 147235608

I made my terrible bash script that counts language stuff from github completely automated. I also wrote like a real post, that I'm still proofing. I'm going to probably actually try to promote it, so there's that. This is a lot easier to work with now, though it still lacks any robustness, so one mistep and it's not going to work. Plus, right now it creates and deletes files, which is a horrible way to solve my goal but it was a quick way. So I assume if I have time I'll fix that in the future. I did go ahead and copy and paste a few lines of R so I can get a graph from it as well. https://github.com/bsdpunk/github-lang

Enter your github token, if you have one. Otherwise hit enter:

Enter which github user you would like to check percentages on: bsdpunk
Total LoC: 367611
AppleScript 696 0.189331%
Awk 539 0.146622%
Go 6761 1.83917%
JavaScript 8323 2.26408%
Perl 23081 6.27865%
PHP 20528 5.58416%
Python 302957 82.4124%
R 1926 0.523923%
Shell 2800 0.761675%
One of the things I learned today was that you can delete a line and as many lines after it with sed:
 sed '/true/,+1d'
So match true, delete the line it's on, and the one after it. The Rscript that makes the graph in my github piece is ridiculous simple. R is really just a pleasure to use. I miss doing the draft kings stuff with it.
locs <- read.csv('loc.csv', header=TRUE, sep=",")
title(main = commandArgs(TRUE)[1])
The bash script that does most the heavy lifting, is just a mess. I mean I've done some crappy one liners before, but this just feels bad. I guess I could clean it up. Here's a little php, to send an email:
php -r '$msg="tasty message";mail("someone@example.com","My subject",$msg);'
And how to force curl, to use a domain, that isn't assigned to an IP(in case you don't want to fuck with your host file):
curl --header "Host:domain.com"

Saturday, August 27, 2016

Everything I learned about linux in the last whosit, 1472336806

I use awk a lot. Like every day. I don't know much about it, how to use it, etc. I just know how to set the Field Seperator, which in my head I always called delimiter. Which is with the -F was confusing to me. So I guess that's what I used to know, that and fields. But I had to bite the bullet and write my first, real awk script. It's pretty bad you guys:

        FS = ":";
        total[count] = "";
        lang[count] = "";
        final = 0;
        #print lang[count];
        if (clang == lang[count] || lang[count]=="") {
           lang[count] = clang;
           total[count] += amount;
           final +=amount;
                #print final, lang[count];
        else {
         lang[count] = clang;
         total[count] = amount;        
        #print clang, total[count];

        print "Total LoC: " final;
        for(x in lang){
            percent = (total[x]/final)*100;
            print lang[x], total[x], percent "%";
        #print "Total Amount = $";
' file
So all of this is to find your total lines of code and what kind of code, on github by cycling through a cleaned up file of your languages. Now I have a lot of one liners I put in the readme.md, to clean up the stuff I grabbed from github, but let's be honest this project is a mess. I didn't really plan to get this deep into github bullshit today, but I did. The lack of planning shows. But if you want to check the mess out it's all posted on https://github.com/bsdpunk/github-lang So how did my totals come out... Well if you remove the forks and you take out the HTML and CSS:
Total LoC: 394684
AppleScript 696 0.176344%
Go 6761 1.71302%
JavaScript 8320 2.10802%
Perl 23081 5.84797%
PHP 20528 5.20112%
Python 332131 84.1511%
R 1805 0.457328%
Shell 1362 0.345086%
Not bad for all my public/open stuff I guess. Maybe it is, I don't know. I'm going to try to post something about PowerShell, and Linux, and Microsoft, and Opensource, soon, maybe. As like an opinion /slash/ neat tricks with PowerShell.

Thursday, August 25, 2016

Everything I learned about linux in the last whatever, 1471480803

So I opened a repo with oneliners here:
So some of the notable new stuff in that repo: Get all the repos of a user on github(replace bsdpunk):

http https://api.github.com/users/bsdpunk/repos |python -m json.tool| grep '"name"' | awk -F: '{print $2}' | tr -d \" | tr -d , > repo
Then use that list to backup all your projects(replace bsdpunk):
 for i in $(cat repos); do git clone https://github.com/bsdpunk/$i; done
Your mileage may vary. I also forked Troy Engel's github repo called scripts, which has a bunch of useful bash stuff. Troy's the sharpest guy I never met at RackSpace, if that makes any sense. Well I also never met Major Hayden so maybe not. Seriously, take a minute and read through Major's blog.

Wednesday, August 17, 2016

Shit I learned about linux, in the last whatever, 1471359085

The new version of dd has a progress flag, I know whenever I use rsync I always use capital P flag. But since the dd progress thing is a relatively new edition and I was never that big into using the pv command, I tend to use another trick which is to send a signal with kill, not an actual kill signal but the USR1 signal with is a user defined signal, IE defined in the dd code itself. I could do a ps find it's pid and then kill -USR1 pid, but I wrote a couple aliases in my .bashrc:

alias findd="ps aux | grep dd | grep 'if='"
alias dprog='for i in $(findd |awk "{print $2}");do sudo kill -USR1 ;done'
Another thing I do is use command substitution to name files for my blog, so when I want to make one of these kinds of posts for example the command I use to get started is:
dusty@xor:~$ vim $(perl -e 'print(time())')_linux
dusty@xor:~$ ls blog/
Or in my .bashrc:
alias vimblog='vim $(perl -e "print(time())")_linux'
As you guys know I prefer using httpie to curl, so when I was messing with the github api in just bash, this is how I got the number of stars for a repo, where bsdpunk is your user and trash is your repo:
dusty@xor:~$ http https://api.github.com/repos/bsdpunk/trash/stargazers | python -m json.tool | grep login | wc -l
Also new i3 setup:

Monday, August 8, 2016

Shell lovin' fool

        I am a shell lovin' fool. No..really. I love shells. I love playing with new ones, and I have   strong opinions on the ones I have tried. Don't get me started on zsh, or when the appropriate time to  use 'set -o vi' is. I think tab completion is about the most awesome thing ever created.
        It's easy if you know me, to know this about me. My github is a mess of shells that never even  made it to an alpha release. Right now I am committed to finishing two that I think are actually useful. I currently am working on one in python, called trash, and a second that has some networking   tools integrated called beastietools(GoLang).
        Why make shells? Particularly, why make shells that are API, or a set of related APIs specific? It's all about interface. I'm sure plenty of normies love their clickety clicks, but I don't. I use a   tiling desktop, and have for a long while. I started with awesomewm, or ratpoision or something, and    now I use i3. It's not a ricer thing at all either. My i3, is nearly a standard install with slight     modifications. I give no shits about aesthetics. I mean look at this blog. My vimrc is more heavily     modified than my i3 config. You could make a bunch of aliases, sure. But there's more than one problem  with that. All those curl or httpie commands become way to difficult to manage, even if you are using an import in the .bashrc file, to separate the commands.
        Another thing with aliases, is I see a lot of people using them in such a way it hinders, rather than aids. As a sys admin or a dev, you need to create your aliases in such a way that the compliment the commands you would already use. If you're in the scenario of jumping from box to box, you are going to be tangling yourself up in commands that don't exist. I'll expand more on the philosophical way to execute aliases in a future post.
        With trash I have gotten to an alpha release. I invite you to take a look at my alpha, and be critical. I want any constructive idea you want me to add, remove, or change.

Friday, August 5, 2016

I made a new shell! Trash!

I made a shell, it's kind of garbage. Just check it out though:


Friday, February 19, 2016

Everything I learned about linux and other shit, in the last two weeks.

I've moved for a job, three times in my life. The most recently being two weeks ago. Loneliness is a huge issue. I'm the worst kind of introvert. The one     that needs attention now and again. Besides developing the worst OKCupid strategey ever, I have done very little to combat this. To quote Charle's Bukowski,  "You get so alone at times that it just makes sense".

I know I haven't posted a lot in the last two weeks, I'm still settling in.  I updated linosh. I'm going to use it to make an auto-scaling tool for Linode.

I'm almost done with a let's get weird post, and I might post my terrible OKCupid strategy.

Some one liners for you, I've used at home and during work in the past two weeks:

Total Ram:
free -m | grep "Mem:" | grep -o -P "Mem:\s+\d+" | grep -o -P "\d+"
cat /proc/meminfo | grep MemTotal | awk '{print $2}'

Available Ram:
free -m | grep "buffers/" | awk -F"[:space:]+" '{print $5}' | grep -o -P "\d+$"
cat /proc/meminfo | grep MemAvailable | awk '{print $2}'

Kill steam mac:

kill -9 $(ps aux |grep team |awk '{print $2}')

Check for github on /r/linuxadmin/new

clear;while true; do curl https://www.reddit.com/r/linuxadmin/new/ |perl -ne'print"$1\n\n"if/(github)/'; sleep 180; done;

Thursday, February 11, 2016

Happy Valentine's Day Malvager

Happy VD ay. Ircislove ircislyf.

Friday, February 5, 2016

Three Reasons we already live in a cyberpunk reality

We are living in the end times. I swear it, and right before the cusp of the end is the dumpy little mess of cyberpunk. And we're here for it, right now. Hold on to your decks this is going to be a deep shadow run.

Cyberpunk Food anyone?

And I'm not talking about Chinese takeout and pizza. You can grow your own larvae to eat with farm 432.

Farm 432 enables people to become independent from the system of current meat production by growing their own protein source at home. After 432 hours, 1 gram of black soldier fly eggs turn into 2.4 kilogram of larvae protein, larvae that self-harvest and fall clean and ready to eat into a harvest bucket.  Black soldier fly adults don´t eat, therefore they don´t have any mouth parts and do not transmit any disease. The larvae can be fed on bio waste, therefore the production almost costs no water or CO2. Black soldier fly larvae are one of the most efficient protein converters in insects, containing up to 42% of protein (dried), a lot of calcium and amino acids.

There's also soylent which is a sort of "shake", that you drink and can be used as an all purpose meal replacement. Just two soylent shakes a day and your good to go. Cause fuck the joy of eating. I mean don't you consider eating inconvenient. I know I do, it takes forever to grow them damn fly's for a fucking meal.


We can now hack cars that are in motion. We also have cars that drive themselves. And Elon Musk has taken it upon himself to build a tube train not all that dissimiliar from tube travel in the Jetsons.


Tattoos that are made of electronics...or electronics that are made of tattoos. Thank you Chatoic Moon, I can't wait to have a bitcoin wallet tatted on my hand. Just call me Jesse James.

Also biohacking is a fucking thing now.

The end is nigh, but we can ride this cyberpunk dystopian future all the way to the edge, and hope the fall is thrilling. So you know what you should do? Take a hacked self driving car, to the hyperloop and head toward the coast you want to see the world end on. Turn the lights down, switch Johnny Mnemonic on, your infinite channel machine, and make a big spread of flies, soylent, have a drone from amazon bring the popcorn.

Oh yeah, and that one overarching theme of cyberpunk I missed. Corporations already own us.

Everything I learned in the past 24 hours about linux 1454703438

Convert all m4a files into mp3's in a directory:

IFS=$(echo -en "\n\b");for i in *.m4a; do name=`echo $i | cut -d'.' -f1`; echo $name; ffmpeg -i $i $name.mp3;   done

@nayafia at medium.com has been blogging about open source infrastructure projects and the posts so far have been interesting.

I added these to my .bashrc:
alias volumedown='amixer -D pulse sset Master 5%-'
alias volumeup='amixer -D pulse sset Master 5%+'

For reducing and increasing the volume.

Choosing a mechanical keyboard

Start at Geek Hack, those guys know everything about keyboards.  Get familiar with the switches, I used this site to start with.

I started with what I imagine is a lot of people's starter mechanical keyboard, which is the das keyboard. I knew I would like the feel, and there was a mac version which was nice for me at the time. It was an easy decision to make. I wanted to get another one after that and I justified as, well one that has ctrl instead of cmd. Like you can't goddamn keymap it in linux or something.

I like clear switches for an office enviroment, they still give you the satisfaction of a tactile punch but they're a little more silent. But like a big goddamn jerk I got green switches in my current mechanical keyboard, cause fuck it I want to godzilla them keys. I really like the one I picked out, although now I wish I would have went with my original thought and got the ten keyless without function keys and arrows. I'll probably get one when I can afford it. I might actually go with clear switches next time. Actually, I'm about 95% certain I'm going to get a tenkeyless with topres. Who knows though. I love mechanical keyboards, and I think it's probably like wine tasting, as much as we want something to be objective, it's a subjective game. And some people just love Franzia.