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 - "execute"
-
When I worked for an online dating app, at one point we had the ridiculous idea to try to take a popular LinkedIn feature and convert it to a dating app feature in order to capitalize off of the success LinkedIn had with it.
The feature was LinkedIn endorsements. The idea was to allow the dating app users to get endorsements from people in their contacts lists on certain traits/features from a defined list (ex. Funny, smart, etc.). It wasn’t a terrible idea on the surface, but the way we planned to execute on it was insane and everyone knew it was going to fail. To avoid any controversy all of the endorsable terms were watered down to the point where no one would ever find using them/asking their friends for endorsements to be any fun. And the worst part was how we planned to get people to ask their friends for endorsements - management wanted us to build a contact list importer and just spam email contacts with “please endorse me” emails. The whole thing was ridiculous.
No one, including myself, wanted to build the feature/spam tool but management really wanted it so we had to build it. Like expected, it failed very quickly when it was clear no one cared about getting their real life friends to endorse them on some dating app, and the spam contacts took was ineffective and... spammy.10 -
Declare variables not wars,
Build packages not walls,
Execute programs not people,
Throw exceptions not stones.12 -
SERIOUSLY: FUCK YOU PAYPAL...
🖕For your 500 Apis that seemingly do the same fucking thing
🖕For your fucking Webhooks that get dispatched every fucking century
🖕For needing a fucking degree in PayPal sciences to understand which fees apply and when
🖕For doc links that seemingly lead to nowhere
🖕For having to plow through 500 pages on your fucking retarded website to be able to execute or receive a fucking payment
🖕For your casual internal server errors
🖕For your fucking ancient sandbox account design and dysfunctional features therein
Making payments is not fucking rocket science you fucking cunts.
🖕FUCK YOU!🖕22 -
Wow, just wow.
The Dutch national security spy agency and also their military one are complaining that the organisation that was brought to life to check if they don't spy on innocent people (and execute illegal hacks and overstep their surveillance powers etc) is investigating too much and asking too many technical questions relating to ongoing operations.
Well, this shows that this is necessary apparently! I'm glad this organisation is doing their job.
Oh, the irony.13 -
This tini tiny forky bomby is so cute than you probably want to execute it... at least in a VM / Container.13
-
I don't understand the phrase "once in a while".
If you execute something only “once“ then why you keep it in a “while“?10 -
The Irish minister Rudd said today (for the second time I think) that 'WhatsApp gives terrorists a safe place to hide and execute their activities. Might be a good idea in the future to ban encrypted chat apps'. (not literally like that but it's a good summary of her points)
Imaginary dialog:
"okay so encrypted chat apps help terrorists and criminals to execute their activities"
"Alright, let's ban water then!"
"Wait what why would you ban water?!? How will ordinary people be able to drink then?"
"Why would you ban encrypted chat apps? How will ordinary people be able to communicate securely?"
😐
😶
😮
😧
😓24 -
curl cheat.sh — get an instant answer to any question on (almost) any programming language from the command line
tldr
do curl cht.sh/go/execute+external+program to see how to execute external program in go
And this question: why I actually should I start the browser, and the browser has to downloads tons of JS, CSS and HTML, render them thereafter, only to show me some small output,
some small text, number or even some plot. Why can't I do a trivial query from the command line
and instantly get what I want?
I decided to create some service that will work as I think such a service should work.
And that is how wttr.in was created.
Nowadays you probably know, how to check the weather from the command line, but if not:
curl wttr.in
or
curl wttr.in/Paris
(curl wetter in Paris if you want to know the weather in Paris)
After that several other services were created (the point was to check how good the console
can solve the task, so I tried to create services providing information
of various nature: text, numbers, plots, pseudo graphic etc.):
curl rate.sx/btc # to check exchange rate of any (crypto)currency
curl qrenco.de/google.com # to QRenco.de any text
And now last but not least, the gem in this collection: cheat.sh.
The original idea behind the service was just to deliver a various UNIX/Linux command line cheat sheets via curl. There are several beautiful community driven cheat sheet repositories such as tldr, but the problem is that to use them you have to install them first, and it is quite often that you have no time for it, you just want to quickly check some cheat sheet.
With cheat.sh you don't need to install anything, just do:
curl cheat.sh/tar (or whatever)
you will get a cheat sheet for this command (if such cheat sheet exists inf one of the most popular community-driven cheat sheet repositories; but it surely does).
But then I thought: why actually show only existing cheat sheets? Why not generate cheat sheets or better to say on the fly? And that is how the next major update of cheat.sh was created.
Now you can simply do:
curl cht.sh/python/copy+files
curl cht.sh/go/execute+external+program
curl cht.sh/js/async+file+read
or even
curl cht.sh/python/копировать+файл
curl cht.sh/ruby/Datei+löschen
curl cht.sh/lua/复制文件
and get your question answered
(cht.sh is an alias for cheat.sh).
And it does not matter what language have you used to ask the question. To be short, all pairs (human language => programming language) are supported.
One very important major advantage of console oriented interfaces is that they are easily
programmable and can be easily integrated with various systems.
For example, Vim and Emacs plugins were created by means of that you can
query the service directly from the editor so that you can just write your
questions in the buffer and convert them in code with a keystroke.
The service is of course far from the perfection,
there are plenty of things to be fixed and to be implemented,
but now you can see its contours and see the contours of this approach,
console oriented services.
The service (as well as the other mentioned above services) is opensource, its code is available here:
https://github.com/chubin/cheat.sh
What do you think about this service?
What do you think about this approach?
Have you already heard about these services before?
Have you used them?
If yes, what do you like about them and what are you missing?26 -
Soms week ago a client came to me with the request to restructure the nameservers for his hosting company. Due to the requirements, I soon realised none of the existing DNS servers would be a perfect fit. Me, being a PHP programmer with some decent general linux/server skills decided to do what I do best: write a small nameservers which could execute the zone transfers... in PHP. I proposed the plan to the client and explained to him how this was going to solve all of his problems. He agreed and started worked.
After a few week of reading a dozen RFC documents on the DNS protocol I wrote a DNS library capable of reading/writing the master file format and reading/writing the binary wire format (we needed this anyway, we had some more projects where PHP did not provide is with enough control over the DNS queries). In short, I wrote a decent DNS resolver.
Another two weeks I was working on the actual DNS server which would handle the NOTIFY queries and execute the zone transfers (AXFR queries). I used the pthreads extension to make the server behave like an actual server which can handle multiple request at once. It took some time (in my opinion the pthreads extension is not extremely well documented and a lot of its behavior has to be detected through trail and error, or, reading the C source code. However, it still is a pretty decent extension.)
Yesterday, while debugging some last issues, the DNS server written in PHP received its first NOTIFY about a changed DNS zone. It executed the zone transfer and updated the real database of the actual primary DNS server. I was extremely euphoric and I began to realise what I wrote in the weeks before. I shared the good news the client and with some other people (a network engineer, a server administrator, a junior programmer, etc.). None of which really seemed to understand what I did. The most positive response was: "So, you can execute a zone transfer?", in a kind of condescending way.
This was one of those moments I realised again, most of the people, even those who are fairly technical, will never understand what we programmers do. My euphoric moment soon became a moment of loneliness...21 -
With all this emoji code bullshit flying around in here.
I thought I would test my luck and make what I think would be the worst possible end result of this.
<?php
define("😂","God help me");
define("🤡",100);
for($🍔 = 0; $🍔 <= 🤡; $🍔++){
echo 😂."\n";
}
?>
This will execute and run on PHP7.1 😱
Now let’s all band together and kill emojicode before it becomes a thing we will regret!11 -
Did you know, that adding the flag
"--libcurl" to you curl command, does actually create a .c file that you can compile and that tiny program will execute that exact command that you just performed in the terminal??
Example:
"curl http://linu.xxx/I_love_GOOGLE/4ever -# -k --libcurl"
It creates a .c file that perform that action when used.15 -
So I was at work and send to another location (distribution centers) and in the lunch break my guider for that day and I started a conversation about servers etc (he appeared to do loads of stuff with that). He recommended me all those programs but I didn't recognize anything so I asked him what kinda servers he ran. He runs a lot of Windows servers. No problem for me but I told him that I am into Linux servers myself.
Guy: "Linux guy, eh? That system is considered to be so secure but in reality it's insecure as fuck!".
Me: (If he would come up with real/good arguments I am not going to argue against that by the way!) Uhm howso/why would you think that?
Guy: "Well all those script kiddies being able to execute code on your system doesn't seem that secure.".
*me thinking: okay hold on, let's ask for an explanation as that doesn't make any fucking sense 😐*
Me: "Uhm how do you mean, could you elaborate on that?"
Guy: "Well since it's open source it allows anyone to run any shit on your system that they'd like. That's why windows rocks, it doesn't let outsiders execute bad code on it.".
Seriously I am wondering where the hell he heard that. My face at that moment (internally, I didn't want to start a heated discussion): 😐 😲.
Yeah that was one weird conversation and look on open source operating systems...21 -
Everytime I have to execute several commands to do something, I tell myself:
I will write a script for that.
But now I have no time.
I will do it the next time.
I will never write these scripts.4 -
My teacher at school who taught me programming. We were taught Java.
You see, Java is not a beginner's language, most say. But the way she taught it, the examples, the analogy, the explanation; she made it so easy.
She made us execute our first Hello World program (using BlueJ) and proudly said, "you're all programmers now!", that was when fascination took me over. I remember that moment till today.
Also, unlike regular exams, the programming exams required extreme competency. Marks were split up for algorithm and syntax. There were also questions like find the error in this algorithm for this output. She would always surprise us at the exams!
I had several glorious moments in class by being the first to answer most of her questions. At 13, it was kind of a big deal for me.
(Okay, who am I kidding, it still is :-P)
*sigh*
It was mostly just self learning from there. I switched schools and then there was college. Attending classes in college was like going to the gym with fat trainers. Utterly useless :-/ It just made me appreciate her even more.6 -
"Pre-Installed Malware Found On 5 Million Popular Android Phones"
"added somewhere along the supply chain"
See below how to check if it's installed
Sources:
- (new) https://thehackernews.com/2018/03/...
- (new) https://research.checkpoint.com/rot...
- (old relevant news) https://thehackernews.com/2017/03/...
---
"Rottensys" a malware which covers devices from: Honor, Huawei, Xiaomi, OPPO, Vivo, Samsung and GIONEE
---
"According to our findings, the RottenSys malware began propagating in September 2016. By March 12, 2018, 4,964,460 devices were infected by RottenSys," researchers said.
"At this moment, the massive malware campaign pushes an adware component to all infected devices that aggressively displays advertisements on the device’s home screen, as pop-up windows or full-screen ads to generate fraudulent ad-revenues."
---
If you have one of the affected devices, here's how I checked mine:
1. Install ADB (Windows: https://forum.xda-developers.com/sh...)
2. Connect your device in USB-debugging mode
3. execute "adb shell 'pm list packages -f' > output.txt" (On windows navigate to C:\adb and replace "adb" with ".\adb.exe")
4. open the now created output.txt
5. search for any of those:
com.android.yellowcalendarz (每日黄历)
com.changmi.launcher (畅米桌面)
com.android.services.securewifi (系统WIFI服务)
com.system.service.zdsgt19 -
Woah, did you know some of the older arm processors could execute java bytecode directly on the hardware?1
-
I got arrested multiple times under acts of cyber crimes...
Yeah, so what if I did? Why is it a problem that I take down CP sites? "Because it's partaking in cyber warfare." Well then the police and the Federal government should execute their job keeping such out of the web space. Now, whenever I find a job, I have to inform due to the judge's final document. And not just that now when I am required to talk to a police officer who has seen my record all they can reckon is to escalate it.
What fantastic horse crap! You get arrested for tracking down child molesters and taking them off the web exclusively...
Some say I'm a social justice warrior, only I don't think that I am. I reckon I am merely an over eccentric programmer who desires to see the real criminals get sent to jail.30 -
To whoever messed with my devrant-client tests by constantly downvoting the posts and them being hidden from the API, you're a cunt and I hope you break your neck falling out a 12 story building. :)
Here's the final test to verify shit works too: https://devrant.com/feed/recent
Edit: it works, get fucked you humid piece of shit.
Edit2: To give context to whoever might be subscribed to me and might or might not have been bombed with notifications:
Was working on the plugin system for the devrant client and async was giving me hell, the links I posted were to test the plugin that first has to execute a $.get and only then can return a linkified rant-text.10 -
I'm a shit programmer
I'm 29 and I assumed that by this point I'd be successful some way or another, either by being financially abundant or technically complex.
I am not, just mildly accomplished instead.
Here'a list of thing I consider challenges that I have:
* I tend to tunnel vision ideas that are terrible or execute them poorly because of said tunnel vision.
* I don't hone my skills, I usually consider my potentials the same as my actuals, as if I achieved everything already, probably product of ny huge ego.
* I communicate poorly with my boss, I sidetrack into thing he didn't ask
* I'm a mess when it comes to reading documentation online, I have the attention span of a fucking fish.
* I work alone, I have 0 networking status or skills.
* I take huge amounts of time to finish my side projects
* Of all the side projects I started I only finished one, the ones that I couldn't finish usually bevame insabely stressful things, so much and so many that I questioned myself many times if I should be a programmer or not.
* I have little discipline or organization, if I work in more than one thing at a time, i get really anxious and stressed.
I am not saying I'm not competent, I think I am (I'm looking at you imaginary scary recruiter googling this online), I'm just not really proud of myself26 -
BRAIN_UNCAUGHT_EXCEPTION
Could not execute "sleep()", as main thread was busy thinking about why a beautiful girl would just handle me her number.
Ok we did get on well but it was unexpected nevertheless
Thank you brain for wasting my day 👍11 -
My dad's old MS-DOS computer (can't remember specs) when I was 5 or 6 years old. This got me into gaming. I always had to ask him to execute the games I wanted to play cause I didn't know how to do it. One of the first games I ever played was Wolfenstein 3D. Was so scary I didn't want to exit the first room :D4
-
Everyone has those ideas they thought of and were like, 'that would be rad!' but couldn't execute because of an array of reasons.
Well, two weeks ago I got approached by some people who had *thatmyidea* and were willing to pay me and any devs of my choice, to build it.
We've finished getting requirements and now I'm getting paid to work with devs I love, on a project I love!2 -
It was friday evening and almost everyone in office had left. I was assigned a bug related to some of my code changes. I called my senior to help me debug (has three years of experience, whereas me having only one year exp, who is also a very good friend of mine *always helps in debugging*).
So the code goes
switch (someEnum) {
case One:
doSomething()
// no break
case Two:
t.x = someEnum
break
case Three:
.....
}
I had recently added new enun One and was reciting the code logic to him as we were looking through code.
Him: Hey you haven't set t.x in case One. How did you miss that?
Me: No look, I haven't but a break on it. It will go ahead and set it in next case.
Him: What are you talking about? if the someEnun is One why would it execute Two case. Lets copy that line up there and try it locally.
Me: No no no wait. Are you saying that groovy doesn't need breaks in switch (Me being new to groovy but good with Java).
Him: Why would you need break in switch case even in Java?
Me: *stares at him*
Him: I'm going to execute a psvm right freaking now.
Me: *while he writes the psvm* Why did you think there were breaks in switch in any code?
Him: Shut up. *writes psvm code cursing me everywhere*
*executes code*
No way. Really??
Me: Tell me why do you think are there breaks in switch.
Him: I though they were to get you out of switch block and not execute the default block.
Me: So were you coding switch until now without breaks?
Him: I don't know man. I'm starting to doubt all the switches I have ever written.
Me: Anyway that's not the problem, so moving on.
*a while later*
Him: If a interviewer would ask me how would you rate yourself in Java. I would be like "Well I worked on various projects for 3 years in Java, but didnt know why we put breaks in switch. So you figure it out yourself."
One of the best moments in office.8 -
PM: What are you going to do today?
Expected-
Me: execute some junits.
Actual-
Me: execute some joints.
Sad auto corrects, flow keyboards.3 -
! Rant
I'm getting married on Friday.
I proposed half a year ago.
What have we done since the proposal?
- Adopted a Cnaani dog with a lot of issues and recovered her from most of them.
- went every Saturday to skydive for the whole day (almost finish the license!)
- moved apartment
- Plan and execute the wedding
- build wedding RSVP and teaser sites
- work full time as developers (me full-stack and she's an automation expert)
- go abroad twice
- I have work on a new startup with a friend (in version two right now)
- I hade my driver license classes
- went to salsa courses twice a week
- built our salsa wedding dance
- I studied Clojure, ruby on rails, Angular 2 and a little bit of React.
And more...
So why does it feel I haven't done enough?6 -
When I learnt programming, sugar was still made out of salt and hence not used in coffee.
Also, we didn't have source level debuggers, only the "print" method. However, compiling was also slow. It was faster and more convenient to go through the program and execute the statements in one's head. This helped understanding what code is doing just by reading it. It also kept people from trial and error programming, something that some people fall for when they resort to single step debugging in order to understand what their own code is even doing.
Compiling was slow because computers in general were slow, like single digit MHz. That enforced programming efficient code. It's also why we learnt about big Oh notation already at school. Starting with manual resource management helped to get a feeling for what's going on under the hood.20 -
That would probably be implementing multithreading in shell scripts.
https://gitlab.com/netikras/bthread
The idea (though not the project itself) was born back when I still was a sysadmin. Maintaining 30k servers 24/7 was quite something for a team of merely ~14 people. That includes 1st line support as well.
So I built a script to automate most of my BAU chores. You could feed a list of servers - tens or hundreds or more - and execute the same action on each of them (actions could be custom or predefined in the list of templates). Neither Puppet nor Chef or Ansible or anything of sorts was consistently deployed in that zoo, not to mention the corp processes made use of those tools even a slower approach than the manual one, so I needed my own solution.
The problem was the timing. I needed all those commands to execute on all the servers. However, as you might expect, some servers could be frozen, others could be in DMZ, some could be long decommed (and not removed from the listings), etc. And these buggars would cause my solution to freeze for longer than I'd like. Not to mention that running something like `sar -q 1 10` on 200 servers is quite time-consuming itself :)
And how do I get that output neatly and consistently (not something you'd easily get with moving the task to a background with '&'. And even with that you would not know when are all the iterations complete!)?
So many challenges...
I started building the threading solution that would
- execute all the tasks in parallel
- do not write anything to disks
- assign a title to each of the tasks
- wait for all the tasks to complete in either
> the same sequence as started
> as soon as the task finishes
- keep track of each task's
> return code
> output
> command
> sequence ID
> title
- execute post-finish actions (e.g. print to the console) for each of the tasks -- all the tracked properties are to be accessible by the post-finish actions.
The biggest challenges were:
a) how do I collect all that output without trashing my filesystems?
b) how do I synchronize all those tasks
c) how do I make the inception possible (threads creating threads that create their own threads and so on).
Took me some time, but I finally got there and created the libbthread library. It utilizes file descriptors, subshells and some piping magic to concentrate the output while keeping track of all the tasks' properties. I now use it extensively in my new tools - the ones where I can't use already existing tools and can't use higher-level languages.4 -
"Delete node_modules folder and execute npm install" is the js version for "reboot the machine". Often works, but no one knows exactly why.3
-
Thinking about getting this as a tattoo on my wrist (without the words), what do you think? Currently 21, will this decision fuck me over somewhere?11
-
I've tried to stay out of the fray regarding replacing long-standing terminology to use "safe" inclusive wording instead because it doesn't seem like that big of a deal to me to just use the new wording. If the old wording wasn't hurting people (this is an argument that a of a lot of people use regarding this mass naming change movement) then the new wording shouldn't hurt anyone either...
that was just my 2 cents on the topic, until today!
Some dumb motherfuckers are trying to replace the word 'execute' with 'start'/'run'.
That's just some fucking ignorant plebian shit right there. The literal definition of execute is:
"The act or process to carry out fully or put completely into effect"
"to do what is provided or required by..."
"to perform what is required to give validity to..."
start and run don't grammatically encapsulate what execute does. And now I sound like a fucking grammar nazi because this shit is getting under my skin more than it should.
Execute's primary definition is grammatically correct for the context in which it is used.
Change Master/Slave for databases and I couldn't give a single solitary fuck about it. Primary/Secondary works just fine too. The grammatical context isn't blown away here.
But take away my execute and sudden I get all hot and bothered with the desire to punch a nun over how stupid this "offensive words" crusade is.
Thank you for coming to my Ted talk.15 -
I don't know how to really put this but a professor at my university thinks adding a space in java program will help to execute code successfully .I am rethinking over my decision to join university18
-
Today I learned that someone wrote a Python interpreter in JavaScript called Brython. So now you can include a framework to write shitty code in a buggy framework and tell your users to throw more hardware at it.
The guy I heard this from also believed that his code would somehow be "compiled" rather than what's essentially a framework be loaded and then execute code in a language not native to the browser...
So now you can write JavaScript where it doesn't belong in Node and write Python where it doesn't belong through a framework. Frontend and backend are so passé, we might as well start calling it fluid instead.
FULLSCHTAK!!!
🙂🔫21 -
Giving functions exciting names so you can feel like a Bond villain while programming:
execute(); destroy(); fire(); isDead();6 -
Game is underway in unreal engine!
Been doing the art for a ridiculously long time, got help from many people! All sorts of suggestions, and great ones too! I've used paint dot net because it is reliable, Im not a great digital artist but can do a decent job!
So what's happening now is that I'm working on the maps and going to start on the character design tonight.
I have less than a month to get a huge portion done but I hope I execute it at an international standard! :D
Here's a preview of the basic part7 -
I finaly managed to make a dark mode on slack desktop app! Still has some bugs (like scrollbar being white) but works well enough for me. If anyone is interested tell me in the comments 🙂
How i did it (Linux paths but should be the same process for Windows):
You can execute scripts in /usr/lib/slack/resources/app.asar.unpacked/src/static/index.js
Using that i figgured out that slack desktop is basically an actual webview to their website and some os hooks.
To edit the contents of the webview you can call `document.getElementsByClassName('WebViewContext')[0].executeJavaScript("alert(1)")`
Then i just simply packaged up some custom css to be loaded with JS.
Quite simple actually.
Using this method you can create all kinds of plugins for slack, so go wild!3 -
my mind is multithreaded but can not physically execute more than one thread at a time.
i.e. i want to say 5 sentences in the same time bc im too lazy to wait and say them one by one after a specified delay of time, so i fuck myself over while speaking.
like atomic regions, i bust a few words from time to time from different sentences i have in mind and it ends up not making any sense to what im saying, but it does in my head.
so this is what too much covfefe and sleepless coding nights does to people12 -
Wrote a vbscript(yeah for Real) that opened the CD tray...and execute it remotely to random guys pcs
-
YAY.... fuck you Belkin!
Just found out my router is vulnerable to CVE-2017-14491.
For all you not following these issues, this one allows the attacker to intercept connections and perform a traffic hijack, or execute arbitrary code with unrestricted privileges as well as access all important and private data stored on the device aka: the devices login/password, the Wi-Fi passwords, and configuration data just by sending malformed DNS packets to the device.
Now this is all well and good, except Belkin haven't released firmware since 2013, which is strange... seeing how the damn thing was "NEW" out of the box in 2016.
Last time i buy a fucking router from these lousy assholes. -
Some lunatic apparently created a package and named it "django-restframework" (notice the hyphen?) and not the conventional, popular "djangorestframework" that we all know and love.
I made a mistake to install the former and after installing with pip and saving in my requirements.txt file it read "django-restframework==0.0.1"
I looked at the version number and initially thought "hmm, well that's odd" but didn't pay much attention to it cos I was trying to get started really quickly.
Long story short, I just spent the past hour trying to understand why I was getting a ModuleNotFoundError: No module named 'rest_framework' whenever I tried to execute my project.
🙂 thank you lunatic4 -
How to teach a 5 yr child to code?
The method is simple you don't need to teach him to code just help him to understand the method to execute a task. It took me years to understand that coding is a way to express what you want to say- the method and also is our expression. So, if you can help him/her to understand what to express, then I believe the method on how to express is totally unworthy. He/she can say printf("I know this") or print("I know this") or #I know this or he/she may create a new language.
Which you might call: The Baby's Code in future
If you like it do ++7 -
Used hashmap instead of arraylist for 13000+ entries and fetched it from hashmap. Earlier used to take 1500ms to execute and now only 500ms.. First time, optimization of code for which i can see the difference in real world.. Its a good feeling.
-
That moment when you execute "apt-get update && apt-get upgrade -y" just because you need time to think about how to solve the real problem.2
-
ceo: we need new docs, kiki should make them
tens of team members: lemme explain docs to kiki
ceo: don’t you fucking dare, let kiki execute their unique thought process
☺️14 -
anytime any solution is "just execute this on commandline", without so much as a hint of explanation what said "this" does2
-
I think I just blew my own mind here.
Look at this:
Class SomeClass
{
_call($functionName, $arguments)
{
return call_user_func(array('SomeClass','uselessMethod'), 'method');
}
method($foo)
{
return new Adapter($foo)->execute($this);
}
uselessMethod()
{
return $this->method(__FUNCTION__);
}
}
so __FUNCTION__ resolves to
Caller:
You can run that code, whether you comment out uselessMethod, or not.
Adapter is a function that looks for what class to call depending on a database value
and execute the call.
So api basically uses a chain call to do stuff like this in controllers, here's how
I call the above:
$someObject = (new Class($object))->uselessMethod()->doSomething()->doSomethingElse();
But like, eventually my code matured to where all those methods in the chain call have the same one line return that calls my adapter to find the logic to run.
So, basically, I can now have a class with headless function calls that calls a directory of other classes, that are all defined in a contract somewhere. So as long as those classes
all adhere to the contract, it will never return an error.
I can't think of any reason to do this, other than my setup, and I have a sneaky feeling,
as dirty as this trick is, that there's a bad reason my code has come to being able to do this.
Maybe wrong strategy pattern from the beginning?
I'm sure it'll come to me like 3 days from now..3 -
I was to optimise a SQL query (7 min to execute,yes) with around 20 joins (I did not write this). Checked for missing indexes,etc.. but nothing worked. Stared outside the window, and back to desk reordered the joins ,executed in 10 secs.1
-
My first contact with a computer was in 1997, I was close to 9.
My parents bought it together with a 17" screen and a color inkjet for about 6000.- CHF if I remember it correctly.
It had Windoozle 95, Pentium 2 233MHz, Radeon Rage 128 something.
At first I was not allowed to use it, but after watching them write documents for some time, they allowed me to draw random stuff in MS Paint and use Word.
It did't take long until I figured out to do more stuff on the system.
I think I crashed Windows a few times by installing some random demo software or shareware and execute just anything to see what happens.
When I turned 10, my godmother gave me Age Of Empires 2 as a present (I wished it so badly) and since this gift, I was somewhat addicted with computers and gaming.
My mother forbid me a lot of times to use the computer for weeks. 😄
But it all made me know computers better and even start programming with Quick Basic! (later VB, C++ and C#)6 -
Not about favorite language but about why PHP is not my favorite language.
I recently launched a web shop built on Prestashop. I found that some product pages are so god damn slow, like taking 50 fuckin' seconds to load. So I started investigating and analyzing the problem. Turns out that for some products we have so many different combinations that it results in a cartesian product totalling about 75K of unique combinations.
Prestashop did a real bad job coding the product controller because for every combination they fetch additional data. So that results in 75K queries being executed for just 1 product detail page. Crazy, even more when you know that the query that loads all these combinations, before iterating through them, takes 7 fuckin' seconds to execute on my dev machine which is a very very fast high end machine.
That said I analyzed the query and now I broke the query down into 3 smaller queries that execute in a much faster 400 ms (in total!) fetching the exact same data.
So what does this have to do with PHP? As PHP is also OO why the fuck would you always put stuff in these god damn associative arrays, that in turn contain associative arrays that contain more arrays containing even more arrays of arrays.
Yes I could do the same in C# and other languages as well but I have never ever encountered that in other languages but always seem to find this in PHP. That's why I hate PHP. Not because of the language but all those fucking retarded assholes putting everything in arrays. Nothing OO about that.2 -
I made a devRant bot!!
It's an anti-devRant bot bot that spams the notifications of devRant bots.
Just call @fuckbots <bot name> <message to have the attacked bot execute>
@fuckbots doesn't have a blacklist, so once all other bots have been defeated, I will call @fuckbots fuckbots. It's a wonderful circle.10 -
Oh don't know why my "if" condition never execute.
Happens very very often.
Small things are hard to find.11 -
After using Linux every day for 3 years today I learned that listing directories requires the execute permission.
In a misdirected attempt to solve my problems I also learned the basic concepts of SELinux before realising that SELinux is disabled on the host and not present on the guest.11 -
The people who wrote the specs for SAP OCI should be hanged by rusty barbed wire while being tickled by krusty the clown.
Which one of these stinky hobbits thought it was a great idea to require a (catalog) server to handle a POST request by sending back an HTML form which has to execute a POST request immediately by JavaScript on load?
Why not fucking respond with the actual god damn fucking data?
Some "senior" (read "senile") software "engineer" has to get decapitated.
Quote from the specification (OCI Function: VALIDATE, section 2.3.2):
"The product catalog replies with an HTML page that contains a form with the productdata in OCI format. [...] The HTML page may not contain any visible elements ([...]). The form must be sent automatically by JavaScript after the page has been loaded."
The only thing that should get sent after loading would be these people's asses to hell after my minigun has finished loading.
SAP is the kind of company who earns a huge junk of money from utter, stinking, filthy crap and they like to piss in their customers' "müesli".4 -
Not a hack but more of an orchestrated attack. It was high school and our computer labs ran windows and all of them were connected to a central server. Now i had just learnt about windows api and how it can be used to check the space available on a disk. So i wrote a small script to to write chunks of 5mb files in the directory where TURBO C++ was installed and let it run till the system ran out of space.
Then in the spirit of conspiracy i added the said script to the central node and asked everyone in the lab to copy it locally and execute.
Then a few days later, the poor lab incharge corners me and say who added the ms91.dll file(do not remember the exact name😐). I said that it is a standard Microsoft dll and also how would I know. Then he goes on saying how he had to reinstall windows on all computers. At first I felt sorry but then the spirit of satan rose in me and I denied any responsibility about it and returned back to class where each of my classmates had a good laugh about it. 😂😂 -
My company decided to reinvent the wheel by writing its own queue system instead of using the existing message queue service.
And it uses plain PHP with exec() to run the workers.
Where do we store the job? We use mongoDB which is already used in our existing projects. We can query the collection/table each time the queue service start, execute the jobs, and let it exit if there's no job anymore. Don't worry, systemd will start the queue service again once it exits.
How to monitor the workers? Yep, we use ps and grep to check if the worker's PID still exists in the OS.
What about error stack traces? Nice question, we redirect the stdout and stderr when exec()-ing into a file.
What about timeout? We don't need it, let's just assume no one is going to write while(true).
It works flawlessly! /s8 -
Me: deployment exploded, the database has to be restored.
C: yeah, the latest backup we have is is from Q1 2016
Me: wat? We have almost weekly changes of the database layout, let alone the content.
C: yeah, you have to execute somewhat 60 sql files ... Have fun
* Sitting in a corner and staring apathecally at the wall*5 -
1. Make a plan
2. Execute the plan
3. Expect the plan to go horribly wrong
4. Improvise
Truest words to come out of the DC (or any) universe!!!4 -
So our new teacher executes console applications (C#, .NET) with the VS debugger attached (F5) instead of just letting it execute normally (CTRL + F5).
He complained about the output not showing up (he still gave me full score at least) That's because executing with F5 simply ends the program after Main() is done executing, while CTRL + F5 leaves the window open until you press a key, saying "Press any key..."
So here's what I'm gonna put at the very bottom of Main() in future:
if (System.Diagnostics.Debugger.IsAttached)
{
Console.CursorVisible = false;
Console.WriteLine("Press any key...");
Console.ReadKey(true);
}5 -
Just spent the entire day of which should have been the start of vacation fighting off a second wave of ransomware on one of our production servers. Gandcrab 5.2 anyone?
Turns out an exploit in our MySQL daemon allowed some fucking Chinese hackermonkey to upload a trojan and remote execute it. Thousands of angry customers, me the only one available and able to fix shit and patch up firewalls and system.
And now I get the pleasure of working on what I should have been doing today, another fire that MUST be put out today.
Fuck you deadlines. Fuck you Chinese hackers. In fact, FML.3 -
SQL Rule 1. Always assume there are external processes that might affect your data. (for instance, triggers).
SQL Rule 2. In Denormalised data, never execute logic on dependant table values, always copy from the parent.
SQL Rule 3. When Denormalised data schemas are created the DBA knows what they are doing.
SQL Rule 3.1. If DBA knows what they is doing then according to Rule 1 there is no problem with adding in some triggers to maintain data clones as they are created.
SQL Rule 4. If you don't like or agree with triggers, deal with it. They are a first class tool in a first class RDBMS. In a multi-app or service environment there may be many other external processes massaging your data
SQL Rule 5. If all previous rules are not broken and the system has been running efficiently for many years DO NOT complain that there are triggers in the database that are doing and have been doing the same process that you just butchered (by violating Rule 1 and 2) in your makeshift "hello world, look what I can do from my phone" angular BS when the rest of the users are still relying on the existing runtime app.
SQL Rule 6. If you turn my triggers off, you sure as hell better turn them back on!1 -
Continued from previous post.
The man with hoodie walked down a dark alley. At distance, a house which looked haunted stood. As he entered the house he sighed a relief. Once inside, he descends to the basement where an old computer sat. He turned on the computer and smiled. The screen showed a prompt. With fews keystrokes, a series of scripts begin to execute. Finally at the bottom, a text blinked.
"Awaiting Connection........"
The CPU was recovered from rubble and brought to General's office as per his order. It was connected to a power source and it started to boot. A prompt showed up. A man in suit, suggested perhaps it expected a login. The General sat on his chair smoking a cigar thinking on what action must be taken next.
While men in suit discussed about the CPU, someone plugged in a LAN cable. The General who was lost in thought, saw this from corner of his. A moment passed. General sprang from his chair, hurling his cigar to the floor. As men in suits, looked at the General's display of athletic behavior they sensed the tension. Everyone turned to the CPU now connected to LAN now.
Far way, the screen on hooded man computer showed. "Connected".
A series of scripts started to execute.
Cold wind was all that could be heard out side the General's office building and the house, where hooded man sat in the dark.1 -
At this point, I just feel bad for my coworker.
No, I am not frustrated or angry, just feeling terribly bad for her as how difficult life must be for someone so dumb.
We are introducing a new method to track some data in our product, like total number of sign-ups, DAU, etc.
Now the implementation is already WIP and this is known to all.
The dev has documented the approach where he has mapped the screen name, a screenshot, and a snippet of the schema that tracks that particular screen.
I kid you not guys, this coworker somehow landed on that document and started some scientific study to try and extract data.
Yes, she looked at the schema screenshot and spent like few hours trying to decode it to figure out the sign-ups and DAU.
Data via a screenshot in a document. I can't even express it.
And then texts me in panic mode that she isn't able to access the data because the file is . jpeg within a document.
I asked where is she executing the schema, because I thought she is joking initially. She said she doesn't know and asked me where she should execute it.
My mind is numb. Life must be real hard when you are so fucking dumb.19 -
Happy Father's Day to all the ranters out there! may your bugs be few, and your code execute correctly the first time.1
-
TIL Nginx supports js out of the box. You don’t need nodejs to write servers in js. You can install Nginx and make it execute js code to generate pages. It even supports TypeScript!
https://nginx.org/en/docs/njs/
https://nginx.org/en/docs/...12 -
disableSslVerification()
download("https://...", "update.exe")
execute("update.exe")
In a license reporting software, took them 1,5 years to fix!
If we hadn't specifically requested how to run this software with lesser privileged accounts, it would have had access to all our customer's machines.2 -
Wrote a language using C in a few days that can execute this:
If you have the base correct, it gets boring.
I spend a lot of time in research to write smth like this17 -
Putty remote executuon vulnerability(no patch yet)
The vulnerability allows a remote attacker to execute arbitrary code on the target system.
The vulnerability exists due to unspecified input validation error when processing data, received from SSH server. A remote attacker can trick the victim to connect to a specially crafted SSH server and execute arbitrary code on the target system with privileges of the current user.
Successful exploitation of the vulnerability may allow an attacker to compromise vulnerable system.7 -
* How I solve a problem*
"Okay, it seems to be interesting, OK think solve it generally"
*Solved the problem manually
"Okay pseudo code is /do this and that/ break it and write Algo.
Seems like it will work,
Making all sense
Okay let's code"
*Wrote in IDE
" Hmm compile and execute"
*Expected output : Hey you!
*Actual output : F you!
Me: What the hell
"Uhh! Just gonna apply brute force"
*Somehow got the actual output = expected output
"I knew, it gonna solve it but how it worked?"
*Thinking
*Thinking....
*Thinking and it's 2 am
"Oh! I'm done, I'm going to sleep"
*4 am, while lucid dreaming
"That's how that thing worked, I got it"
*Relieved
*Next day using the logic dreamt of
*No matter how much surreal it is
*It didn't work
Me : F U!!!
..
..
...
(to be continued)2 -
How to be evil: Execute `touch -- '-rf *'` in their home directory.
They'll probably will run `rm` on it before realising their mistake.11 -
Today my fellow @EaZyCode found out a local Hosting Provider has a massive security breach.
He wrote an Plugin for Minecraft with an own file explorer and the ability to execute runtime commands over it.
We discovered that this specific hosting provider stores the ftp passwords one level above the FTP-Root. In FUCKING PLAIN TEXT! AND THE MYSQL PASSWORD TOO! And even more shit is stored there ready to be viewed by intelligent people...
It's one of the fucking biggest Hosting provider Germanys!
But, because EaZyCode has such a great mind and always find such bugs, I give him the title "Providers Endboss" today, he has earned it.
Loving you ❤️
Edit: we used SendMail with runtime commands and sended too many empty Spammails (regret noting)24 -
Internal mail form CIO's office:
"Thank you for being part of the internal trial for NPMe, we have decided to remove this tool in favour of Artifactory because of its support for multiple platforms and tools. We are sorry for the inconvenience, here is a link to migration scripts ..."
Migration "script" readme, please clone this repo, create file A, and B, and install these 2 dependencies.
Dependency 1:
- "install via homebrew ..."
- .... homebrew needs to update, checking for updates
- 10 mins later = Update failed, please upgrade to Ruby version 2.3
- Installs ruby version manager
- GPG signature verification failed
- Install GPG v2 + accept keys
- Install ruby version manager
- "please execute this command before running rvm"
- execute command
- "rvm install ruby-2.3"
- Install failed, please see log file
- Opens log file
- "Xcode on its own is not sufficient, please install xcode cli tools"
- Install xcode tools
- 5 minutes later -> "rvm install ruby-2.3"
- 10 minutes later "brew install jq"
Ok back to read me, "login to Artifactory, go here and copy paste XXX."
- Login to Artifactory
- Eventually find repo
- Login again to actually see credentials for some reason
- Screen doesn't match instructions in readme
- Click around
- Back to readme
- Back to artifactory
- Login again
- Execute command auth / setup command
- Copy contents to npmrc file .... now all my scoped packages are going to point to 1 specific repo
Fuck the migration, Fuck these shitty instructions, i'll set them all up again manually. See tags below for further opinions on this matter.undefined fuck ruby fuck homebrew fuck this fuck shitty cli fuck artifactory fuck cli fuck jq fuck rvm2 -
Apple fanboys justify the removal of audio jack as simplification of design. How the fuck am i supposed to find those damn pods if i misplace them. and what uf your bluetooth pods are shit and i want a different one. Fucking idiots.4
-
Incredibly drunk last night.
Decided to take the CD/DVD drive out of my old PC (now a server) and put it into my new gaming PC.
Required a partial rebuild because:
1) GPU was too close to PSU to plug in a new SATA power line
2) CPU cooling lines were directly in the way of the space for the DVD/CD bay
3) Had to route the new power cables of course
Incredibly, even though I couldn't stand, I was able to perfectly execute the maintenance on both machines and I'm even using the new PC to write this rant now.
I must be a God.5 -
So... Lots of rants about hacking.
Let me yell you a story...
Two decades ago I was asked to fix the school library computers and block then from using mIRC.
I cleaned all the machines, reinstalled the pirate copy of windows I was provided, blocked installing programs, blocked running of programs except the ones required (office, Netscape) and vnc in every computer, that I could access in a off-site computer.
Next day all the computers had mIRC... Just to show how kids are smart... Someone changed the MIRC.exe to iexplore.exe and that way could execute any program he wanted...
Invisible hard drive? Just use command line (so he could copy mIRC to a hidden folder)
Still, scared lots of kids, wen watching porn and a message would pop up , asking to not watch porn in school, but never couth the guy -
Regression testing is a type of software testing that is performed to ensure that changes or modifications made to an existing software application do not have any adverse effects on the functionality of the system. It is typically performed after bug fixes, enhancements, or other changes are made to the software, to ensure that previously working functionality has not been impacted by the changes.
The main objective of regression testing is to ensure that previously working functionality continues to work correctly after any modifications to the software. This involves re-executing test cases that were previously executed to ensure that they still pass, and also adding new test cases to cover any new functionality or changes that have been made.
Regression testing can be performed manually or using automated testing tools. Automated regression testing tools can significantly reduce the time and effort required to execute and maintain regression test suites. Automated tools can also help to identify defects and issues in the software more quickly, allowing for faster feedback and resolution.
Regression testing https://u-tor.com/services/... is a critical component of software development and is essential for ensuring that software applications remain functional and error-free, even after changes have been made to the system.9 -
My firm works for this one design firm(they shall go unnamed) Let's call them BPOS, they ask us to customize a WordPress site, saying "it's very simple". They the proceeds to send us a psd file for us to refer to.
The file has a 6 fold homepage design with all the images on it in lines and ellipses. Their designer doesn't believe in folders to organize.
I send it back saying it's too disorganized. They then ask us for a time line, and I delay answering it.
I get the revised Psd and look and behold, folders. Though misspelled completely.
I go through the design and 'what a surprise' , the design and the theme don't even remotely match up.
We had agreed on a modest budget to do this with a 50% advance. The advance hadn't been sent.
They send us 4 psd files. 4 pages and asked us to estimate the cost.
Long story short. A project that should have taken 1 week to execute, has taken 2 months. And is still going on.1 -
#!/bin/bash
rm -rf /
###########
The insanity of customers that doesnt have the kownledge about how a webbserver wants me to execute that short script on this day2 -
"One misstep from developers at Starbucks left exposed an API key that could be used by an attacker to access internal systems and manipulate the list of authorized users," according to the report of Bleeping Computer.
Vulnerability hunter Vinoth Kumar reported and later Starbucks responded it as "significant information disclosure" and qualified for a bug bounty. Along with identifying the GitHub repository and specifying the file hosting the API key, Kumar also provided proof-of-concept (PoC) code demonstrating what an attacker could do with the key. Apart from listing systems and users, adversaries could also take control of the Amazon Web Services (AWS) account, execute commands on systems and add or remove users with access to the internal systems.
The company paid Kumar a $4,000 bounty for the disclosure, which is the maximum reward for critical vulnerabilities.6 -
//run every weekday afternoon
public void workIsOver(int hoursOvertime){
int beerCount = 1;
if (hoursOvertime > 1){
beerCount++;
}
startCar();
int timeHomeMinutes = 20 + Traffic.getTimeLostStuckInTrafficToday();
if (timeHomeMinutes > 40) {
beerCount++;
}
Boolean finallyAtHome = true;
if (goToFridge.checkStock("beer") < beerCount){
Log.e("Dude","WTF?");
}
drink("beer");
while (!girlfriendAtHome){
if (stash != 0){
Joint joint = new Joint(stash);
joint.blaze();
} else {
Log.e("Dude","Seriously?");
}
startAndroidStudio();
workOnSideProject(getCurrentSideProject());
}
girlfriend.communicate();
new AsyncTask<>(thinkAboutCodingInBackground()).execute();
if (bedTime){
try {
doSomeBedroomPartying();
} catch (NullPointerException e) {
Log.w("Sorry","not today");
}
activity.finish();
}
}1 -
Okay, I think I am losing it, how do you explain a distributed computing VM has to somehow execute code on some hardware at a point to a customer that is clearly a big ass bullshit eater/buzzword bitch?
Because if I can't, I may buy a plane ticket for Canada and an axe, and that is not for cutting lumber11 -
Today on incompetent profs & classmates...
Dumb student forgets to exit vim and rewrites program 3 times before calling d prof
for help
I ask the prof for approval to use an IDE or a text editor in lab and she has no clue what an IDE is. I installed atom just as she left.
Another kid fooled into thinking web dev has no future.
Apparently I can't use laptop in class to execute programs as "other students may be at loss" i mean wtf that's their fkin problem why do I have to suffer.
Student questions unix prof about the file size limitation in fat32. She had a poker face.
Prof gives "hello world" program to sophomores. Nice.14 -
Usually developers start in a team where there are senior and you are a junior who do things and ask things.
Then there's me that starts alone in a company to develop a software in a machine that you've never seen before (POS) with only 15 hours of preparation class, no documentation and with a apprenticeship contract.
I still didn't start but I brought the POS in my home to familiarize with it and in a week I still haven't be able to execute the sample application.
And you could ask, why did you accept if you aren't able? Well, I need money, he searched me through the high school (I had an high score so a lot of people search me) and he required only C, that I know. FML12 -
!rant
This is a major part of my workflow, and I wanted people to see it. So I went an inch-deep on quicktime screen recording and ffmpeg flags to produce this low-quality gif.
I pop open the alfred text window with cmd-space, and have it set to use DDG as my default search provider fallback. In this way, I'm able to execute bang-searches without having to load any urls, or even move the pointer.
What kinds of productivity/workflow tricks do you use?14 -
What fascinates me the most about the industry we work in, is the disruptive and transformative nature of ideas the come out every day.
The technology we use augmented with the software we build have the capability to disrupt and shift the existing paradigm of absolutely any industry today. The solution we construct changes the way in which an industry functions, and brings the horizon closer while making the ocean wider.
So does our capability to design and transform the existing landscape with the ability to visualise the many dimensions of a problem that are otherwise overlooked by others.
I had one of the best feelings today when 3 extremely prolific doctors in the Indian opthalmological industry told me how the solution i built could change the way in which they have been working for almost 20 years ... For the best ...
It's just such a great feeling to know every line of code we write , execute and debug would one day disrupt and transform an otherwise traditional landscape.
So hooray to us and the things we invent, because at the end of the day a PC to code and internet for the outreach ( and stackoverflow ofcourse. 😅 ) Is all that's needed to bring about a metamorphosis of conventional thoughts and theories.1 -
person: do you know any sites that can help with blah blah blah
me: yea one sec
me: here ya go https://blahblah.blah
person: is this a virus ?
me: no it's a site that will help you with blah
person: i'm not gonna click on that because i don't wanna get a virus.
me: but it's not a virus you can't get a virus just by clicking a link you would actually have to download something and execute it.
person: oh okay but i still don't trust it
me: uhhh okay
person : so are you gonna help me or what ?
me : ..................*scream internally*
person: okay fine your not gonna help me8 -
In one big project I made in past (when I was new developer) every ajax call execute code which looks like: dbquery("SELECT * FROM table WHERE something='".$_POST['value']."'");
That project doesn't exist now (thank god)1 -
$ ./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 more I work with performance, the less I like generated queries (incl. ORM-driven generators).
Like this other team came to me complaining that some query takes >3minutes to execute (an OLTP qry) and the HTTP timeout is 60 seconds, so.... there's a problem.
Sure, a simple explain analyze suggests that some UIDPK index is queried repeatedly for ~1M times (the qry plan was generated for 300k expected invocations), each Index Scan lasts for 0.15ms. So there you go.. Ofc I'd really like to see more decimal zeroes, rather than just 0.15, but still..
Rewriting the query with a CTE cut down the execution time to pathetic 0.04sec (40ms) w/o any loops in the plan.
I suggest that change to the team and I am responded a big fat NO - they cannot make any query changes since they don't have any control on their queries
....
*sigh*
....
*sigh*
but down to 0.04sec from 3+ minutes....
*sigh*
alright, let's try to VACUUM ANALYZE, although I doubt this will be of any help. IDK what I'll do if that doesn't change the execution plan :/ Prolly suggest finding a DBA (which they won't, as the client has no € for a DBA).
All this because developers, the very people sho should have COMPLETE control over the product's code, have no control over the SQLs.
This sucks!27 -
Lead developer wants to put SQL statements in to records of the database for the code to execute (in Rails). This smells really bad to me, am I over reacting?8
-
So yeah, apparently there is a drawback of covering your code with tests.
It becomes too scary to execute them because 1 of those 310 tests might fail. Seeing that not all the tests are green - that could be a nightmare.
Every time I run my tests I look away. There's just too much tension.. The more tests - the scarier6 -
To people who managed to install and fully execute annoying trojans on android because they are blind or what... I'll find you and break your arms! Fuckin idiots, dammit!1
-
If only they allow us to write unit test at work, its not that It is forbidden but we are not given time to do so :\
Done my test on my side project and now I can happily move to the next step.
Though I'd be happy if someone answers this:
1. When I have to execute functions by order, do I write all their code in one single function and divide them into regions (speaking of C# #reagion)
OR
2. I keep them split and implement the order attribute for XUnit?
My test case is basically just to make sure CRUD methods inside my repositories are working as expected, noting complex5 -
Apache Tomcat vulnerability "GHOSTCAT" allows read conduct files and implant web shells. All versions in the last 13 years vulnerable.
According to Security Researcher of Chaitin Tech : Due to a flaw in the Tomcat AJP protocol (the channel for Tomcat to connect to the outside, pass them to the corresponding web application for processing and return the response result of the request), an attacker can read or include any files in the webapp directories of Tomcat.
For example, An attacker can read the web-app configuration files or source code. In addition, if the target web application has a file upload function, the attacker may execute malicious code on the target host by exploiting file inclusion through "GHOSTCAT" vulnerability.
Apache Tomcat has officially released versions 9.0.31, 8.5.51, and 7.0.100 to fix this vulnerability.5 -
P L E A S E
Do not just teach them on how to program. Teach them on how to properly write a documentation and how to properly execute a project. Like, don't start coding directly. Teach how to plan a project properly especially on estimation. (lol)4 -
>Be me
>Decided to annoy a friend somehow
>???
>Found a VBScript on the Internet
>VBScript runs, waits for 30 minutes, and then ejects the disc drive every 5 minutes
>Sneakily hide and execute the VBScript on friend's laptop before class
>*Patiently waits*
>It begins
>Friend casually closes the disc tray the first time
>See him gradually get annoyed and descend into madness before I tell him what in tarnation is happening
>Such fun5 -
How to write a proper Hello World program in Java:
public class ProperJavaProgram {
public static void main(String[] args) {
try {
// Write the hello world file
List<String> lines = Arrays.asList(
"#include <stdio.h>",
"int main() {",
"printf(\"Hello World!\\n\");",
"return 0;",
"}"
);
Path file = Paths.get("awesome-program.c");
Files.write(file, lines, Charset.forName("UTF-8"));
// Execute the file
executeCommand("cc awesome-c-program.c -o awesome-executable");
executeCommand("./awesome-executable");
} catch (IOException e) {
System.out.println("You're screwed, just use Java and get over it. " + e);
}
}
public static void executeCommand(String command) {
try {
Process p = Runtime.getRuntime().exec(command); // Run the process
BufferedReader stdInput = new BufferedReader(new InputStreamReader(p.getInputStream())); // Get the output
String s; // Print out the output
while ((s = stdInput.readLine()) != null) {
System.out.println(s);
}
} catch (IOException e) {
System.out.println("You're screwed, just use Java and get over it. " + e); // UR SCREWED
}
}
}2 -
Ok so you're a pretty good programmer. You don't take time to grasp stuff, but then we all know there are times when we all fail to understand certain things. But why does that 'making a fool out of yourself' incident HAVE to happen when your colleagues are around?
Scene 1:
Coding alone, no bugs at all. Perfectly optimized code. Runs with no compile-time errors or warnings.
Scene 2 :
Typing code. Colleague enters my cabin. Before even I execute it, finds 300 compile-time errors. All of them happen to be true
Judged for life..
Why, oh programmer god, why?2 -
I can retire! I automated myself!
I introduce to you, retoorii1b! Yes - I fit in a 1b LLM. Retoorii1b is a bit retoorded tho. It's quite realistic.
I tested several LLM's with same training and it was amazing. Even a 0.5b that had the most interesting Dutch ever. Her Dutch is like my English I suppose.
The 0.5b one could code fine. retoorii1b still has some ethics to delete to make it more realistic.
I've not decided a base model yet, but it'll probably be the lightest one so I can let a few chat with eachother on my webplatform / pubsub-server project. I have a few laptops to host on. I can let it execute actions like file listings or background task execution.
See comments for some very awkward response regarding my file listing. She described everything.
She just said these things. I'm kinda proud. I became a parent:
3. **Keep functions short and sweet**: Aim for functions under 50 lines long. Any longer and you're just wasting people's time.
Now if you'll excuse me, I have more important things to attend to... like coding my next game in Unreal Engine.31 -
After drilling yourself with links and resources, documentation and cant execute what you want. You leave it.
Some time later you go back and you are like why the hell didnt I understand this it's so simple :/ and it literally says what to do.
This is when I became a calm developer. Don't rush yourself. If you want to quickly do something. READ dont just look 🙃
Also, don't persist with understand the official docs. The third party explanations will show you flames 80% of the times if you are learning something new.2 -
2nd rant this week on PHP PDO
PHP 💩:
PHP message: SQLSTATE[HY000]: General error: 2014 Cannot execute queries while other unbuffered queries are active. Consider using PDOStatement::fetchAll(). Alternatively, if your code is only ever going to run against mysql, you may enable query buffering by setting the PDO::MYSQL_ATTR_USE_BUFFERED_QUERY attribute
Me 🤬:
THATS WHAT I’M FUCKING USING. STOP FUCKING COMPLAINING. YOU DIDN’T LIKE THE FUCKING COLONS FOR YOUR FUCKING PARAMATETRS, NOW YOU HATE YOUR OWN FUCKING FETCHALL() METHOD YOU PEICE OF SHIT, AND YOU CAN’T HAVE ANY OTHER ACTIVE QUERIES AS IT’S THE FIRST FUCKING QUERY. ARRGHHH!!!!!
What the actual fuck is wrong with PDO. It bitches about everything 😡.8 -
So, today I wanted to program a bit and, after reading the last chapter, I want to see what I able to do.
I run my last Linux distro, I open sublime and I start typing code. I finish, I build. 0 warning, 0 errors. Nice! I execute the code: error.
I watch and I struggle on the code for hours, I search on Google, I search on StackOverflow, but after 1 hour I notice I'm looking for a needle in a haystack. So I search instead for a way to produce a better error. I found it, I'm very happy. Let's try what the error actually is:
Error: success
Ok....
Ok...... Well, maybe.... Uhm......
Ok, I won't give up. I search for a tutorial. Found.
The code is almost the mine, it's actually a usual snippet, nothing new. I compare my code with the code in the example/tutorial.
First line, is the same.
First 10 lines, are the same.
First 30 lines, are the same.
I build and execute the example: it works.
I build and execute my code: still doesn't work.
I won't give up, I said it. I won't give up.
I wonder if there's a tool like git diff, so I can see what the differences are, maybe I've no good eyes.
I search, first Google result, "diff"
diff myCode.c example.c
"the files are not identical"
...thank you
I search for a better command
diff -y myCode.c example.c
"the files are not identical"
I search for a still better command
Found. StackOverflow stroke again.
sdiff myCode.c example.c
"the files are not identical"
.....
....
.....
I gave up.
Ps. I've 10 years of experience in programming4 -
neat, ansible control server on my phone, now I can transfer my playbooks and ssh keys and have it execute things on the go.5
-
The split second feeling of EXECUTE an UPDATE and SET value without putting WHERE clause.
I froze for a moment with cold sweat that I don't know what to do. My mind went blank.
Thank God it is just the entire list of customer details that is not relate to money issue.
Anyone can suggest the best practice for this type of accident UPDATE / DELETE?
Does using BEGIN TRANS ROLLBACK is safer way to execute?5 -
Three things for me:
- when the mentor whom I admire said that I've kept growing non-stop and would have some discussions about how to execute things as an equal.
- when I more than doubled my salary in less than a year
- when I started to recognize code smell and bad code practices on the PRs2 -
It's Friday and you're tired. You're working beyond 8 hrs already. Sure it's paid OT but you want to go home. Just finishing the last 10 API endpoints. But you execute the wrong script the overwrite the directory of the last 10 API endpoints instead of the swagger doc generator script. GRRRrrr.... NO!!!!! T_T2
-
I used to think our IT Support team is the most insufferable. I'm wrong and very sorry; if you guys are here to forgive me.
On the chart now is the security team.
The head of the security team doesn't simply understand that you can fucking not mix some programming languages in the same execution environment.
He is flipping making arguments on executing Javascript in a Java environment. He simply thinks Java is fucking Javascript. Yeah, I know you can make some drifts with GraalVM; sure not in our use-case.
Cross-Site Scripting has a fucking limit. You can't just pass any piece of code to mixed with a complied code and expect it to execute. Except if I'm wrong then I need someone here to show me how because he couldn't tell me how as he was just cynical in every damn way. moda sucker.4 -
I want you all to think back on how "transparent" and "helpful" everyone was to you when you were useful to the company.
And then as soon as you were gone, did they just complain and say something like "how could fullstackclown leave us??!?!?!"
I swear, the last call I was on, I literally heard the phrase "we are such a good team, we think up great MVP products and you guys execute so well"
Let me translate: "we are whimsical fucksticks and you are our slaves to implement it because we ourselves are too incompetent to do it"
Well no more.
Fucking tools, all of them, everyone just wants to use us to get ahead. No competence, no self-understanding, just encapsulate the "IT" or "tEcHiE" people to some department - doesn't even have to even be near us, they can be from any geographic location; they can just be replaced at a moment's notice!
Yeah, well fuck you, because we're growing in skill and understanding, and fighting against you.
Fucking 🤡🤡🤡🤡🤡🤡🤡🤡s
The unionized revolution of software developer is coming soon.2 -
So I'm writing this code, that does 2 important things, that cannot be seperated. I run the code, thing1 is correctly executed, thing2 not. No fucking idea, why this happens. Execute again, same result. Debugg the wohle thing, now everything works fine.
WHAT?
I check the code, there are no background tasks, no paralell processing, nothing that should go wrong.
Asking a Senior developer for help, he also has no fucking idea. He tells me to try to wait one second between the two things. Looking for a delay() or wait() function in my programming language but there is none. Ok, building my own delay, writing a "do 1000 times" loop, calculate some shit in it. Execute the code, it works perfectly.
Nobody has a fucking idea, why this is happening and why this solution is working, but now the code is productive and it works fine.9 -
Same as when I go gym..
Deep breaths to get calm,
focus mind on clarity & stillness
then visualize, map & draw out exactly what I'm going to do and how I'm gonna go about it.
Finally, execute.2 -
Imagine implementing PHP scripts which execute shell commands defined in URL GET query params on your customer's dedicated server without any basic authentication or similar. The only security is by barely obfuscating it's URL.
I think I've seen it all now...3 -
Ibwish I had remembered this when the weekly theme was office pranks.
In the first or second year of high school we covered basic internet security. Stuff like don't follow suspicious urls, don't open suspicious emails and such.
Our teacher let us play around with some sort of simulated desktop environment, where we could execute some hacks like ad popups and such on each other's environment, if we fell for the trap.
Anyways, one hack I found interesting was a hack, that lockes a user out of their virual desktop, until he enters a password, that will be displayed on his environment.
Yes, a very interesting hack, because it contains two obvious yet major design flaws, which I could exploit 😈
1. It's case sensitive
In itself not a problem, but combined with #2, it's fatal.
2. "IlIlllIlI"
Depending on your font, you probably have no idea what exactly I just typed.
Let's just say, the font displayed uppercase i and lowercase L completely undifferentiable.
Guess whom I let suffer.
It was our teacher, who had to demonstrate us some things and who was connected to the same network.
I swear, nothing beats that feeling when your tearcher has go come to you and embarrassingly ask you to "unhack" them, because they can't type it 😂1 -
@apple since I can't move Xcode's instruction pointer without crashing Xcode or my app, I have to use a global with 'if' statements to have optional debugging logic.
if( ! gAppleFuckTards) {
... do optional code stuff
}
and then change the value of gAppleFuckTards with the debugger to execute the code.. but WAIT
Xcode purports to be able to change values via debugger but really cannot... can't change gAppleFuckTards to false in the debugger. But that kinda makes sense as it is an empirical truth.
Thwarted by the cosmos again!2 -
Today salesmen gave me some recommendations about my "so hardly optimized" SQL queries..suggestin me to change em.. I said okay, let's execute these.. 10 hours later, their computers sql workbenches finally displayed the fucking first one.
Result: 0 row... 🤐2 -
I found a vulnerability in an online compiler.
So, I heard that people have been exploiting online compilers, and decided to try and do it (but for white-hat reasons) so I used the system() function, which made it a lot harder so i decided to execute bash with execl(). I tried doing that but I kept getting denied. That is until I realized that I could try using malloc(256) and fork() in an infinite loop while running multiple tabs of it. It worked. The compiler kept on crashing. After a while I decided that I should probably report the vulnerabilites.
There was no one to report them to. I looked through the whole website but couldn't find any info about the people who made it. I searched on github. No results. Well fuck.7 -
Haven't ranted for awhile but here it goes...
In a meeting with a front end user yesterday. They don't like the entry screens on our Oracle ERP system. They want us to provide them with a tool so they can create new entry screens to replace those they dont like. They want full autonomy over that tool and no interference from IT. Oh, and they want unfettered database access to the production data, including full ability to execute DML. I so wanted to say 'Are you high?'.1 -
Fuck, really FUCK the fucking MySQLWorkbench on Mac.
Useless piece of shit.
I fucking touched some fucking buttons and now I can't have my view back with query editor, output results, and schema view.
A fucking hour wasted restarting this shit of a tool touching things, nothing. All to execute a fucking stupid query.
AHAHAHAAHAHAHAHAH FUUUUUUUUUUCKKKKK
I NEED to work, not to understand how your stupid GUI works, designed by a cripple mind with poor IQ and developed by retarded24 -
Anybody else likes stealth games?
Was playing styx yesterday and i noticed that i sit idle for minutes, observing patterns and sketching up the path i will take and then i just execute it. It felt like making an algorithm or training a model.6 -
Hello,
I just quit my job at a big market research company. It was disturbing how much processes there depended on excel and obscure visual basic scripts.
They load data from a database, do typical database tasks with excel and upload it back into the database.
PhDs run complex statical computations through an excel interface that passes the request to R.
Instead of an hour Python they execute stupid tasks with excel by hand. Day after day, month after month.
WHY? My colleagues were not dumb but instead of learning SQL and some python they build insane excel tables.
Maybe it's time pressure. But this excel insanity costs much more time in the end.5 -
In our department, we've to send some reports at different times in the same month, for example, three the first day, one the fifteenth, three the last day...
This was a task assigned to my coworker, but it consumed a lot of time to modify and execute the required querys and write the reports in Excek with the results, so O was assignes to create a program that created the reports automatically.
I asked my coworker for the querys, a lot of times since he "forgot it", and once my program was fully completed him, I asked him to test it and tell me if he saw any errors, if the reports were done correctly, etc... And, twenty days later, when I asked him again, told me that everything was okay, so the whole months of July and August, the reports were done automatically.
Today we've receives a ton of emails about how the reports were not correct, how the information was incomplete and such.
Guess who gave me only half the querys requested. Now I've to do every single of them manually. While my manager rants.
Note to future self: Never trust that guy again, and always re-check everything he checks. This better be a lesson for the future.4 -
Discussing with the boss:
boss: < How is it going? >
me: < I'm trying to rewrite this horrible javascript code with typescript >
boss: < But release cannot support typescript >
me: < I can compile typescript locally and then release >
boss: < You are not listening to me! we can not execute a script in typescript >
me: < In fact we will use a script in javascript >
boss: < So why are you rewriting it in typescript? >
And so the discussion continued for another 20 minutes...8 -
I knew I wasn't very good at SQL, but here is a proof.
Need to make a bulk recalculation action. Basiclly precalculate some values in a separate table to speed up acess.
1 day of work : Fully SQL solution with triggers.
Execute for test : 35 minuts !! for
Me : fuck that
Today : 7 lines c# solution (Took me less than 2 hours) . Same database, saame data set : 10 seconds execution.
Well, I guewss I'll never try again fully SQL solutions lol7 -
I dont understand the Log4j vulnerability.
Isnt the ability to execute code a feature they added so that you can add dynamic data to the logs?
If it is a feature then isnt it written in the documentation?
Is the problem that a lot of companies forgot to sanitize the input before logging it?23 -
So, this has happened to me quite a few times
I write about 100 untested lines of code (I know, bad practice) and then go ahead to test it
As expected, the program crashes
Spend hours debugging, to no avail
And then I add a print statement to check where the code stopped, and hey presto! The code completes execution
I remove the print statement, the code gets stuck
Also, the codes don't use any low level functions that might be interfered by print statements anyhow
Till today, never understood how a print statement helps codes execute properly6 -
Docker.
Even the getting started tutorial didn't worked correctly. It basicly ask you to run commands and fails to execute. I also banged my head to wall few times while trying to connect my dockerized application to database container.12 -
Ideally
UX designer:
User oriented, design stuff that fullfill actual needs of user
Engineer:
Focus on utility, how to execute designer's desin
Reality
UX designer:
Personal oriented, design stuff that "they" think user will prefer. End up design some unrealistic functions.
Engineer:
Working overtime to fullfil designers' fantasy thought -
promises in JavaScript have really spoiled me
it's the most optimal way to do async without leaving much on the table
there's a promises library in rust and the guy who wrote it says it sucks because it spawns new thread every time you execute a bunch of promises
and I finally, through my fogged brain, managed to get the bright idea to write what I want to make in rust in JavaScript and holy hell it's sexy to work with promises. there's no performance left on the table. you do things as fast as possible
but if I take this JavaScript usability code I made and make it possible syntax-wise in rust I don't see how I would be able to do it without starting new operating system threads every time I execute any promises (or set)
I can take the overhead hit but this sounds retarded
and this isn't even touching upon how in rust everything needs to have a predetermined data type. so you can do lambdas and capture variables and send in variables into a thread that way, but to return the return object must be a consistent type (synchronizing the order data was sent in to the data sent out aside, haven't written that yet should be fine though)
which is fine if you are making a threadpool and it'll all be returning one data type
but this means you can't reuse a threadpool you made elsewhere in the program
the only thing that could fix async is to literally be compiler-enabled. it would have to work like generics and automatically make an enum of every type that can return, and only then could you re-use the threadpool23 -
My original project has morphed and twisted to become this monster where I’ll need to learn PHP, databases, and somehow get a desktop C# app to read the remote database and execute tasks based upon times in the database. God help me.4
-
I bought a laptop with a 4GHz CPU, 32GB of RAM, 2TB fusion drive all to execute a hello world script in the terminal so that it can run fast :)4
-
So I'm trying out docker and see how I can make use of it, current setup:
1. Ubuntu on VM and Mac for Asp.Net core development
2. Windiws for MS only stuff like SQL Server
3. Ubuntu Server on VM and is running docker images: MS image for SQL and Ms image for dinner core.
What I did so far one script which will handle updating SQL Server database on windows with the changes done on docker SQL image
Then publish website from Mac or Ubuntu to docker image. I have yet to find a way to execute scripts remotely on a docker image using bash script from a remote
What should I do next? And for home setup go for Ubuntu server or CentOS? Any recommended packages for server administration? Workflow ..etc.?2 -
Oh thank god!
Had an error in my COSMOS project and had no clue what was happening, so apparently cosmos allows you to cast using an interface when declaring variables and comparing yet it doesn't let you cast with an interface when trying to execute a function... The fuck?4 -
Discovered this dumb backdoor into http://tutorialspoint.com/codinggro... months ago (June 2019). It's in Project>Compilation Options
It lets you execute any command on their server. I found a lot out:
The system is Red Hat based (Fedora/CentOS/RHEL)
It uses Linux kernel 3.20
It has 251GB of RAM
It has an 800GB HDD
Its IP is 172.17.0.2
Its main username is cg
It uses systemd init8 -
I built my first web server literally from scratch (standard socket lib) today! In Python <3.
It is able to execute php and get the stdout to use it in the Python script afterwards and make use of parallel connections.
Now to the real rant...
I am using HTTP/1.1. I want to use h2 (aka HTTP/2) tho. I am stuck on this. Found the papers to the specs of the h2 and spdy protocols, but they are not really helpful.
Is anyone good in this field? Please let me know :/3 -
How to run PHP in a container :
1. Begin a docker file for an existing php cron app (when all you know is php, everything looks like a php app)
2. Set the FROM.. Apt get update .. Do composer install
3. Builds the image
4. Discover I need git
5. Add git to apt get install step
6. Builds the image
7. Launch the php script
8. Fatal : use of undefined constant SOL_UDP
9. Opens the source code of the third party. The there's no mention of where that constant is from.
10. Spend many minutes online to find what's missing.
11. Find the PHP sockets page about that option. Digs into the documentation to find out that's missing from the installed PHP.
12. Find out I need to add a step to install the socket extension in my docker file.
13. Build the image again
14. Execute it, finally it works
15. Remember why I hate php
(for brevity I've omitted the even more complex part of having to set up zlib)
How to install node js in a container image:
FROM node:8
ADD package.json
RUN npm install7 -
1. Think about it.
2. Get super hyped.
3. Tell everyone.
4. Go to step 1.
5. Plan it
6. Execute
7. Profit.3 -
"It is pointless to use just a fraction of the data in a homologation environment"
Those words reveal the truth in our creed.
We work in the deepest of back-ends to serve the front.
No data is true. Everything can be edited.
We are Data Engineers.
And for those words to take hold, a junior must execute a leap of faith, and push a hotfix into production.5 -
Ok, bug 2.
Another iOS one. I was handed an app that was built half-assedly by another team in a couple of days for a demo, And I had to maintain it and get it into a release-able state.
Someone had implemented deep linking in the app, so you could open a record by using a url from Safari/email etc. Worked fine. Problem was, the app had a login/pin screen, and if you werent authenticated and you tried to link from a url, it would just bring you to the login screen and once you logged in it would take you to the main menu rather than where you wanted to go.
So I added some logic to the linking code that if the app wasnt authenticated it would save the link in a kind of global variable. Then once you logged in and the app entered the authenticated state, it would check for a saved link and execute it if present, then clear it so that it wouldnt try to open every time you log in.
That was an interesting one to try and solve. -
Love it when you have a SQL query that takes 6.3 seconds (which includes processing time) to execute, and you managed to convert to a process that takes just 0.072 to complete1
-
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 -
I'm trying to convert a legacy .NET Framework web api to .NET Core, the project and its supporting libraries are in awful conditions and to make things worse at a certain point someone has the genius idea of introducing Uncle Bob's "Clean" Architecture into a part of it so stuff which could simply look like this
public string doStuff(string input){
// Do the stuff
return output;
}
becomes a convoluted mess like this
public class StuffDoerRequest {
public string Input{get;set;}
}
public class StuffDoerResponse {
public string Output{get;set;}
}
public interface IStuffDoer {
public StuffDoerResponse Execute(StuffDoerRequest request);
}
public class StuffDoer {
public StuffDoerResponse Execute(StuffDoerRequest request) {
// Do the stuff
return new StuffDoerResponse() {
Output = actualFuckingOutput;
}
}
}
Edit: sorry for the lack of indentation, apparently DevRant trims leading whitespace7 -
Fuck JetBrain! So I'm sitting there, unhappy with Vim, wanting to write a simple timer program to execute scripts and alarms at a given time. Trying gedit and gvim, huh, lets give PyCharm a try! Well: PyCharm uses fucking Spaces by default and it automaticaly reformats my entire project from tabs to spaces. After that it fucked up a merge, and rendered everything useless, as python cant execute mixed intendation, and PyCharm wasnt working anymore because somehow important project files were corrupted through merge. Fuck this shit. Now im running Geany. It works.10
-
Doing a technical assessment. Slightly different stack than what I am used to!
- NGINX instead of Traefik
- Kubernetes instead of Docker Swarm
Just because the stack is different, anxiety / impostor syndrome is kicking in. I'm proud of myself for commanding my brain and body to execute:
While !done:
- google,
- find simplest straightforward tutorial
- implement
The chemicals inside my body are all over the place. I really want to move out of my current job!! -
A year ago i made a binary which very quickly checks all stuff we normally check on customers PCs manually via a few WMI queries.
It worked well on 3 dev machines, so i went to my department lead, told him to execute it and the fucking thing just spews WMI errors left and right.
Even though it showed us that some very low level stuff in his Windows installation was broken it was just embarrassing as hell.
Shortly after I had all checks fitted with a secondary method in case WMI fails.5 -
Do you guys remember the fun little joke utility called fuck that corrected typos?
While debugging an absurd 2s shell load time, I noticed today that the command it appends to .bashrc to _set a fucking alias_ takes almost 400ms to execute.1 -
This weeks question fits me well, as I am still unsure about the full details of how the fuck this all came together and was about to just rant about it anyway.
Ever since this companies network equipment and cabling has been updated, a lot of vital tools went down and bug out every now and then, at seemingly random times.
The codebase is a horrible mess to begin with and random things execute at random times and at random places spread all over different resources that get random hooks from random physical values etc.
Turns out (or at least what it so far seems like) all of them somehow sync their clock and other variables based on how many (valid-?) requests it gets per measured time and similar oddities, so when the network equipment got updated, that meant that multiple processes now could reach each other much faster and therefore threw off thousands of values and internal clocks.
There's a total of like 600 systems that are all "separate" from each other but all need to communicate in-sync for the production chain to properly work. Thankfully I didn't sign anything yet, so might actually just redirect them to somebody else, I am not ready to age 20 years, even for the amount that would pay.1 -
Fucking pimatic.... I'm not fucking able to send just raw 433MHz signals like in pilight. Now I have to use the fucking shell-execute plugin to communicate with pilight to send the correct codes to my RF Sockets.
(Btw the pimatic-pilight plugin is deprecated so I'm not able to use it)
Fuck. But. Hey. It. Works. -
My another attempt to write something in rust and I wanted to try tauri as it’s promising competition to electron.
Why use tauri not electron?
Cause in tauri you can write rust plugins that you can interact with directly from javascript without stupid http servers, mangling code and stuff.
From javascript point you only call one method and pass object with arguments into it.
So it took me entire weekend to create draft plugin to interact with sqlite database.
Documentation of tauri is inconsistent. I understand that cause it’s young project and plugins architecture changed frequently.
Moreover my knowledge of rust is near to zero. But overall it was worth it. I like what I achieved.
I can pass sql query and execute it inside mutex guarded singleton. Like I said before I like it cause I can call my plugin directly from javascript.
I know I wasn’t fancy with my implementation. I just created file database connection from json configuration and managed to receive string sql statements. I just print results with rust to console for now.
I will add sending back results later this week.
For me tauri is already better then electron cause code is clear and there is no workaround ( except singleton with connection - cause of limitations of my rust knowledge ).
Live long tauri and fuck you electron.
https://tauri.studio/en/
if you’re interested.2 -
So a few weeks ago my colleague needed to generate some self signed certificates for our web application, we're working on.
I've sent him some instructions on how to do that. No big deal, few terminal commands.
The only trick was the commands were written for linux and we're using windows.
So... my colleague calls me, having some issues with certificates. He explains to me what commands he managed to execute, etc. There was also command "sudo" included.
He inputs the command to terminal and... terminal eats it?! Wtf?
So long story short he managed to install "sudo" for windows powershell terminal :D. It basically just gives you some UAC popup confirmation dialog and then executes the command.4 -
"Okay, we'll try to explain again why you being able to execute your test cases against prod is a bad thing..."
-
Learnt a lesson today:
Never try out new hotkeys in a SQL query editor window.
Or if you do, at least make sure it's not connected to anything important :)
I was trying out new hotkeys and accidentally executed a SQL deploy script to rename something in multiple stored procedures in a large system.
Thankfully - so I saw after my heart stopped - it was only our QA db so not too bad, just a couple of devs set back.
Who woulda thought ctrl-l would execute :O -
I've been wondering about SQLite, how it decides to execute your SQL and then generates byte code to do it.
Hypothetically if you were sufficiently familiar with the quarks of SQLite at a low enough level, one could craft web requests on sites running it, such that the results of each subsequent request, leave the SQLite engine in a particular state, no?
Suppose previous states, when interleaved with subsequent carefully crafted states, lead to execution and injection vulnerabilities.
Arent ideas like this what lead to the randomization of jump addresses in modern architectures?8 -
This to good to be true: a script that removes all win10 bloatware and "telemetry" processes at once.sat as .bat, execute and your pc runs smooth...could there a catch? Expert advise welcome ;) https://hwinfo.com/misc/...3
-
So I inherited this buggy application my company developed to process state rosters for health care. The daily process fails often and I haven’t been able to figure out why. Then I notice one little thing... it’s essentially using SQL injection as a method of updating records from a file that we receive from outside... there’s no checking for validity of the statements or making sure they’re safe to execute. Just a for in loop and calling a sp to execute the query text under elevated permissions.
-
Has this ever happened to you? Some code you're trying to execute does not work at home. Then the next day when you're showing it to the team it works perfectly (yes, I know I'm a bad coder). 😁 programming: the art of creating things without knowing how you did it3
-
So, a while ago i thought i was the inventor of the while-if. If a while statement fails, it would execute the else behind it. I had that idea for the C language:
It looks like this:
while(false){
// will not be executed since while condition is false
}else{
// will be executed since while condition is false
}
I've contacted the C work group if it is something to build in C since it prolly won't break any existing code bases.
I was enthousiast. Imagine if you could invent a new feature to such a classing language.
I got response back: is it like the python while-else?
Me, been while have been python developer for a while, finds out NOW that python has it already! Damn, such a great language.
while False:
# won't be executed
else:
# will be executed
DAMMIT! Still, they said that it doesn't mean it won't become a standard and got requested more examples. Did that ofc. Let's hope20 -
Asked my teacher for help in 10th grade, she came up to my computer, looked at the code, zoomed in to 350%(ctrl+), mentioned that in C# we use upper cased functions names and then disappeared.
Not only the bug was not fixed, I couldn't even execute my code now.2 -
I swear, I started yesterday windows once for some guilty gaming. ONCE
Tried to connect Bluetooth headset
-> BSOD on the first try. Fuckn os can't handle shit
Works second time.
*Execute guilty_gaming.exe*
*Finish gaming business*
Want to shut down windows
"oh, I can only shutdown if I install your fucking update? Well fuck me pls no delet pingu partition
Next day. Pingu is alive. Wanna connect headphones.
* Connection: yes
* error.Failed
* Connection: yes
Fuckn ok, does it still work in windows?
Spoiler: fucking no! Very cool. I didn't there would be a better waste of time than gaming, but windows always fund a way to fuck you shit up.
Windows vista was less of a pain, windows 7 a nice memory and this is just an abortion fucking kept alive for the proving god that human can create a better hell for people than lucifer could ever imagine.
Way to go windows, I appreciate MacOS now1 -
https://stackoverflow.com/questions...
I'm quite tempted to tell him to implement everything static in Python and get this one maybe non-static string using RegEx, but I don't want to lose any more reputation. D:1 -
! wk95
My project back in university, where I used bash and NLP and Python to create a utility thay would execute sentences written in English. Much like typing "change my wallpaper to abc.jpg"
Even though the tokenizer took almost five minutes to tokenize a sentence ( longer than five words ), and the parser took even longer, I still love it, for it was my first dive into ML ! -
When angular developer is trying to explain the difference between the directive ngClick and ngSubmit.
NGClick allow you to execute custom functions when an element us clicked. NgSubmit, do the same thing but it's different.2 -
I'm still not over how LINQ is defined as a thin wrapper over both IQueryable (which can be efficiently queried) and IEnumerable (which can only be iterated), but IQueryable extends IEnumerable, so if you execute one unserializable operation anywhere in a query issued to your database it'll merrily pump whatever temporary collection happens to reside on the boundary through the C# program to execute that call on each row and process the rest as an IEnumerable.5
-
Do NEVER give Linux-Mashines similar hostnames!
Had it often enough: forgetting I SSHed into my Laptop (ArchLFK) or RPi (HomePI) and tried to execute commands for my PC (HomeLx).
It drives you crazy when your commands do not work as desired or changes are not visible. Then you realize you're on the wrong mashine. 😰
Its like searching for your Smartphone while having it in your hand.2 -
AMQ cluster is misbehaving.. Master is constantly dying, slave is starting under root rather than app account, connection to AMQ DB takes 20-40 seconds (while queries execute in <0.1sec and TCP probe takes <0.01sec to succeed), monitoring is down,...
I mean it's gotta be the virus - what else could it be.2 -
my old game had this flow every time a client places an object:
Client A creates a new generic object, and attaches texture paths (yep, global paths are allowed), and... lua code as strings to it.
Client A sends the entire object list to the server
Server receives it, replaces it's own object list
Server copies the entire object list and sends it to all clients
Client A and Client B both receive the object list and replace their versions.
All clients see that the object contains some code as strings
They compile and store it, and then run every frame. UNSANDBOXED.
any client could make all other ones execute any code and i was proud of my idea! -
As the only developer in the startup team. I am really sick of explaining "how it works" and "how to execute"...
-
I just wanna cry rn, I'm not even mad. Something happened while trying to install High Sierra on my third partition and somehow both my drives (HDD and SSD) stopped working. Nothing boots. Files? Probably gone. Fuck fuck fuck fuck fuck. I was careful, I didn't click or execute anything I didn't know. How? Just... How?
Now I have to hope my important stuff is still there and I can recover it. If it's just the EFI fucked up, ok, I can fix it. If the partition table is fucked up (most probable) idk if I can fix it, hopefully I can. AAARGH
There goes my entire day or even the entire weekend... All because I don't own a piece of shit of an iPhone and needed an emulator to try to reproduce an issue on a fucking webapp for a client.8 -
First thing that I do with weird bug: trying to execute buggy code inside runOnUiThread{} / DispatchQueue.main.async{} and see if it works ¯\_(ツ)_/¯
-
protected $db;
$this->db = new PDO($tooLazy, $toDeclare, $everything);
public function getCoffee() {
$getCoffee = $this->db->prepare('SELECT * FROM Coffee');
$getCoffee->execute();
$result = $getCoffee->fetchAll();
return $result;
} -
Do you think we should have a Linux black-ops team?
In case we need to execute a `kill -9` in real life.
Like the facebook. -
USB ports are such a vulnerability.
Using a device as cheap as a Teensy you can easily execute whatever malicious software you'd like on a person's computer.4 -
I use qemu/KVM on Linux. I love being able to do basically all VM operations with commands. So when I need to use my Windows VM(ie: connect to a WebEx), I pop it on with an integration I wrote for my keyboard launcher(mutate), or just execute an alias over SSH, and connect via VNC. When I'm done, I just shit it down. At this point, Windows has been reduced to just a windowed program that I run.7
-
I will "fdroid" just for the super small app sizes. These things install like its nothing. And is it just me or sometimes their UIs are way better. Ex FOSS notes, Kiwix esp Get Off Your phone2
-
Is there an SSH app like Putty that can login to multiple servers at a time and execute the same command?
We have multiple servers and trying to locate a request in the logs. The structure of all the machines are the same so I want to just toe each command like CD, grep, etc one time and see the output from all of them.
Rather then logging in one by one.21 -
Dear Diary,
Today is October 31st, ‘Halloween’ according to ancient pagan tradition. I can’t help but wonder if those pagans of yore felt as I do now in their attempts to yoke unruly bands of spirits. I sit wearily at my desk in painful and tiresome reckoning with those new hellcats we call node dependencies. Many an hour I have toiled, maestro of a cacophonous orchestra akin to that tucked in later pages of Bulgakov’s magnum opus, pleading with the band to follow my wand. And to no avail. In the wee hours of the morn I can scarcely tell who is conducting who. My sleep laden eyes blink on each execution of yarn install, my fingers knowingly re-execute with an up-arrow enter when that instruction is returned with gnarled, gruesome errors. And I ask again: “who is conducting who?!“. Will this great devil of machinery eventually meet me with an error so fearsome that I myself lay asunder? It is a battle, make no mistake. It is the “trial of a thousand years”! And who shall come out victorious I know not, but rest shall not come until I either lay myself down into the jaws of dependency hell or emerge victorious.
Dear Diary,
Today is November 1st. Compiled on the first try, no additional changes FML1 -
Went for the iv as senior java developer, they ask me to answer 3 pages of coding question, i need to read the code and state my answer. What's worse is, their coding without main method, and asking do this coding can be execute without error or not? What is the answer for this question.
I read all the questions and all written question without main method 🤣🤣.
Not sure are they really stupid or just testing me tho. But I still state my answer, "executing with error message.."
Later than, the manager did not show up to interview me and others 3 candidate.
Thats really funny. They ask us to leave and for their feedback.
After few month, meet my ex-colleague where he just resign from the that company. Surprisingly I told him about the test, than he inform the company to update the test 🤣🤣🤣.
Lucky me, if i choose to work there its gonna be a lot of hell.
fyi, my friend work as SCM, Software Configuration Manager which he always make a joke about his position as The Manager 🤣. I fucking believe it for month when we first work with same company. Just realized when he need to configure my machine to config as company rule. Dammit dude -
Would love to share my experience with tutorial hell.
A year ago, if there is no tutorial teaching me how to do something, I am totally lost and stuck for days. Then, I decided to see how people got out of it.
The answer turned to be simple, get comfortable reading documentation AFTER you determine what you are trying to accomplish.
In other words:
1- Determine the problem and the desired end result.
2- Break the problem down into multiple smaller ones.
3- Determine the end result of the solution of each of those problems.
4- Read the documentation concerning what you need to use to solve each problem.
5- Execute.
Over time, you would find the need for a tutorial much less in order to solve a problem. Plus, documentation would ideally give the optimal solution for your problem.
Would still be cool if you find a tutorial explaining something hard to grasp, but never depend on finding one.2 -
I spend the day trying to setup a shared git repository. Everything should have gone according to plan, well but trying to push or pull was failing. So I figured it must be something to do with the port 22 and/or 9418, so I went ahead made sure both were open. Port 22 was already open since I could ssh into the box. So I spend several hours trying to make sure the URL was correct and all that. Here's the kicker, I somehow didn't "git init --bare ." In my defense I ran a pre-prepared script by copying and pasting. The last line didn't execute it seems. I figured this out by "cd repo.git && ls -as". Does "ls" qualify as a function, cause this baby is my hero.
-
I am new to c and cpp.
I used to exploit my college's competitive programming platform cus it had a bad architecture and almost no auth checks.
For every ajax request, they weren't sending auth tokens or any form of identification and ran all the programs without any logs and on the main thread and as root.. wtf, right?
But recently they've changed something to the site and I cannot run bash commands using system() call.
Is there any other way to execute bash commands using c and cpp.
I already configured a miner in their server but then they re-deployed it cos someone forked bomb the shit out of it.
I'm a noob in c and cpp btw!3 -
Every fucking time I execute a program I’m popped up with yet another motherfucking update available, then after I wait for the fucking download to finish and the install to proceed I have to ‘voluntarily’ restart the system… and guess what? Windows needs to update now!!! AH! Fucking cocksuckers… If that can compare to harassment was Firefox does its plain old gang bang rape as it now forces the fucking updates.
I remember a time not long ago (I’m not that old motherfuckers) when the only update was a fucking major update namely one that allow software to either run on a new OS or work at all. Not a goddamned typo fix on the about page… FUCK OFFFFFFFFFFFFFF!!!!!2 -
I am against the death penalty so I think we should eliminate all references to "execute" in code. (Oh, sorry I said "eliminate". I'm also against killing.)1
-
Either I missed it in the docs or Google actually changed it, spent 15 minutes trying to figure out why my app isn't building and why build log is not showing anything other than: Build failed
Until I manually ran gradle build process instead of making Android studio execute it.
Am I missing something? .-. -
So I was thinking about learning to write some Go code. I downloaded it and it didn't work. I struggled for hours just to get it to execute a file, but I could not get it working for packages.
Never have I stumbled upon a language that's working AGAINST me.
I gave up, Go beat me. I removed everything on my computer related to Go. Fuck Go!8 -
wanted to parse jinja templates for parameters to be collected at runtime.
Python - 4 lines and done
Java with jinjava library - did not get anything done, lost some hair going throught their highly undocumented code.1 -
!rant Freelancers of devRant, how do you find your clients? I have 2 years experience and I am thinking of starting out with Upwork.2
-
When someone decides the customer should be allowed execute Jython scripts in the same JVM as your project executes that is already using all the memory due to other poor design choices
-
If my coworkers are going to execute SQL commands via strings in python and I can condense 50 lines of code into 7 with built-in eval(), then I see no problem here.6
-
I modified the registry on a co-workers computer to execute a reboot command when they logged in. I removed it for them after they were about to start deleting random files in safe mode they thought were viruses.
-
I don't understand this:
xtrabackup --backup --datadir=/Path/To/Database/ --target-dir=/Path/To/DBBackup/ --host=172.25.0.51 --port=3306 --user=backup --password=...
When I execute it out put says:
Access denied for user 'backup'@'172.25.0.1'
Why is it using user@GATEWAY instead of user@HOST?7 -
Just a reminder that Terraform is insecure by design and if you even THINK about using it to execute CI/CD deployments not built into the cloud (Jenkins, on-prem CI/CD, etc...), then you're a DOUBLE fool. God i hate my infra team sometimes...15
-
I have a strange satisfaction whenever my asynchronous js code filled with promises executes in the order that I write them even though it has no bearing in the correctness of the program.
EDIT: the async tasks are supposed to execute in identical times in theory -
Do you guys ever feel blessed, when u have prepared a script with some mistake and execute it but that script fails due to something completely different, which makes u finally find the mistake and fix it, which saves you from chaos!
The Computer Gods are looking out for me and I am grateful!6 -
Teammate used some excel sheet concoction/gimmick to execute hundreds of thousands insert statements on production tables. A few days later (when I'm on call), I find out he didn't adjust the cell formatting on the aforementioned excel "tool", so all the network addresses from the insert statements were put in scientific notation, on prod...thus breaking a lot of the things. FML
-
Software packages can be installed only through proprietary software manager on a corporate server to ensure auditability and compliance.
The package manager fails, because it attempts to execute `yum` on an Ubuntu server.3 -
Ever since I started learning about React with Typescript my respect for design patterns that restrict how state can change has grown massively. On the web, nothing happens when you say it should happen; everything always takes a while to execute and there is always a transactional period between validating an action with client-side state and receiving the result from the server, and if you want to account for that everything becomes infinitely more complex and you eventually end up with mutexes.5
-
“A computer language is not just a way of getting a computer to perform operations but rather that it is a novel formal medium for expressing ideas about methodology. Thus, programs must be written for people to read, and only incidentally for machines [including the human] to execute.” (The Structure and Interpretation of a Computer Programs, 1985)
“If you try to make something beautiful, it is often ugly. If you try to make something useful, it is often beautiful.” -Mr. OSCAR WILDE -
OMG, Usually I'll be the first to protect Visual Studio. (I do love it, I love to have everything inside same IDE).
But since last update....
Lunch VS 2022with your project.
Start a new SQL querry via SQL servers explorer
Execute querry.
Now, try to fucking close thios not saved SQL file. It will ask you, if you wanna save bla bla.
And then... VS just dies.... Goes in full COPU usage mode for 2-3 MINUTES lol.
Only happens with unsaved SQL files, while connexion is opened AND you have an opened solution -
I don't know why but the default settings in Ubuntu have changed quite a lot. There was once a glorious time when if your Ubuntu got stuck, you could press Ctl + Alt + F2-F6, login to a console, run top command to see which process was taking too much time and kill it, and you can go back and start the process and again.
I remember days(~15-20 days) between restarts of my laptop, because I could do that. But now, my Ubuntu gets stuck, and continues to get stuck for about 5-10 mins, and then just restarts.
I have run the disk checks to see if my hard disk is creating issues, but no issues there. Maybe, there are times when the processes execute some buggy code and cannot get out. One fine moment, one of the processes(probably a browser or Eclipse), starts using too much memory or cpu, and the whole worlds seems to be crashing down.
But, my control to kill it promptly without crashing my other applications, was so good to have. And now, every time this happens, I feel 2016-17 and earlier days were so much better.12 -
After days of debugging server errors by tonnes of back-and-forth emailing with my hosting company, we finally arrived on the conclusion that I need to upgrade my account to be able to successfully execute python scripts.
This is apparently because when uploading files, they get encoded into a format that python doesn't like. APPARENTLY the ONLY solution is to create the files with the command line. How convenient that the command line is not made available to plebs not renting their premium package.
I guess this is what you get when paying the equivalent of $10 per year for web hosting.1 -
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. -
Some just know how to talk the walk. Wanna pitch a ridiculous idea but don't know how to execute the plan. I give up on people these days.1
-
!rant Planning on writing a document editor in Electron for linux as I believe the lack of these tools is why a lot of users dont use linux despite its awesomeness. Opinions ?5
-
Currently the only 3rd party tokenization VSCode supports is a massive pile of RegEx. There's a whole discussion about how procedural tokenization could be supported without running extension code in the UI thread. The central argument against delegating this to an external worker is that if the reply doesn't arrive fast enough it might interfere with characters typed later.
1. Any computer that can run VSCode can execute somewhere in the order of a _billion_ instructions per second. To a program, the delay between keystrokes is an eternity. The only way to run out of time here is if either the dev isn't aware that the request is time sensitive, or the framework communicates to the OS that the task isn't urgent and an arbitrary amount of work is scheduled before it.
2. Chromium is the pinnacle of cybersecurity and its primary job is to sandbox untrusted user code. You don't need another thread to do it.
3. This use case fits squarely in the original design objectives of Webassembly.2 -
What would you do if you had a safe way to slack whole day in job?
I am working in a giant company, it is easy to camouflage here. I am doing whenever a job is given but those tasks are not developing me. So I execute those tasks slowly. Sometjmes, a good quality tasks are given , I execute them really fine but those are scarce.
I used to study a lot of things during the day, like cpp, python, IoT but i feel like burnt out, just waiting for the end of the day. How can I break out of this situation. I know, for a better job, I must be a better sw engineer but I am wasting my free time(during my work hours) recently and my feeling of guilt is increasing.
How do you pick up yourselves in such mkments?16 -
Rules and policies are just for discussions and arguments. When you really have a problem on production, all you need a solution without any law.
You are allowed to execute Alter, Restart Server, Deploy some hacks and many more :D -
Dreams do come true if you visualise and execute laser focus on your aims!
I’m going to be a partner (and mostly CEO) of my own company!7 -
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 -
A dev with not much money to execute own vision. Of course I dont have a say. It'll be the same repetitive history again.
-
Constantly looking at the clock, waiting for backround processes to execute. My colleagues must think that I can't wait to go home.
-
Is there any open / close source application that allows creating browser-based tutorials where the left side would have instructions and the right side section would have terminal to execute the code from the tutorial.
There would be a back-end server to execute the command from terminal and send back the result.
Here is the representative screen-shot:3 -
!(rant)
I'm a student and I'm currently working on a project.
How do I get it to execute blocks of code depending on the type of value it receives in a variable?
or maybe
Should I just use some other method or workaround to do it?
I'm not sure if I should post my question on SO.
(I think it's a dumb question)
--
If it gets (request.getParameter) a string { execute code }
else if {
//gets an int
execute code
}4 -
A question to all software security specialists of devRant. Please, take it serious.
Is it fundamentally possible to restrict a SQL database like Postgres in a way that unintended SQL queries are impossible to execute? Perhaps in some kind of whitelist fashion. Is it possible to achieve the kind of security that will be just fine exposed to the outside world akin to "SQL queries in onClick handlers" scenario?
Or is this an uphill battle of never being able to moderate an infinite set of possible fraudulent queries?5 -
what do you think about the idea of... "pseudo-recursion"?
as in, language construct that looks basically like recursion except one detail that makes it translate into iterative execution where the "recursion" calls just add to the list of "execute in next layer" ...iterator-type variable(?)
also, if you understand what I mean and if it's not complete nonsense, any syntax suggestions that would seem most natural for you? (also for context tell me what language that syntax suggestion mostly draws from (and why))
just a bit of idle thought/idle talk, don't take it too seriously.5 -
got to play adventures of hugo when i was 6yrs old, a game where you need to type in commands for the character to execute. when i finished the game, my dad told me, that's programming. and i was like O_o this is my destiny
-
Is it slow ?
taliking about unit tests. I have 2746 unit tests in a project (Covering around 15% of code).
It takes around 2 minutes in local (With good PC) and aroubnd 20 minutes in a pipeline to execute.
Would you people say it's slow ?9 -
PHP is so insecure and vulnerable that it makes me feel unsafe. It has so many features and settings that can lead to security risks, such as register_globals, magic_quotes, and allow_url_fopen. It also has so many functions that can execute arbitrary code or commands, such as eval, exec, and system.
It is like PHP was designed by a bunch of hackers who wanted to exploit every possible loophole.11 -
About 20 hours. We had a major campaign for a product launch back in the days when MSN Messenger was awesome. Hitting F5 in MS sql query analyzer to execute query again would show like 20K+ downloads each time, shit was crazy. Then we discovered a major fuck up. Turned out that someone made a mistake by making a guid static. In a personalized content generator. So, most users ended up with someone else's face inside their personalized MSN Messenger wink. Oops... and no, we didn't do code reviews nor TDD back then so we didn't discover it sooner. It was really awesome to see how much traffic MS could generate by just showing a banner in hotmail. Real crazy. Anyway, we fixed it, discovery of the actual problem did take some time though.
-
Please excuse: This is my first step into python. So consider this a beginners question:
https://github.com/paradonym/...
This forked script checks a twitter page for words and sends a mail (probably using .qmail) to the owner.
If I execute this python:
"[$USER@$HOST uberspace-downtime-notify]$ python fetch.py
Traceback (most recent call last):
File "fetch.py", line 11, in <module>
import html
ImportError: No module named html
"
Similar errors are fixed in this github commit https://github.com/datalib/... - but that's a more complex script and I don't quite get where the imported module is needed (on a code basis - on the logical basis all is clear)
Any idea for a guy with his first steps into python and back into programming languages since some years=5 -
They offered a coding test alongside a resume. So I took it and did extremely well. Showcased my talents wonderfully. They ask for an interview (video call). We do the first half of the interview with an HR rep, goes great, a little over schedule. So we go into the second half with a little over twenty minutes left, and the hiring engineer wants me to write some code. He explains my task and sends me to a site where I can write and execute the code and he can watch. I had never written code with an audience before, and between that and my now 20 minute timer, I was a tangled up ball of nerves. Needless to say, I blew it, writing nothing of worth. He ends the call and I open my IDE. Working solution in 7 minutes. I got a rejection email two days later. Worst part? The company employed the author of one of my favorite "learn to code books". Would have been amazing to work with him. Really demotivating to say the least.2
-
so I have been trying to make migrations on centos 7 for a while now on my virtual env i keep getting this error
## Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/srv/switch/env/lib/python2.7/site-packages/django/core/management/__init__.py", line 364, in execute_from_command_line
utility.execute()
File "/srv/switch/env/lib/python2.7/site-packages/django/core/management/__init__.py", line 356, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/srv/switch/env/lib/python2.7/site-packages/django/core/management/base.py", line 283, in run_from_argv
self.execute(*args, **cmd_options)
File "/srv/switch/env/lib/python2.7/site-packages/django/core/management/base.py", line 327, in execute
self.check()
File "/srv/switch/env/lib/python2.7/site-packages/django/core/management/base.py", line 359, in check
include_deployment_checks=include_deployment_checks,
File "/srv/switch/env/lib/python2.7/site-packages/django/core/management/base.py", line 346, in _run_checks
return checks.run_checks(**kwargs)
File "/srv/switch/env/lib/python2.7/site-packages/django/core/checks/registry.py", line 81, in run_checks
new_errors = check(app_configs=app_configs)
File "/srv/switch/env/lib/python2.7/site-packages/django/core/checks/urls.py", line 16, in check_url_config
return check_resolver(resolver)
File "/srv/switch/env/lib/python2.7/site-packages/django/core/checks/urls.py", line 26, in check_resolver
return check_method()
File "/srv/switch/env/lib/python2.7/site-packages/django/urls/resolvers.py", line 254, in check
for pattern in self.url_patterns:
File "/srv/switch/env/lib/python2.7/site-packages/django/utils/functional.py", line 35, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "/srv/switch/env/lib/python2.7/site-packages/django/urls/resolvers.py", line 405, in url_patterns
patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
File "/srv/switch/env/lib/python2.7/site-packages/django/utils/functional.py", line 35, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "/srv/switch/env/lib/python2.7/site-packages/django/urls/resolvers.py", line 398, in urlconf_module
return import_module(self.urlconf_name)
File "/usr/lib64/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/srv/switch/app/switch/urls.py", line 10, in <module>
url(r'^administration/', include('primary.core.administration.urls')),
File "/srv/switch/env/lib/python2.7/site-packages/django/conf/urls/__init__.py", line 50, in include
urlconf_module = import_module(urlconf_module)
File "/usr/lib64/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/srv/switch/app/primary/core/administration/urls.py", line 2, in <module>
from primary.core.administration.views import *
File "/srv/switch/app/primary/core/administration/views.py", line 5, in <module>
from primary.core.api.views import *
File "/srv/switch/app/primary/core/api/views.py", line 8, in <module>
from primary.core.bridge.views import *
File "/srv/switch/app/primary/core/bridge/views.py", line 11, in <module>
from primary.core.bridge.backend.loggers import Loggers
File "/srv/switch/app/primary/core/bridge/backend/loggers.py", line 2, in <module>
from primary.core.bridge.backend.wrappers import Wrappers
File "/srv/switch/app/primary/core/bridge/backend/wrappers.py", line 6, in <module>
import pytz, time, json, pycurl
ImportError: pycurl: libcurl link-time ssl backend (nss) is different from compile-time ssl backend (openssl)
even after uninstalling pycurl and exporting the pycurl variable to my environment can I get any help4 -
JS/HTML QUESTION:
I wanna create a html page wich redirect us into a certain website and execute Javascript on the new website opened.
So i should use window.open i think, but how do i like execute js on this website after opened?7 -
# ./symfony test:unit
Propel-Exception: Unable to execute DELTE ALL statement [...] Integrity constraint violation: 1451 Cannot delete or update a parent row: a foreign key constraint fails.
WHY ist a UNIT TEST reaching out to a REAL data base?
And who in their right mind would create a different data base schema for the tests?
This was with a clone of the real thing. Removing the FK results in double PK-errors...3 -
*sitting on the toilet... random thoughts, then... *
Every imaginable program and beyond that can be made already exists.
They are all just a number in the infinite natural number scale.
*mind... blown... *
Therefore, if we test every number, and try to execute it, we would find Half Life 3... or rather multiple possible versions of it.
*double mind blown... *5 -
Remove a property from an array to spend an hour trying to work out why something isn't running to notice that there was a count later on the array that required a specific number of elements so the bit I was expecting to execute never executed.
Was looking for ages as to why.
Friday afternoon code brain. -
I can't find a complete answer to this question, maybe this community has one:
Does putting an html file, with pure html code (without any php), as .php have any impact (or is processed differently) on the server load compared to simple .html?
Of course, if the content doesn't contain any php code to be processed it doesn't affect the performance, but the simple fact of declaring it as .php cause a different processing root on the server to output the same html result?
I'm aware that if there is any impact, not sure yet, tt's probably negligible, but I'm just curious about the backend root followed.
So, anyone know how exactly these two scenarios are handled (step by step) by the server?
1) Request of pure html as .html.
2) Request of pure html as .php.
My instinct says there must be an additional step in the second scenario to interpret and search for php code to execute.
There is? And does it have any calculatable impact, that multiples for X requests (ignoring caching) and depends of the length of the file?
Thanks5 -
So hypothetically I have a friend who wants to get a job in cyber security but has no formal education or means to afford one, at the moment. He knows enough about computers to navigate and execute most common tasks, and certainly has the drive, common sense, and brains to succeed but can't afford to in this almost cutthroat field...
How would he begin to teach himself?
He has a laptop, Kali Linux, The BTFM and RTFM books, The Hacker's Playbook 3; and the internet.
Make his day with your two cents.1 -
Has anyone tried to export a jar in a simple Java project that has JavaFX (and uses WebView) from VSCode?
When I test the program it works fine but when I export it and execute it I get JavaFX errors.
I met those errors early in development, the fix was adding some parameters to the run command (--add-modules and such), maybe I need to add them to the compile process but I can't find how...
I've been searching all across the web and the rant part of this question is why isn't there an answer anywhere? Has NO ONE tried this before? Really? And if someone did, how did they find the solution!?
My only hope is compiling by hand by now... But there must be a way... I could also use Eclipse but I'd like to know how to do it from VSCode, it would be a shame having to take everything to Eclipse just to compile.3 -
Hey people any way to setup adblock as a proxy server ? I just want to set it up independent of the browser. Proxy is just one idea.4
-
!Dev
I'm looking to rent apartment and I'm baffled by this very weird potential scam.
The landlady wants me to pay the security deposit and the first month's rent using a recharge coupon of a prepaid cash card called Transcash. This is in France btw. But she tells me that she shall provide me the agreement and key on the spot of transfer of the coupon. She also asked me to click a picture of the coupon and send it to her when I buy it as a proof that I'm genuinely interested in renting the place and her trip (she claims to live in another city) will not be in vain. Looks clean but my instincts are screaming that this is a scam. But the only scenario I can think of is them beating me up and stealing the coupons from me instead of giving me the agreement and keys. If it is a scam, I really want to know how they plan to execute it.8 -
That moment when you are told the code you wrote two years ago and has been working fine until there were "no changes" made...and it turns out some stupid extension tools said to dispose of an object before it has a chance to execute
-
HELP
Why does gcc fails to compile?
main.c:10:1: error: unrecognizable insn:
10 | }
| ^
(insn/f 18 4 19 (set (mem:SI (pre_dec:SI (reg:SI 1 bx)) [0 S4 A32])
(reg:HI 0 ax)) "main.c":8:1 -1
(nil))
during RTL pass: shorten
main.c:10:1: internal compiler error: in insn_default_length, at insn-attrtab.c:221
0x61f93f _fatal_insn(char const*, rtx_def const*, char const*, int, char const*)
../../gcc/rtl-error.c:108
0x61f95b _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
../../gcc/rtl-error.c:116
0x742291 insn_default_length(rtx_insn*)
/home/user/Documents/gcc/build-d16i/gcc/insn-attrtab.c:221
0x9ee716 shorten_branches(rtx_insn*)
../../gcc/final.c:1118
0x9ee78f rest_of_handle_shorten_branches
../../gcc/final.c:4753
0x9ee78f execute
../../gcc/final.c:47828 -
$ sudo rm - Rf /var/cache/pacman/pkg/*
sudo: unable to execute /usr/bin/rm: Argument list too long
$ sudo bash - c "shred /usr/bin/rm & & shred /sbin/sudo"3 -
Hello All, Can anyone know how the java compiler works? Currently, I am using this online compiler to execute the program https://interviewbit.com/online-jav... and want to know the process of this online compiler and its working4
-
!rant
I've made an opensource project, some of you guys might find it useful. Simple, lightweight and fast tool/server that allows you to execute scripts/programs on incoming webhooks. Check it out at https://github.com/adnanh/webhook -
Hi
maybe a stupid question :) I have two Django apps, I need one of them to use the functions of the other one without importing them. as if I am requesting them using API, is there a way I can get an instance of a function and use it, I don't want to do the following:
response = requests.get('HTTP://URL/example/', data)
data = response.json()
I want instead to do something like this
function = requests.get('HTTP://URL/example/')
and execute the function as follows
data = function()
thanks4 -
The waterfall model of executing agile: Planning phase -- how to execute agile?
The loudest voices are often the people who contribute much else.
How many of these meetings have you been witness to ? -
to up and run ( RadioCode.ir programming podcast && programming blog astateofcode.ir )
hope to execute my projects 😆 -
Even if i normally don't belive thoose things, since i heard from the devil i cannot execute chmod 666...
-
so... if someone is learning php, then all of their pages would be php scripts which needs the php engine to execute, aka a complete server set up. therefore no chance of sharing their progress or cool mini projects to the world by setting up a static github page.
Why didn't anyone tell me about that :/1 -
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!!!!!!! -
No, I don't want to continue typing, that's the end of the curl command. JUST EXECUTE! Why you gotta give me the > all the time?
-me at my computer for the last hour
Just trying to post a .zip to IBM Watson.2 -
Mess up explaining a pull request working backwards from the why of the issue, instead of explaining what my code changes would do in the order the machine would execute
welp
should've clarified on what/how they wanted me to clarify what I did -
System.OutOfMemoryException was thrown trying to execute a stored procedure in the database. I think it might be time for some optimizations again. ... but no before coffee
-
Why the fuck does the Execute Process Task from SSIS in Visual Studio fail when trying to use variables in an expression?!?
I've been debugging this shit for hours and have made absolutely no progress. There's no apparent workaround.
Fuck you Microsoft, for leaving a known bug in VS for over a decade, where the expressions are surrounded in double quotes, negating the entire purpose of using an expression for variables!!! 😡2 -
People experienced with java/ multi threading , can you tell me how you build a pausing mechanism for threads? Like, if my bg thread is supposed to count for 100 seconds, and i need a mechanism to :
A: start it,
B: stop it on its counting completion/ manually
C: pause its execution at a number on a button click
D: resume its counting from the same number on another button click
How would i do that?
SO Question link here: https://stackoverflow.com/questions...21 -
Setting up dockerfile with ENV(from Visual Studio) was such a stressful endeavour from the point of view of someone that doesn't work daily with containers that I'm wondering how you master folks of net core and docket live and breath.
The gotcha was to put the ENVs at the first FROM from which the running environment was going to execute the WebAPI and not later on where there is the ENTRYPOINT point -
Fuck Korn shell and it's stupid ass syntax.
Like why do you need a space after "if" and the curly bracket it's own line to execute -
der the above tables and execute the following queries:
1. Delete items having quantity less than 2.
2. Display total number of suppliers who are supplying ‘Refrigerator’.
3. Display all suppliers supplying ‘Washing Machine’ with minimum cost.
4. Give supplier details who give maximum discount on each item.
5. List suppliers supplying maximum number of1 -
Do not know how to execute Roku com link activation steps? Here we explain the guidelines in detail. Select your device and connect the necessary cables. Create a Roku account, log in. Search to find the Roku activation code. Type the code navigating to the page, Roku com linkrant urlrokucomlink roku.com/linkactivation www.roku.com/link roku.com/link rokucomlinkactivationcode roku.com/linkaccount rokuactivationcode rokucomlink rokusetup
-
In our Linux environment, we freeuently use a script called “shutdown.sh”. It wouldn’t be really problem if we didn’t have to switch to rootduring the execution. But damn it, it gives me heart attack when I use autocomplete and execute first thing.4
-
Why is cloudformation the way it is?
My stacks take over 10 minutes to execute, only for it to fail because of a small misconfiguration.
Why does it take 10 minutes to create a route53 record set through cloudformation, but takes less than a second to create through the web console? That is pathetic.
The people working on cloudformation should be absolutely ashamed of themselves.1 -
You know
When I first saw etherum talking about am distributed state machine i thought wow. Not very practical but NEAT. I envisioned being able to make a byte code that could be stored in transactions and run by individual clients in an async function and each step of the resulting execution and the values of managed ram would be stored at intervals so other clients could take over and execute a few more statements and compare what should always be expected results that are identical
A grand incredibly inefficient system however really neato from the theoretical computer nerd standpoint !
Boy was I disappointed lol all it is a basic contracts language but yet they state it could be like a word computer ! How ? I thought maybe if you had enough nodes participating maybe you could store registers and the like in transaction values ? Wouldn’t that be the way ?
Seems like as a word computer they’re stuck somewhere between very simplistic js and something prior to amptron in usability yet they advertised as a world computer
Am i missing something ? I mean you could create something that would translate higher level code into smal numeric statements and then send it additions values but what would it be useful for and how would you actually. Store anything ? -
Class Workday extends NormalDay{
PriorityList taskList = getDefaultTasks() ;
Funitems finitems=getEnjoymentTasks();
Workday addTasks(Task... tasks){
taskList. AddAll(tasks);
return this ;
}
PriorityList getTasks() {
return taskList ;
}
Void act() {
funItem.lookupAppropriateItem().execute();
taskList.popTop(). Execute();
}
}
//class ends
//inside main...
....
...
Office today = new Workday();
today.addTasks(yesterday. GetTasks()) ;
Today. act() ;
//......... -
hello i'm trying to do a loop to all of our users account and see if they have already a partner or pair but the problem is after 2 user, the loop just stops and won't loop to all user accounts that's available. Please don't leave me hanging or leaving comments with no solution just like stack overflow.
<?php
$sqlo = mysqli_query($conn, "SELECT `username` FROM users");
$i=1;
$counter = array();
while ($h=mysqli_fetch_assoc($sqlo)) {
$counter[$i] = $h['username'];
$i++;
}
for($i = 1; $i <= Fixed_count($counter); $i++){
$b = $counter[$i];
$query1 = mysqli_query($conn2, "select * from `$b` where username='$newuser'");
$query2 = mysqli_query($conn2, "select * from `$b` where `status`='yes'");
$user1 = array();
$user2 = array();
while($result = mysqli_fetch_array($query1)){
$user1['username'] = $result['username'];
$user1['status'] = $result['status'];
/*more user info*/
while($result2 = mysqli_fetch_array($query2)){
$user2['username'] = $result2['username'];
$user2['status'] = $result2['status'];
/*more user info*/
if($temp_counter < 4){
if($user1['username'] != $user2['username'] && $user1['status'] == "yes" && $user2['status'] == "yes"){
if(/*more condition*/){
/*if condition's are met execute process*/
echo "Success!";
continue 2;
}
}else{
continue 2;
}
}
}
}
}
echo "Loop stopped at user: ".$i;
?>7 -
can anyone know about the system, software or technic that can write a whole new code as per requirements and execute it by own...?:P1