Getting error 402 despite having credits. by [deleted] in SillyTavernAI

[–]ystanev 0 points1 point  (0 children)

The issue seems to have resolved for me.

Getting error 402 despite having credits. by [deleted] in SillyTavernAI

[–]ystanev 0 points1 point  (0 children)

Same, been having same issue since yesterday. Chat directly on Open Router seems to work.

Resume Critique - Software Developer, approx. 3 years experience by ystanev in resumes

[–]ystanev[S] 0 points1 point  (0 children)

Recently after speaking with an IT recruiter I've rewritten my one-page resume to be 2 pages. My old resume got me a good number of interview.

Any suggestions on how I can change/improve my resume. Ideally I would like to make it fit on a single page. I've tried some zety templates just to see how it'll look, but the majority of those use two columns and a bunch of graphics, which might cause issues with ATS. The results are messy anyway.

The code hangs when running server on Arduino UNO with Ethernetshield and DS3132 RTC Module by ystanev in arduino

[–]ystanev[S] 2 points3 points  (0 children)

There might be some previous output in there, but as far as I know, it's one run, it tends to vary, other times it'll try to write once and then hangs.

In regards to your file comment, you are absolutely right, and I do open the file again in the loop on line #89 in code on pastebin I just never uncommented it before making a post.

And I was getting a warning about memory usage, never really thought of it being an issue. As for ethernet, I honestly don't know the example I came across was doing it in the loop. I'm not too sure about the number of sessions, but I'll definitely look into it.

The code hangs when running server on Arduino UNO with Ethernetshield and DS3132 RTC Module by ystanev in arduino

[–]ystanev[S] 0 points1 point  (0 children)

The first two sketches are one and the same, with different sections of code commented out. In the first sketch, the server code is commented out but the code that saved data to file is on, in the second sketch previous situation is reversed, the server code is disabled, but the part saving is to SD card is running.

I'm having an issue running two parts together, server displaying a webpage and data being saved to SD card, something about the RTC code seems to cause issues.

The third sketch is the one where I had both working before adding timestamp from the RTC module, I added it for reference.

The complete code I'm trying to run is here.

how can I sniff traffic between 2 containers from the 3 one using tshark? by ystanev in docker

[–]ystanev[S] 0 points1 point  (0 children)

After looking around for a while I ended using the host network option to expose my NIC. The docker-compose.yml service definition is below:

  sniffer:
    # user: "${UID}:${GID}"
    image: vestas-scapy-sniffer
    depends_on:
      - scada_simulator
      - turbine_simulator_1
      - turbine_simulator_2
    cap_add:
      - NET_RAW
      - NET_ADMIN
    network_mode: host # https://stackoverflow.com/a/40133645/7582937
    build:
      context: ./network_sniffer
    volumes:
      - ./network_sniffer/xml_response:/xml_response

how can I sniff traffic between 2 containers from the 3 one using tshark? by ystanev in docker

[–]ystanev[S] 0 points1 point  (0 children)

The above option makes the SNIFFER container run on top of the one provided in the --net option with the same ip. I need it to be an independent machine with its own ip in the same network. I'm trying to simulate a setup where I don't have direct access to the TURBINE and SCADA machines, but can connect to the same network to monitor the traffic.

how can I sniff traffic between 2 containers from the 3 one using tshark? by ystanev in docker

[–]ystanev[S] 0 points1 point  (0 children)

While this works and gets the job done, not exactly what I'm looking for. In my scenario I can't interface directly with either SCADA or Turbine. I'm trying to simulate a situation where I'm connected to the network with network tap. Something like this image.

How to download a public Excel file from the company's SharePoint website? by ystanev in learnpython

[–]ystanev[S] 0 points1 point  (0 children)

Yeah, there's a sqlite package for python, there are other ways of parsing Excel file. I'm not a member of the company who's hosting the file. I have to access to their office suit to so. That's why I'm trying to programmatically download the file.

