What tools have you written to automate your work/life?

Share

Other urls found in this thread:

es-cluster.example.com/.kibana/index-pattern/_search?_source_include=**_id,**.timeFieldName
wikipedia.com
google.com
0bin.net/paste/TL4bk53BIlBJnyL5#h4JlwfL6t dVFGIO-RwRDT0hX19 u/OdrpQa3Qf2lE
twitter.com/NSFWRedditImage

am i an autist for not wanting to work at a place like that?

Tons of VBA macros because Excel is the only "development environment" I can really use at work. Our metrics are scattered over ten different dashboards and it's a pain to keep them all open. This way I can pull all the data together and chart it for quick checkups.

I also use a lot of text expansion. If I need to type the same thing more than two or three times, I'll save it and start plopping it in with a keyword instead.

This is the only bit of code that I've written that half-fits the criterion:
#include
#include
#include

/*Simple drag 'n' drop C/C++/Java compiler caller*/

int main(int argc, char **argv){
if(argc==1){
printf("\nNo file given.\n");
return 0;
}

if(argc>2){
printf("\nWhat are you even trying to do.\n");
printf("Assuming first argument is the intended file.\n");
}

if(strrchr(argv[1],'.')==NULL){
printf("\nUnrecognised file type.\n");
return 0;
}

unsigned int i, outputSize = 2 * (strlen(argv[1]) + 14) * sizeof(char);
char *fileName = (char *)malloc((strlen(argv[1]) + 1) * sizeof(char));
char *output = (char *)malloc(outputSize);

strcpy(fileName,
(strrchr(argv[1],'\\')==NULL
? argv[1]
: strrchr(argv[1],'\\')+1
)
);
char *fileExtension = strrchr(fileName,'.')+1;

//for(i=0; (fileExtension[i]

So instead of writing a 10-line Makefile, you write that mess? Wow.

I wrote an okc profile crawler to automatically make people think I visited their profiles

but that was a long while ago

now I'm just alone

Yes, exactly.
Also, it can't link libraries for me.
Because I've only figured out how to link one library so far.

Automatic caps on every email / chat message

if that's one or two video-calls a week, you gotta deal
if it's daily routine you're having too many managers and too few real employees

No, who would want to hang out with retards that buy Apple?

I'm no programmer but I made autohotkey scripts for my 4 media keys.

1= Writes my full name/signature
Alt-1= Writes my email
2 = cuts current textbox content and replaces it with all lowercase version (for when I type a lot without realizing I have caps lock on
Alt-2 = same as 2 but replaces with all caps
3 = Spam left click while holding, very useful for many games
4= open music folder (although I don't use that one that much so I could find something better)

No. People are shit at multitasking and find it a lot easier to concentrate when they have some semblance of their own space.

I inherited a fellow developers python scripts that deployed a web app from build server to a VM.
I extended it to spin off a new VM, deploy app + dB, load data backup, alert test team that a new test environment is ready for validation.

All python and some powershell to provision the VM.

VBA is what gave me a raise at my job, but since we upgraded to Office 2016 I'm finding Power Query to do most of the scripts I have on VBA more elegantly. Power Query and Power Pivot has so much insane potential

Sup Forums image downloader.

I was secretly writing unit tests for my code to have less tedious debugging in the future but I didn't keep them in git so nobody at work knew I was doing it.

I wrote a python script to grab information off of excel files generated from a testing machine (upwards of thousands that they wanted some guy to manually type into a single spreadsheet)

Mostly bash/batch scripts that interact with various command line tools.
Also a thing that takes an image with a ton of non contiguous images and separates them.

I made a python script to grap sales data from ebay with the given input of the item, max and min price, image link, item link and date listed.

This information is then output into a .csv file that is formatted to list all respective items and their data in the rows. Saved me a lot of time of browsing ebay.

Next step is to make it dynamic so it incorporates some kind of altert system. Any further ideas are welcome.

I wrote a Python script to download audio from YT and costumize the tags right away.

Im sorry user, I work for ebay and Im sorry to tell you that you must cease and desist in dveloping such application

No, fuck that. I can't believe how many companies are putting people in these types of environments and expecting them them to be productive. I guess it's because it's cheap, and they're hiring a bunch of manchildren and SJW's that want to pretend they never left college.

I was pissed when I didn't get my own office at my new job. $15k/year raise but I went from a private office to a desk in a room with a bunch of other desks. Next career move I'm shooting for a 50% remote work at least.

- bunch of rake tasks for management and junk of elasticsearch clusters at work so I don't have to use ripgrep anymore
- wrote snapshot auditing tool for es clusters so i don't have to check the backups myself anymore
- wrote something to automate the process of rollover at a specific doc size to match a [x] gigabytes per shard for all rollover aliases on a es cluster, it also creates the kibana index-pattern on both the cluster's kibana instances, and then the cross cluster search kibana instance so people can just send data, and poof, it shows up and it gets automatically rolled
- wrote something small to refresh kibana index patterns so people don't ask us why a field doesn't show up yet (has some issues, will have to look into it)

gonna open source a lot of this actually which will be cool

a sleek TK GUI with embedded matplotlib graph to sort my finances

Trying to work out how to get aqbanking running so i can automate fetching my statements.

import os
from os.path import isfile, join
import shutil

cwd = os.getcwd()
files = [ f for f in os.listdir(cwd) if isfile(join(cwd,f)) ]

artists = []
artistscount = []
splitter = ' - '

for file in files:
artist = file.split(splitter)[0].lower().title()
if (artist not in artists):
artists.append(artist)
artistscount.append(1)
else: artistscount[artists.index(artist)] += 1

treshold = 5

for file in files:
artist = file.split(splitter)[0].lower().title()
if (artistscount[artists.index(artist)] > treshold ):
artistdir = join(cwd,artist)
if not os.path.exists(artistdir):
os.mkdir(artistdir)
shutil.move(file, join(artistdir, file))


Organize your music library by putting all songs from the same artist in a separate folder, but only if there are at least X songs by that artist

>wrote something small to refresh kibana index patterns
I only recently started working with ELK and so far my solution for this was to kill and recreate the kibana docker container. With only a few MB data so far its a viable solution, but i assume yours scales better

It does as it queries ES itself in the .kibana index under the index-pattern type for all _ids (which are coincidentally the index pattern names) and sends an identical POST request that Kibana submits when you hit refresh within the management area.

Think something like scrolling over es-cluster.example.com/.kibana/index-pattern/_search?_source_include=**_id,**.timeFieldName
(sorta kinda right, i'm going off my memory atm)

This works great as we have ~500+ (and growing) index patterns which constantly get new fields, the problem that we found it is occasionally a manually made new index pattern for some reason gets removed somehow. Which is odd as I submit absolutely no DELETE requests at all, only POST requests by hand and GET. Even more weird is with the tool's debug output on it lists all index patterns is sees first before it starts submitting requests and the single manually made index pattern (that wasn't made by one of the aforementioned tools) is mysteriously absent, very odd. Don't have time to look into it right now.

The other major problem that I'm not sure yet how to tackle (though might just have to introduce something like redis or what have you into the mix) is how to compare states of a previous version of the index vs the new so we can store scripted fields, manual format adjustments, etc. The latter of which are annoying as they affect the state's field itself in the pattern's blob, they don't show as a new set of values I can look for, like scripted fields (which are only ever manually made).

>I only recently started working with ELK and so far my solution for this was to kill and recreate the kibana docker container. With only a few MB data so far its a viable solution, but i assume yours scales better
I'm not sure how this works as kibana shouldn't refresh patterns automatically at all, it'll keep the state a pattern and only show the differences beyond that state.

FYI if you're using Python, just use Path from pathlib (part of stdlib), it's way easier and better.

Also the way you're structuring your if/else conditionals hurts me internally.

meant to say, "if you're using Python 3"

deterministic password manager

fuck that gives me an idea.
>create a bot to automatically change the password for all accounts provided every 10 minutes or so.
>have it store the current password in an encrypted file that only it can read
>have it read and write from said file so that i can log in and out of accounts without the passwords ever being known.

I realize there are security flaws with this but it would make the hassle of constantly changing passwords less of an ass.

>be mathfag
>write program that generates Cayley tables, finds cosets, lists group properties, et cetera
>well, I have to define the operation and how the elements should be displayed
>but seriously, it means I can do stuff in seconds with my laptop while the plebs around me spend ages scratching away with pen and paper
>also automated a lot of stats stuff, though that was pretty much a waste of time because R does it already

the whole point is to never have to store the password anywhere, it's based on the master password so it's technically stored algorithmically

pretty much this, I have shell script to provide link, and will download all images in the thread.

I'm a bit dense right now, the point of this is to just have a master password, and have the hash function change it based on the domain?
If so, its a cool idea, but its a bit of 'security through obscurity'.

well the whole idea of a password to begin with is 'security through obscurity' if you think about it. this is just an easy way to get big long garbled strings unique to each domain without having to remember anything but one password

I wrote a python script to automate the startup, shutdown, and status checks of virtual servers in the testing lab I built.

It's pretty nifty. Not the biggest craziest project ever but it's certainly the most useful thing I've built so far.

no, you're not. its just the new wave of sjw's that are purely driven by muh feels and want #inclusion. we must #allcometogether and #worktogetherasone

you are aware that this is a picture of a meeting right

all have mac book , i feel soo poor:(

don't forget muh #nowalls ;^)

I have a ton of scripts set up like this: that are mapped to a custom one hand keyboard

^j::
Send ^c
Run, wikipedia.com
sleep 800
Send ^v
Send {return}
Return


^k::
Send ^c
Run, google.com
sleep 800
Send ^v
Send {return}
Return


^4::
Send ^c
Run, google.com
sleep 800
Send Define:
Send ^v
Send {return}
Return


^i::
Send {delete}
Sleep 100
Send {y}
Return

ahk macros for everything

wrote a python script that takes a cryptocurrency name as an argument and returns its current value and some price change percentages
its actually pajeet tier shit bc i wrote it in a few hours when i was bored and too lazy to look up documentation to properly parse json input

why is copy + paste insecure

well generally any application has access to the clipboard

Exactly this. My boss gave me a raise when I did a macro that send individualized emails to each supervisor. Little she knew that I just copy/pasted ron's macro and put it inside a loop

>gcc prog.c -o prog
`make prog` does that, dont even need a makefile.

I wrote one of those too. It even kept a file of visited profiles to prevent creepy repeat visits.

just made a Sup Forums file scraper because of that other thread. useful for reaction threads and stuff

Im a trainee estimator and day in day out im looking at floor plans and entering the needed information into v6. I was wondering if there was a way for me to create a program that could scan the needed infortion from a pdf file and auto input? I fleshed out the idea more and have about 3-6 pages so far on how it would operate but really have no programming skills or knowledge which makes me question if it's even possible to be made. Potentially i guess i could go from spending 40 minutes on a quote to 5 which will keep customers happy and leave me with spare time to help others around the office.

Any idea where i would start to make something such as this?

a pdf to txt converter.
if the output is consistent you could use sed or other things to extract out all the information you need.

REEEEEEEE STOP TRYING TO SNIPE MY DANKPADS

I work in that place. You're not.

>work
fuck off normie

Ledger CLI or bust m8

The pdf's are a scan of the floorplan it self so i need it to recognize certain parts of the scan and what product code to use. Depending on the customer there is a set of standard specs for the product that I'd need to change.

To explain as quick as possible id need it to identify, determine what product code to use, key in the product code, add standard specs for customer, move onto next item repeat till complete. Each quote ends with the same three product codes.

But how would i be able to make such a thing and how exactly would it communicate with the program we use at work "V6"
I could elaborate as to how i see it working but don't want to write a book in this thread to annoy.

Did the same shit with OpenOffice ... actually just wanted to post the pic.

>treshold

I have a couple vba scripts to help format my spreadsheets quicker bound to hotkeys. I can't tell if I should really take time to learn VBA to automate or learn something else like python or java. I have feeling VBA in Microsoft Office is here to stay but idk. Should I just learn VBA to make my life easier?

To clarify, I use excel all day and outlook.

I would not fit in with anyone in that photo. They would not accept me. They would call me names.

p cool

I wrote (copy pasted with some edit) shk script to automate brewing potion in Ragnatok Online back then. Does that count?

I made this bash script as a wrapper for borgbackup to deploy it across my machines, it has to handle my laptop being undocked, so it has lots of measures to prevent any unwanted behavior
0bin.net/paste/TL4bk53BIlBJnyL5#h4JlwfL6t dVFGIO-RwRDT0hX19 u/OdrpQa3Qf2lE

Both are proprietary cancer, switch to libreoffice

Is it? Looks just like when they get a team and sit then in an office for a few weeks until a project gets done.