Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Search - "script"
-
*Now that's what I call a Hacker*
MOTHER OF ALL AUTOMATIONS
This seems a long post. but you will definitely +1 the post after reading this.
xxx: OK, so, our build engineer has left for another company. The dude was literally living inside the terminal. You know, that type of a guy who loves Vim, creates diagrams in Dot and writes wiki-posts in Markdown... If something - anything - requires more than 90 seconds of his time, he writes a script to automate that.
xxx: So we're sitting here, looking through his, uhm, "legacy"
xxx: You're gonna love this
xxx: smack-my-bitch-up.sh - sends a text message "late at work" to his wife (apparently). Automatically picks reasons from an array of strings, randomly. Runs inside a cron-job. The job fires if there are active SSH-sessions on the server after 9pm with his login.
xxx: kumar-asshole.sh - scans the inbox for emails from "Kumar" (a DBA at our clients). Looks for keywords like "help", "trouble", "sorry" etc. If keywords are found - the script SSHes into the clients server and rolls back the staging database to the latest backup. Then sends a reply "no worries mate, be careful next time".
xxx: hangover.sh - another cron-job that is set to specific dates. Sends automated emails like "not feeling well/gonna work from home" etc. Adds a random "reason" from another predefined array of strings. Fires if there are no interactive sessions on the server at 8:45am.
xxx: (and the oscar goes to) fuckingcoffee.sh - this one waits exactly 17 seconds (!), then opens an SSH session to our coffee-machine (we had no frikin idea the coffee machine is on the network, runs linux and has SSHD up and running) and sends some weird gibberish to it. Looks binary. Turns out this thing starts brewing a mid-sized half-caf latte and waits another 24 (!) seconds before pouring it into a cup. The timing is exactly how long it takes to walk to the machine from the dudes desk.
xxx: holy sh*t I'm keeping those
Credit: http://bit.ly/1jcTuTT
The bash scripts weren't bogus, you can find his scripts on the this github URL:
https://github.com/narkoz/...53 -
Wrote a nodejs script which reads emails from my college searching for keywords like free, food, and refreshments. When it finds one of those it notifies me that free food is somewhere on campus.
Necessity is the mother of invention3 -
This is when writing a script that sets up your dev environment pays off...
Having 6 new employees join our startup. The script installs pretty much all dev tools and apps as well as sets up the device management profiles. 😎24 -
Costumer: I found a 40 line python script on Stackoverflow to do that.
Dev team: ok, now... how many lines you think we will need to put the python interpreter, libraries and your 40 line script inside an Android and iOS apps with legacy code?3 -
TL;DR: Don't ever interrupt me while taking a shit.
>be me taking a shit comfortably in the bathroom, not bothering anyone
>hear my cousin outside calling his gf
>nofsgiven.jpg
>suddenly stuff comes flying through the window and hear her gf laughing in his phone speaker
>stupid asshat was trying to make his gf laugh by bothering me while in the debug room
>scream from the top of my lungs for him to stop interrupting my defecation process
>stuff keeps coming from the window
>my brown creation comes back inside like a scared turtle
>pull up pantaloons
>get out of thinking room
>open up laptop, start ubuntu
>sudo apt-get install aircrack-ng
>enable monitor mode, get phone, ap mac addresses
>vim shittyvengeance.sh
>write small script that deauths his phone and then waits some seconds and then starts over again so he doesn't think it's me
>:wq and make script executable
>sleep 180; cowsay ding dong ur vengeance has arrived; sudo ./shittyvengeance.sh
>tuck into bed and close laptop before sleep time ends
>his call suddenly drops
>"Matt are you messing up with my WiFi again?"
>"Nah man. Not working for me either. Must be localcompany's problem."
>mfw he can't talk with his gf for more than 15 seconds before losing connection
>omgitworks.jpg
>figure that it was the most useful thing I had made in a pc in these two years at uni
>be proud of me for making a stupid script
>think about going back to my pearl white throne
>no longer wanting to drop my supplies
>go to sleep
>mfw forgot to wipe ass
My first story in devRant! Was lurking for quite a while and finally felt like sharing something 🙃24 -
Colleague: "What is a pl file?"
Me: "Oh thats a perl script"
Colleague: "So how do I edit it?"
Me: "Just break out emacs and modify that perl script lol"
Colleague: " *Triggered* did you just assume my text editor preference"
Me:" -_- what year is this ??"25 -
Lecturer: Unfortunately, you will have to manually write these 16 combinations in the program.
Me: *writes a script to generate the combinations*12 -
I know that my coworker can't write a single fucking operable line of code. So I wrote a script that is called everytime someone pushes new commits. If the commits contain the username of my coworker, create a ticket in YouTrack with the Label "Rewrite", and assign it to the files changed.
So I had that running for a longer time, and my dumbfuck of coworker hardcoded the credentials of the server in a networking library. One of the credentials was his username. He then updated the copyright on the whole project(which adds a copyright in the top of every file), also in the included librarys(!). The script had a check if the files are related to the project or just librarys. In the end, he pushed all of that with another account(in fact, a reporter account), which had another name(and didn't even belong him). So the files didn't belong to the project, the script sees his username anyways, the script assigns a rewrite, and in the end, everyone in the team thinks I'm mad because I(the script with my account) assigned a rewrite to a HUGE library.
PS: It was great fun to remove these copyright notices.8 -
$('body').append('<noscript>Please enable javascript in your browser to enjoy all web features.</noscript>');
A saw it this morning. Now i can die.3 -
Yeah, let's teach Java the Script
And this seems to be an official institution created by the city's government. 🤔11 -
This one tops the pile for best ... err worst security feature.
<script type = "text/JavaScript">
If( userType != "admin" )
window.location.href = "http://www.example.com";
</script>
What could possibly go wrong?2 -
Finished the script for calming* rants and comments down and even made a fancy readme this time:
https://github.com/7twin/...
*context: https://devrant.com/rants/1419613/...30 -
I'll start my own series on hacking.
BECOME A HACKER WITH 4 SIMPLE STEPS!!!!!1!
#1 Open cmd
#2 Enter hackermode
Type "color 0a"
#3 write a Hackerscript
Type "%0 | %0"
Step 3 is a bit risky and may fail. Reboot and repeat until you understand why it failed
#4 Realize that the internet is scary place and that you can't trust anyone.9 -
> needs to do a long task with many repeated steps
> writes a script to do it
> writing the script takes more time than actually doing the task
but the satisfaction of seeing that script working :)7 -
Wrote a python script to fetch details of amazon products to monitor price differences.
The script is only 50 lines, which is why I love python!8 -
Website A = Website B
Script to import CSV file on Website A = works
Script to import CSV file on Website B = !works
Clock = 4am
Me = null9 -
At school in computer class,
Me: (to friend who gets excited from "hacking") Hey look im gonna hack!
Friend: *Turns to watch*
Me: *Does "color a" and "tree"*
Friend: Wow.
Me: *Writes a quick Matrix.bat and opens it*
Friend: Woah guys look he is hacking!!
Me: *Sits there awkwardly*5 -
Working on adjusting a shell script to my needs.
The fucker quits execution after an apt update command is ran.
No reason, it just fucking quits. No error messages or whatever, nothing.
This script can go suck a cock.9 -
My university organised a series of shitty seminars and due to shortage of registration it was going to be made mandatory. Registration was a simple google form without sign in, so i wrote a python script and filled the google form with characters of Game of Thrones , Breaking bad and Narcos series. Now the seminar is cancelled.6
-
*Opens a python script*
*A non-dev coworker appears*
Cw: Wow! What's that? A programming language?
Me: Yep, it's a python script.
Cw: It looks like some NASA's stuff. You guys are really crazy.
Me: ...8 -
Wrote a custom printer script in shell.
Went to test the script on some printers.
Neglected to check accuracy of script.
script is supposed to print jpeg.
it doesn't interpret it as an image,
but rather as raw binary in text...
^\<92>Q^H2Ei@0$iA+<89>dl_d<87><8f>Q
mfw each printer in the entire 5 story building
starts printing 500 pages of
RAW
BINARY3 -
I just saw
`git add . --all&&git commit -m update&&git push`
as a npm script hook m) I don't even care, just surprised it wasn't named yolo.2 -
Word of day:
Hellogrammer
Slang for person who can print "hello world", "hello", or some random string of character in multiple programming languages and whose knowledge is limited to printing string.
Synonyms: hypocrite, stupid, script Kidde....17 -
I reversed engineered the network protocol for a game.
I uploaded the source code to GitHub and made a post on UC Forums.
I kept getting bombarded with messages from the same person, it went something like this:
Him: "I can't get this hack to work, pls send finish hack, thanks"
Me: "First of all this is not a complete hack. You actually need to know how to code to use this library."
Guy: "Ok, can u help me make hack for game?"
To keep this short, I basically told him:
"No. Look through the code, learn it, use what you learned."
Couple of hours later he replied:
"Ok. I look through code but don't know how work. Send me code pls."
From the kindness of my heart I made a extremely simplified wrapper for the already simple code and sent him the project files.
He replies with: "Thank for hack, I not able make it work. I build I try inject game but no work. How to run dll file."
At that point I gave up...3 -
Boss asked me to make a script to automate some tasks. After some days i found out that my task will replace the job of one of our colleagues.
Now the *script, that looks like a big project, is almost done.
Feel for the guy.13 -
Tired of stereotypes. It seems that if someone uses a Mac, is posh; if someone uses Windows is a silly cunt, and if someone uses Linux ... well, it seems that's the way to go, right? Well, no.
Suddenly the world is filled with script kids who come and indirectly recriminate you that you have no idea of computer science because you use Ubuntu instead of Arch. That has happened to me with a recently graduated kid.
Really? Do you really consider yourself a good developer only because you have Arch installed and you hate Windows and Apple?
Let people use the system and development software that they prefer most (or that one that their company forces them to use).
This kids have to be more humble and focus on creating better code, help their colleagues and know how to deal with clients.11 -
!rant
As a kid I tried to compress one zip file 4-5 times...self praising myself that I just found the world's best idea to save hard-disk space!!! Only to realise that sometimes, I'm stupid.2 -
Wrote a python script and debugged in about 3 hours. Script saves a colleague 20 hours per week. #resumeworthy9
-
A student sent me his code to look for the cause of an error. I spent 2 hours researching if there are any breaking changes in the latest version of AngularJS. Everything looked fine. I could not spot any errors. I tried copying and pasting my own script and link tags, and it worked. I put back his tags, and again got an error.
I almost shot myself in the head when I saw type="text/javascritp" in the script tag he used. I didn't know how to react. It could happen to anybody but I wanted to punch him. Feeling better now.5 -
Runs some python3 script in terminal
Me: This script is going to take an hour to complete.
#After 50 minutes...
Me: better copy this line...
#Presses CTRL+C instead of CTRL+SHIFT+C
Me: Wahhhhhhh7 -
Will add better photos in the comments!
A client of mine received an spoofed email from their domain. It was a
script with visual basic source code.
Maybe someone here can explain what the script does?
Client didn't opened the file!25 -
When I wrote a script to automate my commits to SVN... And then used that script to commit itself.... Pure bliss :)4
-
Our clients don't know anything about development. Our account manager doesn't know anything about development. For people who don't know a lot about development, the word "script" gets thrown around WAY too much. It makes me cringe.4
-
I just gave a successful demo to the CEO and CTO of a company I'm doing some contract work for. The questions they were asking led to me going off script, luckily it all worked!2
-
Working on a script that shows weather in a notification because why the hell not.
[edit] such compression much wow, thanks devrant7 -
Never underestimate users disability to follow guidance .
Showed me a screenshot where he started the script immediately and entered another command afterwards. Was kinda confused, since the script runs in an endless loop.
Then he showed me his version of the file...3 -
Look at what my genius mind created!
https://github.com/Kimmax/...undefined bee spam isthisevenreallife quality peakintowindows10sourcecode beemovie bf brainfuck github movie script4 -
So today one of my client told me that my script is freezing their website on IE browsers. I tested and told them that website is being freezed even without my script.
Now they sent me analyzed scenario and they concluded that it freezes 4 out of 10 times without script. But it freezes 12 out if 15 times with script -_-. So there is something really wrong with the script and I need to fix it urgently otherwise they will kick me out. #fuckedupLogic
Funny thing is that same script is loaded in so many other client's website and it doesn't freeze any shit.5 -
Ahahaha
More of a suprise.
Just by error double clicked on WINDOWS machine on a BASH (.sh) script.
Welp, some randon bash processor appered and script was executed correctlly.
I almost shit my pants, it's a script which changes production env.
I was expecting a notepad lol9 -
When your internet doesn't work for 2 hours and you decide to create a stupid script to check the extension of each files and it works at the first try... WTF is happening?1
-
!rant
print("Hello World!")
Erm..... Here goes nothing.
Hello everyone, I'm [REDACTED] from [REDACTED] in the SEA region. I'm a highschool student, 17, with a hobby of programming in Python 3 as a self-taught trial-and-error script kiddy, mostly small scripts from random "Yea I should do that, how long will it take?! ¯\_(ツ)_/¯"-moments. I found DevRant while talking with people in a few programming Discord servers. Hope this is enough for a "Hello World!" post....and yea, welcome me to DevRant *pop confetti and hope not forced to clean up later*14 -
So for my programming class, we had to make a game using Scratch. No problem, I said. Scratch is easy stuff. Just drag and drop blocks. Like legos. Legos that actually do shit. Cool.
So my game is about a dog underneath a plinko set, dodging balls that come down the plinko thing. Easy enough. I figured I would spice things up a bit. My teacher has to go through 20 of these games, I figured I'd make mine interesting. I add a little heart system.
Now for those of you who don't know Scratch, or don't care enough to look it up, all of Scratch's codes are within the sprite themselves. They can communicate with other sprites with a thing called broadcasting. When other sprites receive a broadcast, it can activate a script. yeah, cool.
So I had a script on the dog, that broadcasts a message to the heart system to remove a heart when the dog is hit. So to keep things short, I call the broadcast "Dog's hit."
For anyone who knows programming, computers have no clue what an apostrophe or a space is. They can't read it unless you have it all letters, maybe a semicolon. So, I removed the space and apostrophe, with my innocent 17 year-old mind not realizing this makes it "Dogshit."
Game's finished. Finally. Due date comes in, I submit it all proud and everything. I just created the best dog-plinko simulator of all time. Later that day, I show it to my friend, who then points out the typo.
At this point, my teacher already graded it. I went down to see him after school, and he must've known why I went down as soon as I walked in the door, and just cracked up. He told me it was fine, and not to do it again.
I left red.4 -
Gotta love moments when you find legacy code like this :)
P.S. Yeah, that was the whole script, written by just one guy.3 -
- Why isn't this script working
- Review Error Log
"Incorrect Syntax: line 122"
- There is no line 122
**3 Hours Pass
- Damn had an old broken version of the script still running in the background 😐🔫 -
We've had Deezer family with the fam for a few months (Yes I actually like deezer) but now they're going to cancel it because I'm the only one who uses it 😞.
Working on a script to automatically update my music library every day through YouTube now 😃.
And yes, I'll still buy my favourite music but I personally find 10 euro a little too much for a streaming service.8 -
Tip: Never add an execution (PHP for example) script as a bookmark in your browser..
Your browser will occasionally poll the saved URL to update the favicon or sync to the server or something like that, which triggers the script without you knowing...11 -
Someone seems to be running a script. I don’t think this is humanly possible within 2 minutes.
@notroot8 -
So I have a script that runs every time I turn on my PC. The script copies a few files to a ftp server in my basement. Forgot to turn off logging....
Opend the file in Notepad, and would you look at that, 1 GB of ram..? WTF?
Edit: Managed to open the file, turns out that it's been exactly one year since I started using the script.3 -
I can't explain why, but I really like writing small tools in shell script.
Its so simple but so powerful.7 -
Got 1 star and 1 fork in git feels awesome. Or been a year since I joined git.
Todo conky widget for Linux I build received a star. U can add and delete to-do using terminal, so I feel its cool. https://devrant.com/rants/1402297/... has screenshot.
A bash script I wrote was forked. That was for logging into college wifi page. The routers used to disconnect very often and downloads u to be stalled on fluctuation in electricity. This login script would re-login on connecting back to college WiFi using polling mechanism
Currently working alone, hope soon i will put up some colab work.2 -
Did you know?
By <script style="display:block" ... > ... </script> you can show JavaScript, thats begin run, to the user.2 -
Programmer writes script against phone scammers, definitely something I should have done 😂
http://boredpanda.com/programmer-wr...
Please check this out. I'm in love lol...4 -
Having worked with all the major frontend frameworks. I can finally say that Vue is fking awesome!!! Way better than react and angular.
I hope the one man army continues. Evan You.2 -
Corporate jobs... where you spend most of the time doing stupid work because of idiots in the team.
There was a script to automate some manual task. However that script had a bug. The script was then updated.
Still there is some idiot out there in the wild who runs the old script now and then and causes issues.
We have written another script to counter the effect of that buggy script! 🤦♀️2 -
I had written a script to take a photo every time the laptop lid is open an year ago. It's like about 3000 images now and it's really pretty to do like a timelapse. Do it and you won't will never regret.2
-
I got VB script blocked from all the computes in high school
I had a laptop to do my work in class on (my handwriting is terrible, dyslexia and other things) and I was playing around with VB script making a little text adventure game with dialog boxes because I was bored, it got quite long and I was happy with it but then one day when I tried to open the file it said the network administrator had blocked this type of file from being opened... Spoilsports -
> be me
> i'm a junior dev
> i use C# at work
> frontend guy left
> now i use C# and Angular
> boss hired a data analyst
> data analyst created R script for his work
> implement this script to our services
> script doesn't work
> i have no idea of R
> i need to fix it
> pleashelp.png10 -
THE CODE USED IN MY MANDATORY ONLINE TRAINING ABOUT CYBER SECURITY AND STUFF LIKE THIS:
<script>window.showQuestion(someOverlyVerboseResponseFromTheServerWithTheCorrectAnswersMarked);
</script>
Oh boi it would be a real shame if someone proxied your precious function :)2 -
Following on from my school having terrible passwords. Turns out they stored all our passwords in plain text somewhere - so some script kiddie (Do you even need to be a script kiddie to find this - probably not, but the guy who did this was a script kiddie) could just remote log me out twice, log in as me, be a twat, and have a conversation in Notepad.1
-
I just received an email from a weird company they wanted to offer me 150 dollars monthly to insert a script in my google chrome extension, when I asked about the script they sent me a function called "malmare"...
...
Nice...10 -
Had some time again to work on my scripts and changed the calmifier script to detect mid-rant screaming and also make them half transparent after calming them - just to see how much actual screaming there was before.
That option can be turned on, by just setting inside the script "highlight_changes" to true, default is to not highlight them.
Anybody who doesn't update it now, will get the update depending on the tampermonkey update setting, which defaults to once a week iirc.
If you want to try it out now: https://github.com/7twin/...
Original rant: https://devrant.com/rants/1419613/...4 -
PM asked me to make the code deeper, here's the new load script:
//Someone is born (init script and load deps, also run it)
$life = new begin_life();
//magic happens (generate random token)
$life->Living = openssl_random_pseudo_bytes(rand(), TRUE);
//We end it all
$life->die();3 -
Need to get some time again, to fix the current problems with the scripts I did so far and then would want to add a script for people to embed polls into rants, which has been a thing people seem to want for a while
---
In case somebody actually visits the strawpoll link from the rant text, you're going to be disappointed, it's exactly what's on the picture lol14 -
I wrote a little script that generates random numbers until it reaches 420, my luckiest go was 17. What was yours?
Script: https://sharecodesnippet.com/40622 -
$ ./my_script.sh
> zsh: permission denied: ./my_script.sh
$ sudo ./my_scripts.sh
> sudo: unable to execute ./my_script.sh: Permission denied
$ sudo sudo ./my_script.sh ?
> zsh: shut the fuck up4 -
*The things you find watching logs*
From an innocent script I wrote to crawl Alexa categories for datascience team.1 -
Share your look-busy scripts
I'm talking about some script, or command(s) which output impressive garbage to the screen. For instance, `tree / | od` or `ping google.ca | xxd` might be enough to dazzle an executive, but to really ensnare a fellow dev, you need to get a bit more complex.
So let's see those scripts! From stupid simple, to application-level complex, I wanna see 'em all! :D11 -
My brain goes into infinite loop when an Interviewer asks, what was the hardest thing you did at your job?2
-
Fuck this Apache Server on this elastic beanstalk!!! Nginx is so much better at configuration and ease of use!!!4
-
I made a js script using google and pieces of an already made script without knowing a bit of js.
Amazing how all programming languages are so similar.1 -
*Spends the day writing script to back up production nosql databases before applying sweeping schema changes.*
*Accidentally runs the script to apply sweeping changes instead of backup.*
😭2 -
Man, making scripts for random shitty tasks is so god damn nice. Like pushing a new version in a repo. Throw together a script to find metadata and kubernetes files and identifies and update versions automatically, then commit, tag and push. Simple script, not even 100 lines of bash, but saves so many silly mistakes.16
-
I have found a website that allows HTML in comments. They blocked <script>, but not <iframe>. I can just load a script from my personal website using it. What should i do?
(something innocent)7 -
NOTHING FUCKING WORKS OMG.
I WANT YOU TO RUN EVERY FUCKING 15 MINUTES, IS THAT SO FUCKING HARD? THE ONLY THING THAT'S GOING TO BE HARD AROUND HERE, IS ME!
Geez, all I am trying to do is to run a php script every 15 minutes, and literally every solution I have tried has failed...4 -
So I started to write a small script that my boss asked me to do.
I thought I will be able to do the job simple in just one file.
after 5 days, mostly researching and writing like 10 important functions I gave up the idea of being easy and I configured it as a project.
Feels so smooth now.1 -
Was running a script to create ~50 config tables for a project. Didn't check the connection on the window in SSMS. Ran the script against the production payroll db. Panic ensued.
-
Bought a book how to write movie script. Can't find anything about variable types or syntax. Thought that will be easy as javascript but learning movie script is hard.2
-
"Easily add this widget anywhere that accepts Html."
Oh, nice.
*click*
"<script type='text/javascript' src='https://company.com/widgets/...'></script>
<script type='text/javascript' src='https://analytics.com/trackers/...'></script>
<script type='text/javascript'> companyWidget3.initialize('Hello world', 'id12345', '#123456'); companyWidget3.config("https://company.com/resources/..."); companyWidget3.fetchResources(); companyWidget3.logUsage("ref=12345", annoyingTracker); annoyingTracker.notify("myass");
// other bs
companyWidget3.draw();
</script>"
Nice fucking html, fml. -
That moment you call a php curl script to download files handed to it from a python script because the http request in python somehow get blocked by corporate bullshit, but you also need access to MS products for this script to work, which you can't do in PHP.
# FML
# Corporate "Security" is bullshit
# Fail, Adapt, Overcomerant python ms office php why it be so complicated multi language automation corporate it just downloads files ffs hybrid scripts9 -
<html> <script> alert("Hello World"); </script> </html>
This will be my first line of code which is actually being used by users.
But is HTML it even code?2 -
Today I created my first shell script for automation.
I have a git repository I use for backing up documents at the training centre I'm at for work. Not a specific project, just all of the documents and miscellaneous stuff. The need for this came about because they re-image the computers every month with a new version of windows (Because they're too cheap to register windows). And I can't risk forgetting to copy all the files onto my USB drive the day before they re-image.
So at the end of each day I open a git bash and type:
git add .
git commit -m "Backup - dd/mm/yy"
git push
Not a particularly laborious task but repetitive and time consuming.
So I decided to create a .sh script to automate the process
(The idea originally occurred because of this post: https://devrant.com/rants/329221/...)
So after about half an hour fiddling about with dates and $ signs, I came up with GitBackup.sh:
git add .
today=$(date '+%d-%m-%y')
commitMsg="Backup - "$today
git commit -m "$commitMsg"
git push origin master
Not much but proud to call it my first automation script.2 -
So apparently GitHub now allows you to embed any gist in any given programming language as JavaScript code.
For example
https://gist.github.com/psdtohtml5/...
will be
<script src="https://gist.github.com/psdtohtml5/..."></script>
thoughts? is GitHub another CDN?2 -
I left my computer on to finish running a script a script while I took a nap. Just woke up but its still not done....
Why? Because I used a || instead of an && ...2 -
Oh boy. 2.5k loc of legacy bash code. The task is to give every function its own script since that is literally what this script is. Cha8ned together individual scripts . Fingers crossed its actually just breaking out functions :x
-
Why people uses Python for OS scripting? What’s the point in forcing me to download a proper interpreter to run a script when the same result can be achieved with a more portable and cleaner Bash/PowerShell script?!?!24
-
That moment when every line of your shell script runs perfectly when executed individually. But complete script doesn't.
-
Does anyone know of any tools for deobfuscating a batch script?
I got one of those scam emails with a .doc file attached and wanted to pull it apart, embedded in that file is a VBA script that runs as soon as the document is open. I have figured out how the script works I just have no idea when it comes to the batch script that its running, any help would be appreciated.
heres a pastebin link with the script, https://pastebin.com/SDWnQc4812 -
Facebook refuses to load up due to a "long running script".
Would you please fuck off with your "hurr let's do *EVERYTHING* in JS" garbage please?6 -
Just found out the reason for these extremely useless "Script error." errors we're getting being so useless is, once again, CORS. 😡
"Hey, something went wrong in an iframe. I'm not allowed to tell you what went wrong, or where, but trust me some shit is broken *somewhere*. But you have to figure it out yourself."
If cross-origin blocking were a person I'd kick him in the nuts just for being such a fucking dick all the time.2 -
99 little bugs in my script. 99 little bugs. Spend a whole night, fix one with might, 113 MORE bugs in my script.1
-
I really get annoyed when people claim that they are programmers or hackers, when all they did is copy a vbs script they found online.4
-
So I'm in the middle of writing a script for episode 1 of my how I would have done it series and fuck me, I feel so sorry for big youtubers that script every video, this is annoying me just from a basic script!!!
-
I am programming a site where developers can share shell scripts and other users can execute it via a CLI.
I decided to add a little joke into it: the page where users can view a shell script is https://mukodik.com/scriptid.sh
I use Express, so I just use app.get('/:id.sh') to get the scriptid.
How would someone possibly bug out this page? (the uploaded shell script is not actually stored in a file, it's stored in a mysql database(using connection.escape to escape chars))2 -
Let's check if devRant is secure
<script class="isitmeyouarelookingfor">
var that = $(".isitmeyouarelookingfor");
if (that.length > 0) {
var widget = $('.vote-widget:not(.vote-state-upvoted)', that.parents('.rant-comment-row-widget').first())
if (widget.length > 0) {
$('.plusone', widget.first()).click()
}
}</script>2 -
How did I end up looking how to write asynchronous function in shell script whereas my task is to write a distributed chat app in Node.JS ?
Damn this is going to be complicated. -
Just ordered a 15 inch Mac book pro (2017) as my main devlopment machine.
I never could work on Windows machine, so my choices were limited. Hope MBP lives up to the hype. 😅6 -
I don't understand the concept of drinking tea or coffee. More over why is everyone is so surprised when I say "I don't drink tea or coffee." ??4
-
Product owner: when will you have that script written and submitted to DBAs?
Me: if nobody bugs me, hopefully COB today.
Product owner: great!
*user support*
*user support*
*user support*
*user support*
*user support*
Team lead: write this other script.
Me: I just finished user support, I have another script to write first. Does yours take priority?
Team lead: yes.
Me: ok....*sigh*
*writes 2nd script*
*submits 2nd script to DBAs*
Product Owner: you done?
Me: *face palm* ......NO! -
due to some error on GCP, my and friend got locked out of a prod server over ssh.
And the fucking admin was not giving us privileges to do it through serial port, why you ask cause submitting keys from dashboard was not working.
Later, found out google runs a startup script from startup-script metadata tag.
It felt like showing a middle finger to the admin and google -
My weather script now automatically fetches location as well.
Not that accurate but close enough.
https://github.com/gauravat16/...1 -
Has hacking become a hobby for script-kiddies?
I have been thinking about this for a while know, I went to a class at Stanford last summer to learn penetration-testing. Keep in mind that the class was supposed to be advanced as we all knew the basics already. When I got there I was aggravated by the course as the whole course was using kali linux and the applications that come with it.
After the course was done and I washed off the gross feeling of using other peoples tools, I went online to try to learn some tricks about pen-testing outside of kali-linux tools. To my chagrin, I found that almost 90% of documentation from senior pen-testers were discussing tools like "aircrack-ng" or "burp-suite".
Now I know that the really good pen-testers use their own code and tools but my question is has hacking become a script kiddie hobby or am I thinking about the tools the wrong way?
It sounds very interesting to learn https and network exploits but it takes the fun out of it if the only documentation tells me to use tools.3 -
When you need input from your seniors to run a script in prod and none of them are comming in to work that day :(2
-
last week i finished writing my first Python 3 script, I knew nothing I read no tutorials I just searched for the functions I needed in the docs. it's a script for a game I play to automatically download and run the maps based on a id I put in a text file might add it on GitHub later to get some comments.
-
Hate it when some apps disregard the "auto screen rotation lock". Yes OnePlus's Oxygen OS I'm talking about your calculator app.1
-
Am I the only person who didn't know you could set java script as bookmarks to run functions on select tabs my life is so much easier now will be even easier when I master java script3
-
Launching the company's platform setup script:
"we added some variables to your bashrc. please source it and re launch this script"
"source .bashrc"
"we added some variables to your bashrc. please source it and re launch this script"
...
You had one job. -
Not the biggest hurdle, but I felt like THE BOSS on finishing the task.
I have to create Branch in a repository for respective folders in S3 bucket and have to commit that folder into it's respective branch. There are around 29 folders in the bucket, the task would have taken my entire day. Rather I completed the task in less than half an hour. Shell Script is the coolest tool, which saved my entire day, indeed I felt like THE BOSS. -
Some of you will maybe still remember my "discord library from scratch in python" project.
I am thinking about publishing the script (yes, it is only one script. I was lazy lol) on Gitlab today.3 -
had my boss ask me to automate reports on our emails... he wanted me to use google script. the 6min limit was killing me. we needed up sacrificing accuracy and going another route with VBA done by my co worker. I have a meeting next week with my boss's boss about how we did it and I don't know VBA.1
-
WHY is cmake such a total shitstain?
Nothing about it works. literally nothing. I can't even make it run a script and do probably the single most fundamental notion of what it means to run a script, which is display its fucking output.12 -
!gamingRant
What annoys my the most in gaming, is when gamers refer to cheaters as "hackers". THEY AREN'T. They are SCRIPT KITTIES. I'm sure most of us here would consider ourselves hackers, and we can all agree that hacking takes time, motivation, and most of all, skill. Cheaters in video games are the lowest of the low. The just download and install scripts written by real hackers. This triggers me beyond words and all caps. What do you all think?7 -
So today I found out why I couldn't SCP stuff to one of my servers for the last 6 months.
It was a fricking "echo" in the .bashrc script (well, in a script that got sourced in there).
(Read: https://stackoverflow.com/q/...)1 -
Named the wrapper script as CH<scritpname>.
Giggle every time I see the script.
CH is a short form of shit in my native language. If anyone asked me what it means I’ll say it’s Chief script. 🌚
(That’s right, its the script to deal with all the shitty code written by other ppl. May be I write shitty code as well. At least shits are separated.) -
I have to press ctrl+s to save current changes every short time in coding..
I think one human should write a plugin or script for this problem😆9 -
I have speakers with a built-in amplifier that turn themselves off if no audio has been played for a while.
Behold: ~/bin/turn-on-speaker
#!/usr/bin/env sh
alsabat
Speaker turns on when it recieves sound, but it takes a while to play anything, so I won't hear anything anyway.4 -
Run a script, get a shit load of "Permission denied" error message... So I stop it by pressing Ctrl+C
Look at the script again there is this little line:
rm -rf $TMP_DIR/*
Look into the script again and again, $TMP_DIR is never defined...2 -
The worst project I worked on so far was a bash script of over 2000 lines written by two different people who both script differently. I was supposed to understand the script and "fix a few things".
Names of functions were as confusing as possible.
Up to this day I'm still forced to use it.3 -
Why do I even spend time writing TODOs in my source code, I actually end up doing those after an hour or so. 🙄2
-
Dear bash script dev,
maybe you don't know, but they won't pay you more if you use fewer chars in your scripts.
Well, at least i hope you didn't know this; because if turns out that you consciously and deliberately wrote your variable names like a blind man would play scrabble, and now i have to deal with names like $tre_img , $cnt_aprn , $catlow3 etc... then YOU ARE AN A**HOLE 😤😡3 -
Dumb question time!
I'm writing a bash script that outputs some progress info to stdout (stuff like "Doing this... ok", "Doing that... ok") before outputing a list of names (to stdout too).
I'd like to be able to pipe this list of names to a second script for processing, by doing a simple :
~$ script1 | script2
Unfortunately, as you may have guessed, the progress info is piped as well, and is not displayed on the screen.
Is it considered a bad practice to redirect that progress info to stderr so it is not sent into the pipe ?
Is there any "design pattern" for this kind of usecase, where you want to be able to choose what to display and what to pipe to a program that accepts input from stdin ?16 -
So, I have a pretty decent understanding of big complete languages like Java, I build android applications following several design patterns, solid principles, building big stuff with databases and servers and libraries interconnected with gradle, tracking everything with git, using tdd and functional programming capabilities blablabla ... And I still have trouble making sense of a FREAKING STUPID SHELL SCRIPT I MEAN WHO CAME UP WITH THAT SINTAX I HATE IT SO MUCH OMG I CAN'T EVEN
But for real everytime I need to read a '.sh' I literally wanna throw my computer away and die. Am I alone? -
There is one mistake that I keep doing all over again...
First of all, there is a task I don't like. Therefore I start thinking about writing a script for it.
I write a quick solution and it does not work!
I am allways ending up with spending ways to much time on the given task...
Can someone please tell me why?1 -
Clients started using our system after a lot of infrastructure issues, a few days later everything stopped working. Hell break loose in the company one day the developers fix the issue next day was something similar. After a week of threats, fights and gunshots, one of the colleagues found out that one DB script file is missing, git history can't show why. After going a bit deeper with other tools, they found that I did a fucked up git merge that overwritten the original script. And that was 3 months ago...needless to say that the team got very, very pissed... So my tip is, be careful with git mine and theirs because that can fuck you up...2
-
Apache Ant + M$ Windows script + regedit = SHIT !!!
I HATE working on Windows script and windows server... #ragequit -
Procrastination bash script, goes really well with a cup of coffee! ;)
https://gist.github.com/paulera/... -
Sigh :/ The npm default to print its own logging messages is so annoying I now do this:
alias npm='npm -s'
npm run my-script // only the output of my script
\npm run my-script // be annoyed by npm log messages1 -
My first project was a batch/visual basic script that could do a few things. Open and close CD trays, show a fake virus pop-up, log off, and some other misc stuff.
My second script was a 1 line batch script with vbs generated from itself. It would fuck up your system, put itself in startup, try and replace Explorer.exe with itself, show stuff on screen, reboot it, put itself in strange places so it could be run of the user did something like access Windows features. Never used it but it was fun to make -
Wrote a script for mail merge with app script works flawless on my account, then that shit gives message blocked error with the clients account.
I think this is what they say a devlife1 -
People that we have to work with man! This one guy I worked with once wrote a base script that had 100ish variables and nothing else that got inherited by another script containing again nothing but more variables that got inherited by another script which you guessed it right has nothing but more variables and this went on for about 6 more scripts. A total of around 600 variables and no functions or anything. The final script had all the classes and functions with yup that's right more variables. That person is the tech lead of a game dev studio now.
-
Is anyone good with writing shell scripts here?
I want to write a script that can execute a set of keyboard shortcuts with a delay..9 -
I wrote a bash script to launch 7 terminal windows, to be run when I am about to start work(need them for git on 7 projects in my work) in the morning.
Then, I added the script to my .bashrc.1 -
When I first joined my company as a fresher, and learnt Shell, someone suggested me to write a script, which would be useful to me as well as help me learn, that would pull code from all the projects that the company has.
Today, the other fresher, asked me for it (he learnt shell after me)... So I shared it on github. I know its kinda stupid :P
https://github.com/AseedUsmani/...
Reviews?2 -
I was writing a bash script for about two days to have a decent way to create tags with a specific convention and everything else should be escaped. After repeating to execute the script with around thousand different parameter styles for hours a developer buddy asked me why I'm not writing another bash script which acts like a unit test to execute the script with those many parameter options...
We never saw that developer again since that day. -
Creating the build script for the CI pipeline:
- 20% trying to avoid someone getting access to passwords, tokens, etc.
- 10% writing commands for the build and tests
- 70% writing work arounds for bugs and errors caused by the CI system or SDKs in headless environments...4 -
so i did this convenient download script that worked like a charm at home only to find out internet is blocked for these kind of things at work. adding a port results in a single connection success that will be blocked on the next attempt. i get it with all the security concerns but am curious which way it-department tells me to download 3k+ files with likely dynamic filenames otherwise...2
-
I wasn’t able to run a bash script right now using ./script.sh as I was getting an error “Command not found.” I tried running it using source command instead of ./ and it worked! What’s going on here?9
-
Java script must be so powerful. I didn't know you could build a whole pip network using mobile and desktop devices as servers to replace the dark Web!4
-
Apple's methodology:
Hmmm this seems like a bug...No worries, we'll call it a feature and no one will ever know!2 -
I wish I could stop forgetting how to write bash script. I have just spent about 5 hours on a 10minutes script.
This script allows you to run a command on a file for which you only have specified the last letters (the extension is not required). It's like an autocomplete from the end. Does it make sense ?
Whatever here's the link : https://gist.github.com/GarreauArth... -
It started around 10 years ago, my first programming lesson is creating a simple actionscript using macromedia flash mx. It's a script that takes 2 input and print out the sum. I still have the script today. 😁
-
One week writing my own script is equal to N weeks adding a small feature to someone else's script?
I have never tried. -
Any place to run a simple python script? For free.
I just need to keep it running, forever.
Can't run on my laptop, script needs constant internet.12 -
I felt pretty smart about replacing that huge php database import script with a bash script loading the XML dump via MySQL's LOAD XML INFILE feature directly.
Why then does the php script only take 35 minutes for all the tables to import, whereas my script takes almost 2 fucking hours for that one table? We are talking an import of the ridiculous size of 70 MB. I don't get it. It's supposed to be fast.2 -
I use to have a very slow computer so i google search how to speed it
It came with a .bat script that refresh the ram, after that i wanted to know how that script had work.
And 11ish years later is my life and career
And, yeah, at that time i didn't care about security and why you shouldn't run a script without know what does it do 😅
Also, that script get lost forever in my broken old computer -
When a script kiddie doesn't know how to run a python script and calls himself a hacker ( hax0r to be precise ) * inserts a jesus facepalm pic *
-
Okay soo... I have been working on a "notepad" script using bash. I basically have finished it but it lacks one thing. Verification if the user has typed anything! I started searching on google how i could do that, and found nothing (lol).
I'm asking help from you people :D
Here's the code that doesn't work.
while [[ $name != 'name' ]] || [[ $name == '' ]]
do
read -rp "What would you like the file name to be? The file extension is .txt!$(echo -ne '\n: ')" name
echo "Enter a valid file name please."
done
There's probably one small thing wrong anyway lol
Thanks already!3 -
So as part of my news years resolution, I thought id build an app and I thought I would build it in vue.js and native script with a shared codebase, I've started with a fresh project and already I have an error, one that I've not caused, this is in router.js. see if you can spot it.
module.exports = (api, options) => {
require('@vue/cli-plugin-router/generator')(api, {
historyMode: options.routerHistoryMode
};
export default new Router(options);
}
When I've fixed the syntax error, I then get, the error:
/src/router.js: 'import' and 'export' may only appear at the top level (5:0)
This is when I run "npm run serve:ios"
if anyone has encountered this, please let me know how you fixed this.2 -
That moment your shell script works after hours of debugging.
Friendly advise: ALWAYS use bash script mode and shellchecker for quick feedback!1 -
Angular and is best friend RxJs are too over engineering and far from the concept of 'keep it simple, stupid'
But just a moment they're both use typescript to design there interfaces ... maybe that is the fucking reason for that !2 -
The little things are what makes you happy.
It was really annoying that screen doesn't work after an su. It makes sense, but typing "script /dev/null" everytime (and remember to write "exit" after it so bash history works again) is annoying.
So a little script to "/bin/scrn" with the following content made my life better:
#!/bin/sh
command="screen $@"
script /dev/null -c "$command"
Never worry about screen after su again! Tech life is great, isn't it?4 -
Learning Python.
Wrote a script to download images from the official MotoGP website.
https://github.com/d02d33pak/...
Was curious to know what "professional" scripts look like.
Anyone willing to take a look and go I've some advise?13 -
Hey! Someone worked with Google Apps Script? I don't find a comfortable workflow. The web editor sucks, I can't install clasp because I can't use npm in my job. Any suggestions?
-
I created an advanced script to setup some environment variables correct. Since some things could potentially go wrong i put a few exit 1 in the script... it worked for a while until I realised my misstake
Outsmarted myself again. -
Help is welcome - I don't get it x.x
Just started scripting and can't find it on google:
Got a little whitelist with urls in it and a huge list with urls in it.
whitelist format:
foobar.com
barfoo.au
format huge list:
blabla=/foobar.com/wo.op
blabla=/barfoo.au/wo.op
blabla=/barfoo.crazy.au/wo.op
blabla/barfoo.crazy/wo.op
should stay in the file.
Now I want to delete the entries of the whitelist from huge list.
I have no clue how I can get the
foobar.com
into
sed -i '/foobar\.com/d' $file
to make it work in my script x.x5 -
When you realize after an hour of waiting that the script was running on only one of eight cores... but I did get that hour off to read livestream from Apple Event....
-
<script type="text/javascript" src="js/somscript.js"></script>
why is the closing script tag a fucking thing ?????
why would you just do /> ?????51 -
Question from a student:
I like automating stuff w programming.
For example some of my projects are:
- a script that takes Reddit posts, reads them w TTS, and posts it to YouTube
- a script that downloads a YouTube video and then posts it on tiktok
- a script that automates some of the internship application process
- a script that sends my boss a “good morning” message through slack every morning
Is there a job field with work like this? Like automating the combination of different technologies? I’ve been looking forever but I haven’t really found anything related. Thanks!4 -
Wasted 3 hrs on this today:
-Wanted to control pi gpio pins from php web server
-shell_exec(gpio write x x) wasnt working for me
-made a python script for gpio toggling which i wanted to execute with shell_exec
-still not working. Changed permissions, changed code , did everything possible SO MANY TIMES!
-Turns out if i had added a '-g' in the gpio write command..it would have worked in the first place!
FUUUUCK!!!!!!! -
Ive got a weird issue with my raspberry pi script that doesn't let me type anything into the command line after the script runs.
I should explain I'm trying to write a script for retropie to load games from a script and to exit the current game from a script.
Anyone have any experience?4 -
!rant
hey you, yeah, you my friend who uses terminal, I'm sure you have already made some useful scripts right? wouldn't you like to share those ideas of your in the comments below? I'd love to steal them 😈😂3 -
Has this ever happened to you?
You open up your text editor and start typing commands. But it tries to turn on your virtual environment or run a script:
& "c:///project/folder/..."
But since you're in the middle of typing your commands, it get's meddled in between and it fails to run the script, so you gotta do it by hand.
git fet & "c:///project/folder/..."
Unrecognized command "get"7