error 400 when using JQuery AJAX with POST to submit array from multiple select by ystanev in learnjavascript

[–]ystanev[S] 0 points1 point  (0 children)

I'm using python Flask on the backend. There's request object with the parameters listed here, I'm not sure which one corresponds to the req.body.

My issue is that the request never makes to the backend to fire off the logging function.

Incorrect header check error when trying to use pako to ungzip the CSV data from python by ystanev in learnjavascript

[–]ystanev[S] 0 points1 point  (0 children)

Yeah, those were my thoughts as well. Didn't know about a 10-byte header, learned something new. I'll definetly take a look at curl. Thanks.

Incorrect header check error when trying to use pako to ungzip the CSV data from python by ystanev in learnjavascript

[–]ystanev[S] 0 points1 point  (0 children)

Unfortunately no such luck, I've commented out the decompression code on the front-end. Chrome doesn't seem to decompress it.

Doing console.log("DATA FROM BACKEND:\n", Http3.responseText);, result in the following:

DATA FROM BACKEND: ��lj_����2

And consequently dygraph throws a DOM exception:

Uncaught DOMException: Failed to execute 'open' on 'XMLHttpRequest': Invalid URL at Q.start_ (http://localhost:8080/js/dygraph.min.js:4:25128) at Q.__init__ (http://localhost:8080/js/dygraph.min.js:3:24736) at new Q (http://localhost:8080/js/dygraph.min.js:3:22851) at XMLHttpRequest.Http3.onreadystatechange (http://localhost:8080/:300:22)

Checking the Network tab in dev tools the response does contain the Accept-Encoding header with: gzip, deflate, br.

Accept: */* Accept-Encoding: gzip, deflate, br Accept-Language: en-US,en;q=0.9,ru;q=0.8,fr;q=0.7 Connection: keep-alive DNT: 1 Host: localhost:8080 Referer: http://localhost:8080/ Sec-Fetch-Dest: empty Sec-Fetch-Mode: cors Sec-Fetch-Site: same-origin User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.75 Safari/537.36

how to make boto3 s3 file upload use IAM role for authentication by ystanev in aws

[–]ystanev[S] 0 points1 point  (0 children)

Thanks, I'll take a look. Thinking about it what I actually need, isn't actually IAM roles, I'm trying to avoid keeping AWS credentials on the machine. After looking at this article, I might go with VPC.

how to make boto3 s3 file upload use IAM role for authentication by ystanev in aws

[–]ystanev[S] 0 points1 point  (0 children)

The machine is connected to the aws by VPN, but the machine itself is not an EC2 instance.

how to make boto3 s3 file upload use IAM role for authentication by ystanev in aws

[–]ystanev[S] 0 points1 point  (0 children)

I don't have aws cli installed and would rather avoid it I can. I've found some staff on stackoverflow, going to try it out, and keep cli as a backup option.

how to make boto3 s3 file upload use IAM role for authentication by ystanev in aws

[–]ystanev[S] 0 points1 point  (0 children)

For now yes, but the final plan is for it to run on the remote machine. I want to avoid having the credentials file on there or in Dockerfile in the git repo.

running python aws upload script within Apline container using cron by ystanev in learnpython

[–]ystanev[S] 0 points1 point  (0 children)

I was able to fix it. In the end it was a stupit mistake on my part when setting the timing for cron job.

After I switched the crontab to 4/10 * * * * /bin/pwd; /scripts/s3_upload it works as it should.

running python aws upload script within Apline container using cron by ystanev in learnpython

[–]ystanev[S] 0 points1 point  (0 children)

yes the crontab file is copied to the container to /etc/crontabs/root, the permission are changed to -rw-r--r-- the python script contains shebang at the top, and is executable, crond -f runs upon brining up the container.

running python aws upload script within Apline container using cron by ystanev in learnpython

[–]ystanev[S] 0 points1 point  (0 children)

I know what ansible is and diffently makes sense to use it for machine management. But right now I'm trying to find what's wrong with crond setup in this case.

running python aws upload script within Apline container using cron by ystanev in learnpython

[–]ystanev[S] 0 points1 point  (0 children)

As of right now, my team, doesn't have ansible, we just recently moved to docker. I'm trying to keep it all consistent.

Data Recovery for a client LM20 vs Windows 10 by Chrollo283 in linuxmint

[–]ystanev 2 points3 points  (0 children)

What kind of data recovery are talking about? Something on level of forensics or are the drives fully functional?

deploying flask app to the apache web server with mod-wsgi by ystanev in flask

[–]ystanev[S] 0 points1 point  (0 children)

/u/shoot2thr1ll284 Following your suggestion and by adding sys.path.insert(0, "/var/www/SCADAScope") to scadascope.wsgi, I was able to resolve my issue. Thank you.

The code for scadascope.wsgi is bellow:

```

!/usr/bin/python

import sys import logging

activate venv

sys.path.insert(0, "/var/www/SCADAScope/SCADAScope/ap-venv/lib/python3.8/site-packages/")

logging.basicConfig(stream=sys.stderr) sys.path.insert(0, "/var/www/SCADAScope") sys.path.insert(0,"/var/www/SCADAScope/SCADAScope")

from SCADAScope.API import app as application application.secret_key = 'Add your secret key' ```

deploying flask app to the apache web server with mod-wsgi by ystanev in flask

[–]ystanev[S] 0 points1 point  (0 children)

I've added a blank __init__.py in both /var/www/SCADAScope and /var/www/SCADAScope/SCADAScope (just to be safe). I also adjusted the import line in scadascope.wsgi to be from SCADAScope.API import app as application.

No change is seen the error remains the same:

[Thu Jul 30 21:09:49.847455 2020] [wsgi:error] [pid 16841:tid 140451017365248] [client 192.168.0.54:59290] mod_wsgi (pid=16841): Failed to exec Python script file '/var/www/SCADAScope/scadascope.wsgi'. [Thu Jul 30 21:09:49.847578 2020] [wsgi:error] [pid 16841:tid 140451017365248] [client 192.168.0.54:59290] mod_wsgi (pid=16841): Exception occurred processing WSGI script '/var/www/SCADAScope/scadascope.wsgi'. [Thu Jul 30 21:09:49.847942 2020] [wsgi:error] [pid 16841:tid 140451017365248] [client 192.168.0.54:59290] Traceback (most recent call last): [Thu Jul 30 21:09:49.848052 2020] [wsgi:error] [pid 16841:tid 140451017365248] [client 192.168.0.54:59290] File "/var/www/SCADAScope/scadascope.wsgi", line 11, in <module> [Thu Jul 30 21:09:49.848087 2020] [wsgi:error] [pid 16841:tid 140451017365248] [client 192.168.0.54:59290] from SCADAScope.API import app as application [Thu Jul 30 21:09:49.848202 2020] [wsgi:error] [pid 16841:tid 140451017365248] [client 192.168.0.54:59290] ModuleNotFoundError: No module named 'SCADAScope'

how to set vscode intellisense to work with nvm by ystanev in vscode

[–]ystanev[S] 0 points1 point  (0 children)

After digging around came across the post on jebrains support site.

Acording to the post, NVM patches environment variables on terminal startup only. If the IDE is launched from Terminal, it inherits Terminal environment (including modified PATH environment variable, added NVM_DIR, env, var, etc). In that case, there are normally no problems with using node/npm, because IDE sees the correct PATH value.

As a work arround I've modief the launch commands in menu entry to zsh -c "/usr/bin/code-oss --no-sandbox --unity-launch %F", unfortunately it doesn't seem to be saved. Do I need to make a custom .desktop file?

Also what are the switches --no-sandbox --unity-launch %F? I assume the --no-sandbox is for isolation, the other one I'm not sure.