#programming

1 messages · Page 19 of 1

ember canyon
#

tbh im not thinking straight anymore

#

11:39 pm here

#

good night, c ya tomorrow 👋

trail cove
#

@ember canyon You need help with discord rich presence?

ember canyon
#

Yoo

trail cove
#

Not at home currently but I used discord rpc in the past without using the dll. It was c++ so idk if c# implementation would be the same

ember canyon
#

I think it would be r
pretty neat if someone would do a C# wrapper for the sdk

trail cove
ember canyon
#

That would be easy if there was a C# wrapper, yeah

trail cove
#

“A C# wrapper for the [link] library.”? I’m either really dumb and missing a part of the conversation or?

quick glen
#

I think he is talking about the scs sdk?

#

thats the only thing I could imagine if it wasnt the rpc ones

trail cove
#

Oh then I’m dumb nvm

#

🤔

quick glen
#

There isnt a c# wrapper for the scs sdk because thats simply not how it works

#

Easiest solution is to use etcars or similar

trail cove
#

Yeah, I know that. Thought he meant discord rpc

#

(Reading something while having slept 4hours isn’t the best)

quick glen
#

tbh, I had a hard time figuring out if it was the scs sdk or the discord rpc he was asking about

ember canyon
#

You dont get the use?

#

The use is to NOT use external programs

#

But have sonething that loads with the game and exits with the game

#

I will pay a friend to write a c# wrapper

tranquil raptor
#

Hello guys, easiest way to make ETS2 skins?

trail cove
#

I don’t think this is the correct chat for that @tranquil raptor you’re better off going to scs’ forums

tranquil raptor
#

Alright :)

ember canyon
velvet root
#

@ember canyon I think, that if you will have C# wrapper, there must be C# app running on the background to cooperate with that SDK plugin. Don't think there is a way how to work with SDK using C# without app running on background.

trail cove
#

I still don’t get if we’re talking about discord rpc or scs’ sdk picardfacepalm

quick glen
#

@trail cove hes on about the scs sdk

#

And I'm not quite sure he fully understands how it works and the major functional difference that seperates it from the discord rpc sdk making a C# wrapper not possible (in way you can with the discord rpc)

trail cove
#

Ah

trail cove
#

Im getting crazy. I really dont know what Im doing wrong when launching the game. I tried with a test dll from mine with success, so that's not where I messed up. I tried adding " -64bit" argument with no success. Anyone has an idea what I'm missing?. edit: noticed on crash.log that Im getting an "EXCEPTION_ACCESS_VIOLATION" exception

trail cove
#

I really dislike doing this, however I'll post my code and if anyone of you can see where I messed up, you'll brighten my day also hinting of where I went wrong instead of spoon feeding me the code would be appreciated too (i've also tried different launch params/command args with no success either, from reading logs, it seems that it stops after Mpuse input is initialize)

//proccess id (variable = "id") is correct; path is core_ets2mp.dll path, and it's correct
bool Injector::b_Inject(DWORD id, char* path)
    {
    
        HANDLE tarProcess = OpenProcess(PROCESS_VM_WRITE | PROCESS_VM_OPERATION, false, id);

        if (tarProcess) {

            LPVOID loadLibA = (LPVOID)GetProcAddress(GetModuleHandleA("kernel32.dll"), "LoadLibraryA");

            LPVOID loadPath = VirtualAllocEx(tarProcess, 
                0, 
                strlen(path) +1,
                MEM_COMMIT | MEM_RESERVE,
                PAGE_READWRITE); 

            WriteProcessMemory(tarProcess, 
                loadPath, 
                (LPVOID)path, 
                strlen(path) +1,
                0);

            HANDLE remThread = CreateRemoteThread(tarProcess, 
                0, 
                NULL, 
                (LPTHREAD_START_ROUTINE)loadLibA,
                loadPath, 
                NULL, 
                NULL);

            WaitForSingleObject(remThread, INFINITE);
                
            VirtualFreeEx(tarProcess, 
                loadPath,
                strlen(path)+1, 
                MEM_RELEASE);

            CloseHandle(remThread);
            CloseHandle(tarProcess);

            return true;
        }

    
        return false;
    }```
Thanks ❤
floral mist
#

do you also get any kind of other logging information or error/warning?
Or does it simply throw EXCEPTUION_ACCESS_VIOLATION?

Do you get an error code or just "EXCEPTION_ACCESS_VIOLATION"?

trail cove
floral mist
#

log says C0000005 (EXCEPTION_ACCESS_VIOLATION)
That's the typical windows exception code for access violation that can be fixed in 99% of cases by running the application as administrator

trail cove
#

Pretty sure VS does that by default, I'll try manually running it as administrator tho

cinder spear
#

VS doesn't do anything as admin by default

trail cove
#

I always thought it did 🤔 anyways, that's not the reason but I have an idea and I feel dumb

trail cove
#

I’m either becoming dumber each day or missing something. Even having created the process with administrator privileges it still crashes. Any idea why that might be?

obtuse temple
#

You got me there

#

This may sound dumb, but one time I had a error like this and it was a .dll file missing

#

It had something to do with the file regarding privileges when you run programs. I don’t know if it’s the same for you for me it was a simple look online for the missing file

trail cove
#

What do you mean? I’m pretty sure this isn’t my case, as their launcher works correctly and injecting other dlls works just fine.

obtuse temple
#

Hmmm

#

Well if your launcher works then I’m at a blank

trail cove
#

I mean, everything works fine, even with other dlls. Problem is injecting ets2mp core (dll), which crashes the game with the exception you can see above

obtuse temple
#

Do you think you can get just that file

trail cove
#

What do you mean? The path is correct, otherwise nothing would happen

obtuse temple
#

I know the path is fine

#

Mean the actual script (if you want to call it that) that is responsible for “injecting” it

#

If you know what I mean

trail cove
#

If you mean my injector function, that is correct and is the following:

//proccess id (variable = "id") is correct; path is core_ets2mp.dll path, and it's correct
bool Core::b_Inject(DWORD id, char* path)
    {
    
        HANDLE tarProcess = OpenProcess(PROCESS_ALL_ACCESS, false, id);

        if (tarProcess) {

            LPVOID loadLibA = (LPVOID)GetProcAddress(GetModuleHandleA("kernel32.dll"), "LoadLibraryA");

            LPVOID loadPath = VirtualAllocEx(tarProcess, 
                0, 
                strlen(path) +1,
                MEM_COMMIT | MEM_RESERVE,
                PAGE_READWRITE); 

            WriteProcessMemory(tarProcess, 
                loadPath, 
                (LPVOID)path, 
                strlen(path) +1,
                0);

            HANDLE remThread = CreateRemoteThread(tarProcess, 
                0, 
                NULL, 
                (LPTHREAD_START_ROUTINE)loadLibA,
                loadPath, 
                NULL, 
                NULL);

            WaitForSingleObject(remThread, INFINITE);
                
            VirtualFreeEx(tarProcess, 
                loadPath,
                strlen(path)-1, 
                MEM_RELEASE);

            CloseHandle(remThread);
            CloseHandle(tarProcess);

            return true;
        }

    
        return false;
    }```
obtuse temple
#

Damn dude

#

I got nothing

north flax
mystic ridge
trail cove
#

That’s pretty nice

ember canyon
#

Now thats usefull

#

Its not a dream

trail cove
#

👀

quick glen
#

@trail cove their, as in TMP? That one is written in C#

trail cove
#

Yeah. I’m trying to recreate it (and add some features, like in the one you made) but in C++/CLR , which is basically .net for c++. My problem is that when injecting it, TMP crashes and I’m not exactly sure why

thick hatch
#

I'm searching for a frontend dev 👀

trail cove
raw notch
#

Guys, a client requested to send a report with static and dynamic scan report, vulnerability scanning (owasp). there are tools that creates reports like those requested for a .NET web application?

#

(in an automated way :D)

cinder spear
#

kali linux, which is easily available on the win10 store, has most of the standard free tools for that type of stuff

ember canyon
raw notch
#

@ember canyon yes, @cinder spear thanks. a good performance and load test with scripting support?

ember canyon
#

@raw notch i think 3v didnt get what you mean

raw notch
#

i think so instead, because kali is a linux distro that i can mount on a vm and use it do tests. btw, we'll hire an external company for that.. so.. :)

ember canyon
#

And i think what you want would involve writing your own unit-tests that can check if xss and stuff are possible

raw notch
#

it's another way to do that. but there are tools, graphical and semi-automated that could do this for me. the problem is pick one from the market

cinder spear
#

I just said kali has most of the free tools so you could just try them out

#

you should have own unit tests, but those are rarely good for sending a vuln scan report to a client

unkempt hamlet
split dirge
velvet root
#

@kindred pond some time ago, you posted here the code for writing commands into console. May i ask you about new addresses for 1.35 (if you already have them)? I'll be very grateful 😃

kindred pond
#

what was needed there?

velvet root
kindred pond
#

ets2 1.35 7eae8d981a23 cmd_execute = 0x00000001401C66C0

#

don't have for ats yet

velvet root
#

My mod will be only for ETS so no problem 😃 Thank you very much!

unkempt hamlet
tribal laurel
#

🙄

unkempt hamlet
unkempt hamlet
fallow flume
unkempt grotto
#

@fallow flume This channel isn’t to contact the devs about issues with TMP, create a bug report on https://truckersmp.com/support

unkempt hamlet
#

^ postmortem about yesterday outage

fallow flume
#

@unkempt grotto it was not from me 🤔

unkempt grotto
#

Your message with a screenshot from the site is directly above mine saying create a bug report, it is very visible

fallow flume
#

I am referring to the problem with the site this problem had others

unkempt grotto
#

Yes, to report a problem with the site you can create a bug report, this channel is not to tell the devs about problems with the site

fallow flume
#

which is the bug reporting channel ?

unkempt grotto
unkempt hamlet
#

It has been fixed already

unkempt grotto
#

And that ^

fallow flume
#

coco Well, why did you say this channel is not for bugs reporting 😃

unkempt grotto
#

Because it isn’t?

#

I was very clear here, bug reports go through the support system

fallow flume
#

a ok 👌🏻

glass rampartBOT
rugged copper
severe kernel
#

uhm, is cloudflare down again?

loud glen
#

Yeah

cinder spear
#

me today

opal arch
#

LOL

unkempt hamlet
umbral marten
#

GWsocksAngeryBob this is triggering me

tulip perch
#

What is a developing software?

#

Like where can I find oe

#

one

cobalt zephyr
#

Visual studio

umbral marten
#

depends on what you want to do too

ember canyon
#

Can anyone recommend me a laptop? Max max max budget is £800, I am a web developer but looking towards starting software or app developing, I'd like something which is light and slim but preferably a SSD and 16 gb ram :)

#

8gb ram will do ish

ember canyon
#

preferably 14 inch screen

cinder spear
#

#tech is probably more suited to that

ember canyon
#

Oh yeah sorry :P

ember canyon
#

i made a snake game that crashes if u open it am i a developer now?

#

Haha

#

😂

ember canyon
#

Hi, I want to try to make my own tracker for ets2mp which focus on me. Is there something to help ?

ember canyon
#

Any1 good at php?

cobalt zephyr
#

Eww php

tardy smelt
#

What do you need help with?

ember canyon
#

@ember canyon is it for a vtc?

ember canyon
#

For specific user.

static wind
#

@static wind

oak knot
#

How the TMP client core injects mods to the game? The mods are already blocked. It seems like the core imports that .mp files into game. But how the developers did it? Just asking for get rid of my curiosity.

#

The log file says [zipfs] to the MP mods as same as SP mods. But there is no way for importing it except mods folder.

strong quail
tardy smelt
#

You won't me able to add your own mod to TMP anyway. Since we have security in place on the client and server side.

oak knot
#

I'm not trying to add something in your mode. I just trying to get rid of my curiosity.

glass rampartBOT
#

TruckersMP Announcement

The /servers API end-point has been updated in the latest website update (v2.8.7) when a new property has been added - displayorder.
Servers in the response are now also ordered by it. For more information check our API documentation: https://stats.truckersmp.com/api#servers

unkempt hamlet
cinder spear
#

...but there's a reason everyone's settled on a standard way of typing them

unkempt hamlet
cinder spear
#

tried this last week for the first time and I'm never going back to the old ways of using my shell https://github.com/junegunn/fzf

unkempt hamlet
rugged copper
#

Was talking to Shawn about this last night it's pretty cool

cinder spear
#

People installing stuff like CCleaner to clean their cookies, then complaining about websites logging out on their own FailFish

ember canyon
#

xD

tardy smelt
#

And Shawn sent it to me xD

rugged copper
#

😂

raw notch
#

@unkempt hamlet the new vtc thingy is already supported by truckersmp api?

opal arch
#

Not yet @raw notch

raw notch
#

@opal arch thanks, it's planned to?

opal arch
#

Will be added later, indeed

raw notch
#

will be also a vtc api too?

opal arch
#

I cannot really now say what we will implement to the API as we have not been looking to it closely yet (unfortunately). I believe there will be an API call for the VTC profile and that some information will be added to the /player API end-point.

raw notch
#

thanks

rugged copper
quartz moth
#

Anyone here use PHPStorm?

#

Ever since I updated when I try using the built in webserver I get a 502 error which is really frustrating because I can't edit local files

rugged copper
#

I've recently switched to it but don't use the built in web server. I prefer to use Laravel Valet

quartz moth
#

I rolled back to a slightly older version and it's fixed. I really hope they fix the issue though sad

opal arch
#

Have you tried a clear installation?

raw notch
#

guys I'm starting to use laravel, someond could suggest some good and useful package to install?

unkempt hamlet
#

You shouldn't use any packages to start with

ember canyon
#

Yes.

unkempt hamlet
#

First learn framework

raw notch
#

yes, but maybe there are some common and good packages that helps without reiventing the wheel

unkempt hamlet
#

They're now mostly included in a standard package, like a Debugbar

raw notch
#

(like in nodejs, passport for authentication are consolitated packages used everywhere)

#

for example, there is a good package to manage openid auth with steam?

unkempt hamlet
raw notch
#

and about that voyager?

unkempt hamlet
#

I didn't used it that much. I am familiar with it, but I tend to made admin page myself since I have more control of it.

raw notch
#

right

#

thanks

unkempt hamlet
#

No problem 😉

raw notch
#

reminds CodeIgniter but it's way more completed and complicated

rugged copper
#

I moved from codeigniter to Laravel, best decision

quartz moth
#

Shawn btw I did try that but no luck, anyway rolling back isn't that bad tbh

raw notch
#

i hate mysql when it doesnt collaborate with user authentication

#

SQLSTATE[HY000] [1045] Access denied for user 'user'@'localhost' (using password: YES)

#

but the user has access for localhost.. event for % ... so?

unkempt hamlet
#

@raw notch did user has an access to mysql? It has their own Auth system

raw notch
#

sure, I'm using a mysql user. I've tried also with phpmyadmin and it works... don't understand why from laravel don't work. works on my local env, don't work on my server

quick glen
#

@raw notch you most likely have a blank or wildcard username entry in mysqls users table. It resolves to %@localhost which will match before your own user (using the username@% wildcard). Simple fix, create a user specificly for localhost. Alternative fix, check your users table for an empty username localhost row and remove that row.

ember canyon
#

I have a question. I want to have my own map for ETS2. And it display only me when I play. I have nopoint to start... Can someone help me ?

quick glen
#

All you need to do is provide the data for the map

ember canyon
#

Ok. But how need I to provide that ? I don't know how this work.

quick glen
#

You'd need a plugin that either sends data to a server or hosts its own webserver from which the map can read data like truck position etc.

craggy kindle
#

Can someone tell me how to activate the "I can do everything" feature? Because i wanna reverse a B-Double , but the option is locked and i dont know the command

velvet root
#

@kindred pond do you know if there was any change here?
My app for executing console commands is not working anymore and i'm running out of ideas 😃

kindred pond
#

@velvet root what do you need? ets2?

velvet root
#

yes, ets2 only, latest version

kindred pond
#
cmd_execute = get_addr( 0x00000001401C6730 ); // ported
#
#   define PRISM_API_GAME_NAME                          "Euro Truck Simulator 2"

#   define PRISM_API_SUPPORTED_GAME_VERSION             "1.35.1.13s"
#   define PRISM_API_SUPPORTED_GAME_HASH                "a1cf444021f7"
velvet root
#

Thank you very much, i will try.

velvet root
#

@kindred pond it worked, thanks!
Is it possible to find this address by myself? If yes, can you please write me some tips or short guide what should i take a look at etc.
i just don't want to bother you after every scs update 🙂

kindred pond
#

reverse engineering

velvet root
unkempt hamlet
spice sand
#

everytime i pick a account to play ats would going on the loading screen and then in the middle of it loading the applictaion would close. And I open it normally

unkempt hamlet
#

@spice sand this is not a support channel, #support for you

ember canyon
#

let pete = joke.rip;

median horizon
mystic ridge
#

<#323726708186546176-307433337126125568-ets2-modding> or <#392259712944570369-307433337126125568-ats-modding> is more suited for that

tepid knoll
#

Does anyone know the code to write hyperlink on VTC post?

shy swan
tepid knoll
#

@shy swan Thanks Lasse. I appreciate your help!haha

strong quail
#

Here you have a brief list of Markdown formatting. It's more or less the same as Discord's. https://en.m.wikipedia.org/wiki/Markdown

Markdown is a lightweight markup language with plain text formatting syntax. Its design allows it to be converted to many output formats, but the original tool by the same name only supports HTML. Markdown is often used to format readme files, for writing messages in online d...

#

There is also how you can insert an image to blog post.

tepid knoll
#

@strong quail Thanks. I've already known that.

rugged copper
#

New branding looks awesome

velvet root
#

I've got feeling that every time a look at laravel website, it looks totally different 😄

strong quail
#

It's framework, so maybe there is a switch.

#

😜

thick hatch
#

@rugged copper Agreed, it looks amazing

quartz moth
#

Never used it before but am gonna start

final haven
#

Do you guys know how to apply fullpagejs?

unkempt hamlet
#

Just check the manual

quartz moth
#

What is the default limit for API requests?

shy rune
#

100

#

1 request per 1 second. So you will get 100 request per 100 second

quartz moth
#

Ok thank you

shy rune
#

No problem

rugged copper
shy rune
#

Wow, great. Thanks, I'm not using Lavarel, but I'm pretty sure it's gonna help them up. Thanks for you and your's friend work, appreciate it.

clever flicker
#

I wonder if there is any plan to add the function of viewing applicant DLC in VTC recruitment system?

opal arch
#

Developer chat != talking to TMP devs

#

Anyway, a first world problem - making a mistake in a Git repository. Because you can never remove the history lol

rugged copper
#

Or storing a password by accident

opal arch
#

Oh XD
Imagine doing that in a public repository

rugged copper
#

Oh rip

cinder spear
#

you can remove the history in git with some good old filter branch + force push

#

I've done it a few times to remove sensitive information from github repos before making them public

opal arch
#

But well, I have not only meant that... for example things I have done in Botranktir is a thing that is triggering me now as it is starting to be messy in new pull requests 😄

unkempt hamlet
#

Let's see troll

tidal sphinx
#

whatup devs

cinder spear
#

That's a classic...
"Who wrote this mess?"

# git blame -L23,23 Bot.cs
514894d2 (3ventic 2019-05-05 15:07:47 +0200 23)         public static string CurrentVersion => "3.17.6";

oh

opal arch
#

Yea LUL

#

And that will be there for ever kappa

raw notch
#

laravel expert, i've a question for you: any ideas why redirect()->previous() or back() returns to / instead of returning to previous page in production while in local it works fine?

raw notch
#

@opal arch @cinder spear

cinder spear
#

I've never even looked at the laravel website

raw notch
#

....and? no ideas? :D

cinder spear
#

hard to say anything when I don't know how they work

raw notch
#

usually how do you redirect back when an action is performed?

#

like back()->with() to show a success message or an error?

opal arch
#

Well, have you tried to simulate the same situation on the localhost?

cinder spear
#

I write SPAs so navigation is all in javascript

#

it could be that cookies are either blocked or not getting set correctly on the production page

opal arch
#

Can you send me your site, please? You can send it to the DM, too

raw notch
#

@opal arch unfortunately i cant now because it's closed to public and I've to set you as early accesser

#

the strange thing is that back() in other contexts works fine

opal arch
#

Well, check if in the header you have referer. If you do not have it there, check if sessions work fine (as 3ventic suggested, check if cookies are okay, too).
Also, what version of Laravel are you using?

raw notch
#

latest? I've installed it some weeks ago

opal arch
#

Ah, alright

#

You can check it by running the command php artisan, it is at the top

raw notch
#

maybe the only difference is that where it works, i do back() from a post action while where doesnt work i do back() from get action

#

but in local works fine... so... i dont get why...

opal arch
#

It should work for them, too iirc

raw notch
#

i know

#

and no errors in logs

#

i see in developer console that the destination page returns 302 to /

#

so i dont get why...

opal arch
#

Have you checked the thing I suggested?

raw notch
#

not yet, i cant now, I'm from the phone out of home but lately as soon i can i will check

#

session is working tho, because authentication works correctly, and other flash messages works too

#

I'm just thinking about a http/https problem due to cloudflare flexible ssl?

opal arch
#

Well, that can be a cause, too

#

Just think what is different than on the localhost

raw notch
#

fundamentally i think only https

rugged copper
#

@raw notch did you check the headers? The previous method in the UrlGenerator class checks for the header first and if that’s not set then the session.

If neither are being set then it redirects to /

#

You should see a previous url in the session if no header

opal arch
#

Ye, that is what I have said Kap

rugged copper
#

He only checked the session 😉

opal arch
#

Welp

rugged copper
#

😂

raw notch
#

actually i didnt checked nothing because is from this morning that i dont touch my pc :D

opal arch
#

Then I got baited from Ratcho 😄

rugged copper
#

Oops

#

😂

raw notch
#

@opal arch @rugged copper i checked a couple of things, effectively the referer in destination page is / in production, so laravel act correctly from its point of view

#

but i dont get why it's / when i navigate to the destination page from a different url, seems more a browser issue than a server side problem

opal arch
#

Do you use Cloudflare? Or something similar? It may be an issue, too

raw notch
#

yes, on production cf is enabled

#

the referer policy on response header is "strict-origin"

raw notch
opal arch
#

Glad to hear that

raw notch
#

so Laravel sets that headers?

thick hatch
#

What do you people use to retrieve data from the SCS Telemetry SDK?

#

All plugins I found are outdated

#

ETCARS is outdated, Telemetry Web Server is outdated...

quick glen
#

@thick hatch Most likely in-house closed source plugins. I.e vtlog uses my plugin LogIt (which is tailored to be used with vtlog, and is closed source) and Trucky uses its own in-house plugin for their overlay telemetry

thick hatch
#

I see

#

You know, I don't have any C or C# knowledge whatsoever so I need to use someone else's plugin, can't create my own like you did 😛 @quick glen

quartz moth
#

Anyone got any good tutorials / ways to learn Laravel?

opal arch
#

Laracasts 💯

rugged copper
#

Like Shawn said, Laracasts is great. They have a free course for learning Laravel

rugged copper
quartz moth
#

Ok thank you I'll have a look at that

cinder spear
#

today in things you don't want to see on a live server

root@3v:~# systemctl list-units --failed
  UNIT                LOAD   ACTIVE SUB    DESCRIPTION
● networking.service  loaded failed failed Raise network interfaces
unkempt hamlet
shy swan
#

😂👍🏻

raw notch
#

@cinder spear maybe could add also "don't use root in production"

unkempt hamlet
#

Yeah

cinder spear
#

saves typing sudo for every single command when touching a lot of system stuff at once

strong quail
#

Aaaaaaaaaaaand I have a JS problem... 😠

#

Can someone help me?

#

I add to array thru function elements from JSON.
However when everything is fine and I want to access it outside of function, I get undefined...

#

What can be a solution for this?

unkempt hamlet
#

Send a snippet

strong quail
#
var url = './top10';

xmlhttp.onreadystatechange = function () {
    if (this.readyState == 4  && this.status == 200) {
        show_results(this.responseText);
    }
}
xmlhttp.open('GET',url,true);
xmlhttp.send();

var array_nicknames = [];
var array_amount_trips = [];

function show_results(incoming_data) {
    var arr = JSON.parse(incoming_data);

    for(var x = 0; x < arr.length; x++)
    {
      array_nicknames.push(arr[x].nickname);
      console.log(arr[x].nickname);//arusf2011
      console.log(array_nicknames[0]);//arusf2011
      array_amount_trips.push(arr[x].amount_trips);
    }
}

var nickname = array_nicknames[0];

console.log(nickname);//undefined
console.log(array_nicknames); //array[0]```
#

I made comments, so you can see where I get data and where not

raw notch
#

@strong quail you must understand the async way of life

#

you are calling an async function and print immediately after the array you fill after the async

#

try to move that console log inside the show_result function

unkempt hamlet
#

I hate async, it is completely blow my mind, I can't comprehend it.

raw notch
#

....

strong quail
#

Well... In that case I need to get those data into chart

unkempt hamlet
#

So use async await or Promises

strong quail
#

To show to the user.

unkempt hamlet
#

Or callback function after the request

raw notch
#

yes so you have to invoke chart functions in show_results function

strong quail
#

Okay.

#

Yay... Works 😂

#

Ty

raw notch
#

i know

strong quail
#

But wait - still... I don't want to do that, what should I do? 🤔

raw notch
#

btw, to make ajax calls from browser, maybe you should use something simple like jquery

#

what do you don't want to do?

strong quail
#

I don't want to have approx. 80 lines of code for chart into this function.

#

So in that case it will be better to use jquery?

raw notch
#

so write another function and call it from there
..

unkempt hamlet
#

It is not going to be 80 lines

raw notch
#

jquery simplify a great number of things, like making ajax calls without using native objects, traversing dom, controlling and modifying it, solving also cross browsr issues

#

see $.get from jquery docs

#

or $.getJSON

unkempt hamlet
#

In order to have a small JS footprint you can have an axios

#

In modern JS you can use fetch like so:

fetch("/echo/html/", {
  method: "POST",
})
.then((response) => response.text())
.catch((error) => {
  console.error(error)
})
raw notch
#

but jquery is not only for calls...

unkempt hamlet
#

Yeah, but modern JS is quite fine to do w/o jquery (if you have enough skills)

raw notch
#

traversing the dom?

unkempt hamlet
cinder spear
#
let response = await fetch("/async/await/is/awesome/")
let json = await response.json()
raw notch
#

await works in all browsers, also old ie? 😄

cinder spear
#

much of jquery's popularity was due to solving browser compatibility, but we have better tools for that now

raw notch
#

i think using jquery in browser development, unless you are not using react or vue, respect its motto "write more with less"

unkempt hamlet
#

await works if you run it through Babel

raw notch
#

if i want to transpile, i should use react directly 😄

unkempt hamlet
#

But jQuery isn't "less", it's 30 kB minified

raw notch
#

and with fibers and 5g, is a great problem 😄

unkempt hamlet
cinder spear
#

who cares if you have 5g when you have a few hundred MB monthly cap on it

#

I've almost exclusively moved to using typescript instead of normal js

raw notch
#

i have monthly cap and navigating a lot on many sites using jquery, bootstrap and 104757 js plugins, youtube etc etc i've never ended up my gigs

cinder spear
raw notch
#

and i moved to react

unkempt hamlet
#

I am moving to Vue.js, but much slower as I want to

raw notch
#

but the utility of jquery is always a great hand when you write "plain old" js

cinder spear
#

I want to try vue, but don't really have the time or reason to do it

raw notch
#

react is great, i've my boilerplate with all goodies i need

cinder spear
#

I agree. React is great

raw notch
#

and react-native is better

cinder spear
#

Has it improved a lot in the last year?

raw notch
#

latest version after 0.40 and also with the 0.50 added a lot of thinhgs

#

btw, i've never had issues developing with react native

cinder spear
#

Twitch decided against it (despite React being heavily used otherwise, on both web and mobile web) last year

raw notch
#

also Airbnb

#

but, as usual, depends on what you have to do

#

for Trucky, react native is just win win, simple, fast to develop, share codes with other Trucky's react app, it simply works on Android and iOS

#

if i install via Composer, it should be available everywhere in laravel right?

unkempt hamlet
#

Yes

#

It's a beauty of autoload

raw notch
#

and why vscode doesnt find it?

#

btw, composer discovering package didnt find it

unkempt hamlet
#

I'm not sure, haven't my development setup on me.

#

It is not a Laravel package, this is a PHP Package

#

So you can use factory class or new keyword

raw notch
#

yes but it change something if is simply a php package?

unkempt hamlet
#

Not really. See, this package doesn't really need a Laravel components to work with, so it can be decoupled from it.

raw notch
#

yes... i see...

unkempt hamlet
#

And can be used in whatever project you want, even w/o Composer (but you should make an autoload manually)

raw notch
#

but as i'm inside a laravel controller, i would have to know if a composer package is always available everywhere

#

btw, works and no error

#

but no intellisense from vscode

raw notch
#

the second one is already installed

unkempt hamlet
#

Did you try composer dump-autoload? Sorry, can't reproduce since I am not near my development setup.

raw notch
#

already done

#

after some time seems vs code is starting to resolve something

unkempt hamlet
#

So, it was indexing. Makes sense.

strong quail
#

Yay... Found a better solution for this....
Instead of going with e.g. await I've found on Internet a solution which use of jQuery.post

#

Hopefully it will work fine...

unkempt hamlet
#

You mean, "better"? troll

strong quail
#

We will see kappa

#

That's why I don't like JS... and I love PHP

unkempt hamlet
#

Nah, they're different. And PHP isn't async.

strong quail
#

Ik... But still I hate JS. 😂

#

When I was in the technical colleague, it was a nightmare for me...

#

Even our teacher of WebDev didn't even help...

#

Because he didn't know what we can do... And the only thing he was saying was "Please do this lesson"

raw notch
#

can't understand what's difficult to understand in js...

strong quail
#

Basics 👍

unkempt hamlet
#

JS learning curve is so low

strong quail
#

But other things 👎 - not for me

#

Maybe when I'll start learning e.g. React.js, maybe I'll change my mind.

raw notch
#

if you dont like plain js and you find hard to learn...

#

why you can learn react? 😄

unkempt hamlet
#

You'll need to learn plain js first...

#

quitting the context again, I want to learn Elixir language

raw notch
#

what about R?

unkempt hamlet
#

Basically, it'll be Vue.js PWA with Phoenix backend

rugged copper
#

Phoenix looks interesting

fallow flume
#

hey I also have a question where I find "RSS feed News" in the forum tmp ?

opal arch
fallow flume
#

thank you Developer 😉

clever flicker
#

Does anyone know how to add video to VTC news?

quartz moth
#

@clever flicker When you go to create the news you might be able to embed something using iframe or something similar however the devs might not have enabled it

mossy cloud
#

@clever flicker IMAGE ALT TEXT HERE

#

You can only do it as an image link :/

shadow marsh
#

Heyho, i want to change from Eclipse to Microsoft Visual Studio Code - how can I create a Workspace in VS Code? (Lang: JAVA)

mossy cloud
#

File > New Workspace iirc

shadow marsh
#

i only can choose "New File" or "New Window" :/

#

im new in Microsoft VS Code 😅

arctic mica
#

In the top left, click on 'File'

shadow marsh
#

Yah?

arctic mica
shadow marsh
#

i have that, yes

cinder spear
#

you open a folder and it creates a workspace

shadow marsh
#

Open Workspace?

cinder spear
#

no, open folder

#

if you only have a single folder in your workspace, you just use open folder

#

if you add more, then save workspace and later open workspace

shadow marsh
#

ahhh

#

thanks, 3v catlovee

clever flicker
#

@mossy cloud Thank you for your help, but I didn't succeed!

#

Thank You

mossy cloud
#

Aw I don't think there's a way then sorry

clever flicker
#

I can add pictures, but I can't add videos!

unkempt hamlet
#

Unfortunately, you can't have videos in VTC description

strong quail
#

@clever flicker That's a limition of Markdown... In order to support embeding of e.g. YT video it'll be needed to add a different plugin or handler of shortcodes.

opal arch
#

What?

#

Just use what Penguin suggested: [![IMAGE ALT TEXT HERE](http://img.youtube.com/vi/YOUTUBE_VIDEO_ID_HERE/0.jpg)](http://www.youtube.com/watch?v=YOUTUBE_VIDEO_ID_HERE)
I think that is a good solution, anyway

clever flicker
#

I understand. I'm glad you can help me!

strong quail
#

@clever flicker Post it in the Suggestion section on our Forum.

clever flicker
#

I've already posted!

#

Good night!

shadow marsh
floral mist
#

Did you patch Mincraft only or JAVA as well?

#

Best would be downgrading to 1.8 and then upgrade step-by-step from 1.8 over 1.9 over ... to 1.12.2

shadow marsh
#

only Minecraft as Server - but it all runs on Java 8 O.o

#

i did already on the server update && upgrade

floral mist
#

Are you using 32 bit Java (x86) or 64 bit (x64)?
Which update did break your verifictation system? was it 1.12.2 after an update from 1.11 / 1.12.x ?

shadow marsh
#

but the funny one is, its only in my plugin and there is no failure - i let checked the code from a really good MC-dev 😄

#

64bit 😄

#

in 1.8 it worked very good - since update to 1.12.2 it isnt working anymore

#

but its just that

#

other commands with mysql are working perfect

floral mist
#

try reverting to 1.8 then update to 1.9 and see if it breaks

#

then 1.9 to 1.10 and so on

shadow marsh
#

yayaya... okay.... ill try that

floral mist
#

If it breaks, you know where it breaks and may ask someone to check it in regards of changes that were pushed with that specific version

shadow marsh
#

okay blobthumbsup thanks RayRay catlovee

north flax
#

I mean, Django already has that, but neat

#

Would be nice for you guys, @opal arch :P

#

Less random bugs where one field doesnt fill on error from old() etc :3

opal arch
#

Well, I made templates for it in PhpStorm 🙈

north flax
#

Also works x3

#

Never used phpstorms template features

opal arch
#

I am not familiar with this package as sometimes it is hard to set own styling with them

north flax
#

Anyway, have a look. Could fit TMP nicely

#

:P

opal arch
#

Thank you, I will check it PanLove

north flax
#

Looks similar ish to django forms (but without handling validation), which is quite nice to use

unkempt hamlet
#

Customization of these automated froms would be a pita

#

Also, Client-Side Validation is in early stage, so it would be a pita too. I'm not gonna invest on this package for now.

unkempt hamlet
opal arch
#

Well, validation in Laravel can be very easily done on the server side. And client-side validation is in early stages? What do you mean?

#

Most of browsers support it iirc

cinder spear
#

all up-to-date browsers with any significant market share support the standard input validation params on <input>

#

and you can always write your own with some js

unkempt hamlet
#

Check package manual.

#

I know how to make validation in JS, but it would be a pita for generated forms too like styles.

quartz moth
#

This might be a stupid question but can you get an API key for a TMP for use in private API requests?

ember canyon
#

I upgrade my own satellite

#

I added an GPS+IMU+new battery+solar panel

opal arch
#

What do you mean? All API calls are free to use

quartz moth
#

I mean as in access private information such as private bans and reports using an API key for your TMP account

unkempt hamlet
#

We have no private API right now

#

Reports would not be available via API

quartz moth
#

Ok thank you

quartz moth
#

Does anyone know which is better. Django or Flask for form management and validation?

north flax
#

Django has more built in form tools, and a built in ORM

#

Django will also handle things like CSRF for you by default, which Flask won't (you need to write code for it or get a library doing it)

#

Flask is lighter, but you'll probably need to do more work to get going to handle form validation, security, and saving the input to a database

quartz moth
#

Ok thanks I'll have a deeper look into both of them when I get back home

north flax
#

Do that :3

cinder spear
#

I think I prefer Flask Kapp

north flax
#

It's up to preference, largely :P
Though, they have different tools in them, so different things they are good at out of hte box

unkempt hamlet
#

Joomla Pog

north flax
#

The new core for TruckersMP

#

Game server build on Joomla

mystic ridge
#

Joomla monkaX

north flax
#

The ultimate framework

mystic ridge
#

How about Moodle? troll

cinder spear
#

cgi with raw C Kapp

north flax
#

With visual basic

cinder spear
#

router manufacturers love doing that

#

consequently a lot of them get buffer overflow vulns discovered at some point in their lifetime

quartz moth
#

Omg joomla what a meme

north flax
#

I've also seen routers with old .asp apps, even slightly more recent routers

unkempt hamlet
#

Mikrotik loveit

north flax
#

Just checked, my router has an old ASP app :p

quartz moth
#

Oof

cinder spear
#

asus ones used some ungodly mix of asp and native binary cgi last I checked

mossy cloud
#

Could be worse, could be built on Wordpress 😛

royal prairie
#

Can I talk about 3D modeling here ?

unkempt hamlet
#

Sure, why not

royal prairie
#

Can I drop it a screen of my last creation ?

unkempt hamlet
#

Go ahead

royal prairie
#

For me, it's not too bad

unkempt hamlet
#

Any description? Number of polygons, programs used, etc.

royal prairie
#

Yeah, I used blender for the modelling and I made the rendering on Eevee

#

The number of poly is useless because the model insn't game ready and didn't do a low poly version

#

I made this model to have fun

unkempt hamlet
#

How eevee works? (in terms of quality/stability) Do you have any experience with a previous engine?

royal prairie
#

Eevee is a real time engine. It is rather young, and well accepted by the community. I can't give more details, I'm not an expert^^ and yes I used "cycles" before Eevee

#

Cycles is more complete than eevee

#

you can do more things

#

but eevee is not too bad at all

#

I talk as if I do presentation for the school ahah

strong quail
#

Yay... I think that on Sunday I'll be ready to publish my GitHub repo to public. 😊

#

But in BETA 😛

opal arch
#

What is the repo about?

strong quail
#

It's related to tachograph. That one that I create with Fat-free Framework. Will support both TMP API and ets2map

clever flicker
#

What is the member ID, in the API of VTC!

#

opal arch
clever flicker
#

Thank You!

clever flicker
#

New Functions of VTC System Waiting for TMP😃

strong quail
#

🔜

strong quail
#

Well... For now I have 5 tables in the database, but 2 more will come, so this tachograph system will be complex.

#

That's 5 more tables then in the 1st tachograph that I made in past 🙈

raw notch
#

laravel guys @opal arch @cinder spear i have a strange problem with the laravel cache: i put a value with timespan 1 day and use it as "timestamp" for static assets to avoid caching, then at every release, i do php artisan cache:clear but the token doesn't expire and remains the same. what I'm wronging?

quick glen
#

@strong quail I think we have like 55 or so tables in our DB for vtlog

raw notch
#

working on like dozens of database and hundreds table make me win the battle?

strong quail
#

That's a lot. But I don't want to do such

raw notch
#

working on like dozens of database and hundreds table make me win the battle?

quick glen
#

Shhhh

strong quail
#

Guys - I'm not WebDeveloper yet 🙈

#

Or at least the good WebDev. I learn, so don't want to combat with anyone XD

quick glen
#

I do web development, but I primarily stick to software

opal arch
#

@raw notch if you want to cache Laravel assets, take a look at Laravel Mx

#

I am not sure what your issue is as you mention some "token"

raw notch
#

no i dont want to cache assets

#

?v=cachetoken

#

to all js/css inclusion

#

because browsers and cf cache too much and some users dont see css and js edits unless emptying voluntarily the browser cache or disable cf cachinf

opal arch
#

Check Laravel Mix then, it will help you a lot

#

It exactly fixes this problem as you do not have to care about it on your own

raw notch
#

ok

#

thanks

#

oh it's really interesting

#

but @opal arch my doubt remains, why that cache key isnt invalidated and recreated after cache:clear?

unkempt hamlet
#

Cache key isn't handled by Laravel

#

@raw notch

raw notch
#

no?

unkempt hamlet
#

Cache key will be stored in a separate file and will be checked when you use mix() helper iirc

#

I am using Laravel Mix very extensively on Helper 😉

#

Version key is manage by Webpack underneath Laravel Mix

#

It changes only when file contents changes

raw notch
#

no no ok, I'm not referring to mix

#

is a general question about the cache

#

i put something in cache, a string, with a simple check: if there isn't, add it with a random value (a uuid), cache:clear and the value remajns the same

#

... why?

unkempt hamlet
#

What cache did you use?

#

iirc cache:clear uses your current cache driver

raw notch
#

the default cache, filesystem

unkempt hamlet
#

Do you have proper permissions for /storage folder?

raw notch
#

i think so @unkempt hamlet because upload and other things works

#

meanwhile mix works great

clever flicker
#

I wonder what the future use of VTC's member ID will be? I haven't found any relevant information on the website at present!

unkempt hamlet
#

It is just a unique VTC Member ID. Nothing more.

raw notch
#

is the identity of vtc_members table :D

opal arch
unkempt hamlet
#

IMO this endpoint is a little bit redundant

opal arch
#

I have not made it LUL

unkempt hamlet
#

ikr

clever flicker
#

Wow, membership lists are useful for my software development!😃

#

Thank you for everything!

ember canyon
#

I think there should be a system were I could send someone money and they type /bankrequests or something and then they can see all the requests to send money, and it will give them an ID such as 1111111 and then they can do /redeem 11111111 and gain what ever amount they had sent, this should all be done by a simple command /money (ID)

night rootBOT
ember canyon
#

I do apologise

strong quail
#

Does anyone have a list of companies of both ETS2 and ATS in plain text/SQL format? 🤔

left fern
#

@strong quail they're in your savegame in plain text

pulsar jungle
opal arch
#

Looks quite cool. I just quite miss the example of the model class :/

pulsar jungle
#

True, it was a classic

opal arch
pulsar jungle
#

Laravel is moving to Semver so next version is 6.0

opal arch
#

Yep :)

tardy smelt
#

Do we know what's new?

unkempt hamlet
#

Semver, Laravel Valet and... that's all I know so far

#

They don't really have a changelog on 6.0 in their main repo

#

That's weird for 443 commits

meager spoke
unkempt hamlet
#

I don't think 6.0 release would be a major for framework. Just for semver.

unkempt hamlet
#

Btw, Laravel 5.8.35 is now supports Redis 5

somber warren
#

I am making an application using Visual Studio 2019. I don't know how to change the background. If anyone knows how could they drop me a DM?

cinder spear
#

the background of what?

somber warren
#

My application i am making

cinder spear
#

that's going to depend entirely on how you're rendering your application

somber warren
#

Could i DM you 3ventic?

clever flicker
#

Why is the Arcade 1 server closed?

grave palm
#

Can I know how many active users in China do we currently have? Developers👋

#

According to the latest news, Steam will launch the Chinese version of the client, and (possibly) will not continue to support the current version in China, which means that the current steam account may be invalid in China. In this case, what should we do? TruckersMP

north flax
#

The devs here know as much as you about that Steam account issue.

#

Probably less, tbh

#

Better option would be to ask Steam what will happen to the accounts. I am guessing they would let you transfer them in some way, if there is a difference in the account itself

#

If nothing is mentioned, the accounts will likely be the same, just a different client with some feature differences/censorship, while blocking normal client connections, or something

tidal zodiac
#

this And from the brief article I just read, it seems like people in China will still be able to access the 'global' version so not too sure. We'll just see how it plays out and go from there

north flax
#

I need to go buy a notebook for cryptography stuff soon, to be able to do stuff on paper more easily x3

#

It's nice to get an understanding of the algorithms and mechanisms :>

tepid knoll
#

I'm still not sure if chinese can get access to steam instead of that perfect world version. If players are forced to be only accessible to steam China, a lot of functions in steam will be blocked and it's almost impossible for them to play TruckersMP unless using VPN

opal arch
#

Steam will probably give more information then, too. As if the changes are too huge, it may affect all actual games and services. And I doubt that. I think Steam will handle this for us, to be honest

clever flicker
#

If Steam client can't login in China, it can only login with Steam China's client. Will TruckersMP support Steam China's client login when it logs in?

tidal zodiac
#

We have no idea how it will work at this stage so we can’t really make any promises. And as Shawn said, a lot of other services are heavily integrated with Steam so anything they do will affect a lot of people. So I’m sure Steam (Valve) will do something about that

mystic ridge
#

insert Valve time joke here

opal arch
grave palm
#

Steam gave the agent in China to a local company. The latest news is that we will not be able to use steam globally, but use a new account and Steamid, I am worried that this will affect my continued use of my TMP account.

#

I will share the latest news with you.

tepid knoll
#

possibly TMP need more steps for authentication when it comes out

opal arch
#

imo it will end up like CS:GO's Perfect World - it is still the same game on Steam, just a different client and it works differently

grave palm
#

I hope so

tidal zodiac
ember canyon
#

Gonna reinstall the mod creating thing again soon.

#

Had to reset@my computer

#

So time to get back into the making game

cinder spear
#

That visualization is awesome. I love digging into stuff like that

raw notch
#

@tidal zodiac how they got these datas? speed isnt tracked in ets2map api

tidal zodiac
#

Distance between time intervals?

raw notch
#

could be a solution. so he used ets2map data?

tidal zodiac
#

Yep. Not sure what time resolution though. And for that stuff you don't need an exact number, just something relative

#

I've gotten speeds working before on ETS2Map, just based on the time interval and distance between the 2 coordinates. But it wasn't that accurate. Plus or minus 20 km/h

raw notch
#

i know, i used it to calculate the average speed of an area but it returns strange results

opal arch
#

ooo, pretty cool article! blobcateyes

ember canyon
#

Ok so

#

Should i make a bootleg ets2 and ats?

unkempt hamlet
#

Huh?

grave palm
#

bootleg ?

ember canyon
#

it means a fake ats and ets2

unkempt hamlet
#

But why?

ember canyon
#

@unkempt hamlet just for the fun of it

unkempt hamlet
#

What's the fun in it?

ember canyon
#

@unkempt hamlet i can add my own cars in it just installed in the game and make the game look likereal life

unkempt hamlet
#

So good luck LOL

ember canyon
#

i already made the game

#

its called

#

Real Ats

unkempt hamlet
opal arch
#

Or you can just play the SP and use mods there

unkempt hamlet
#

I think that is the Real ATS one

#

Just google it

strong quail
#

Em... I imagine those graphics. getaway

strong quail
#

Hurray! Another success. I got a connection with TMP API and for now on the recrutation site will show date of join to TMP and if the user has blocked counter of bans or not and if he hasn't blocked - how many he has. BlobBlush
I'll add also show up of the servers and will start to intergrate with VTC API. Also the data from specific recruit will be shown with use of dynamic modal. 😉

opal arch
#

Ah, sounds nice. Will it be some package or will it be somehow publicly accessible? :p

strong quail
#

@opal arch Since I develop with Fat Free, the script on which I'm working will be on GitHub

#

Publishment of stable version will be approximately on 15th of September.

#

Beta version however will got out on 1st, but only for beta testers

#

However to this data irl will have access only those who will be having access to Admin section.

#

Maybe one day I'll change it to be seperated.

clever flicker
#

How can I add a hyperlink to the VTC interface?

clever flicker
#

Thank You Dev

unkempt hamlet
opal arch
#

Well, if it supports only one browser...

unkempt hamlet
#

It costs nothing to support

opal arch
#

What do you mean?

unkempt hamlet
#

I mean, adding loading="auto | lazy | eager" is one second job, even if only one browser supports it now

clever flicker
#

I want to add a link to VTC news!

unkempt hamlet
#

Google "Markdown"

strong quail
#

Markdown is a lightweight markup language with plain text formatting syntax. Its design allows it to be converted to many output formats, but the original tool by the same name only supports HTML. Markdown is often used to format readme files, for writing messages in online d...

clever flicker
#

Thank you, my problem has been solved!

grave palm
#

Where can I see the login record of my TMP account?

unkempt hamlet
#

What's the login record?

mossy cloud
#

Heya, I'm trying to find resources on how I can create a discord/PHP verification system, so that people can link their discord accounts on my website and then it will give them a discord role. Does anyone have any good resources I can use for this please?

raw notch
mossy cloud
#

I don't use Laravel :/

raw notch
mossy cloud
#

Thanks though, might be a good starting point

raw notch
#

so you have to implement the OAUTH authentication by your own

mossy cloud
#

That's more going to be like it, cheers

#

Yay fun times ahead then xD

#

Cheers :P

tepid knoll
#

Why is the news I just posted disable?

arctic mica
#

Did you click on the checkbox on accident?

tepid knoll
#

Let me check it

#

@arctic mica thanks, I did it by mistake xD

arctic mica
#

No problem 🙂

unkempt grotto
#

I didn’t think this chat was for TMP support or talking with TMP developers about technical issues and bugs, but ok

shy swan
#

Reported that grammar mistake to the devs. Thanks ^^

strong quail
#

Hi guys! BlobWaveGif Does anyone know a good PHP library which will generate PDF files?

opal arch
#

mPDF?

strong quail
#

Okay. I know how I'll invent VTC API of TMP.
Since I don't want to make this system relying only on data from DB, I have decided to add to my tachograph:

  • news list inside dashboard (in the section named "News" - only listing, the main content of it will be displayed on TMP website),
  • some basic information about company (such as their socials, requirements, rules, information and language it supports) will be displayed in "Register/Recruitment" from user POV.
    For now that will be enough. In the future maybe I'll start to create a "newsletter" system, but not sure if it will be good enough and if it'll be a good option.

Gonna check out mPDF, started digging.

raw notch
#

laravel experts, i have a (another) strange problem on production: from my pc, posts with csrf token dont work, get always 419 Page Expired while on other clients and in local, same actions, works. What could be the problem? Tried from chrome and firefox, don't work from both

unkempt hamlet
#

Check SESSION_SECURE_COOKIE config

#

By setting this option to true, session cookies will only be sent back the server if the browser has a HTTPS connection. This will keep cookie from being sent to you if it can not be done securely.

raw notch
#

@unkempt hamlet and should be true or false?

unkempt hamlet
#

Can't say for sure now. play with it

raw notch
#

well i havent that conf settings in .env and can't find in config/session.php

unkempt hamlet
#

What is your Laravel version then?

raw notch
#

5.8

unkempt hamlet
#

Did you upgrade it over previous version?

raw notch
#

Laravel Framework 5.8.33

#

i think so

#

but the fact is that is working fine on some pc.. so it shouldnt be a server problem

unkempt hamlet
#

Play with sessions settings

raw notch
#

i did actually but nothing changed

#

ah here it is the SESSION_SECURE_COOKIE , i've searched with ctrl+f and didnt show up.. btw is false

#

oh... changing the session driver from file to cookie fixed the issue

#

i've tried all but not this before

unkempt hamlet
#

Yeah, file driver can be dumb sometimes

raw notch
#

now i want to try redis

raw notch
#

btw thanks @unkempt hamlet

strong quail
#

Hello. BlobWaveGif I have a problem with MariaDB.
I've decided to sort by short name of load in order to give it proper ID (so i'll not have any problems when displaying the data).
But I did (in my opinion) in the stupid way.
I went with
ALTER TABLE load_tonnage ORDER BY short_name
Thanks to this query I can't switch back to ID and for me when I go to phpmyadmin I see this table having a query
SELECT * FROM load_tonnage ORDER BY short_name
Is there any possibility to remove that or should I leave it?

cinder spear
#

should be able to just alter table load_tonnage order by id

#

the table doesn't stay in that order with inserts and deletes either way

#

it just makes ordering for that slightly more efficient, if it's a common select order by

#

if it's an innodb table, it doesn't even matter for that

#

not at all sure where you set the default order by for phpmyadmin, but pretty sure that's not the way

pulsar jungle
#

Pog

unkempt hamlet
#

RIP Whoops

#

again

unkempt hamlet
#

How did I missed this package...

opal arch
#

Because we have better tools kappa

raw notch
#

@opal arch there are? because telescope seems great

opal arch
#

I used kappa, I did not mean it

raw notch
#

ah, a question, for laravel jobs and queue, I have to schedule something in production with something like a crontab?

#

queue:work or similar?

opal arch
raw notch
#

is interesting but don't think I will need a such power on queue management

unkempt hamlet
#

Well, that's just a queue

raw notch
#

thanks anyway :) but my initial question remains, to run jobs and use queue there must be something that invoke queue:work explicitly?

unkempt hamlet
#

cron

raw notch
#

ok thanks

#

so a crontab every 1 minute or so

unkempt hamlet
#

Exactly 1 munite

raw notch
#

why exactly?

unkempt hamlet
#

Because minimum cron interval is one minute

raw notch
#

well, can schedule every 30 seconds with a trick

unkempt hamlet
#

I don't think that is needed in most cases

opal arch
#

Depends what you want to do through queue

#

Because you can also run some update tasks through it and they should be just scheduled, not executed later

#

That is why Horizon is much better option in this case imo

opal arch
raw notch
#

ooh finally! can integrate it in Trucky without using steam

unkempt hamlet
#

Why do you need Steam for?

raw notch
#

news

#

because there wasn't any method to get tmp news from the site without scraping

unkempt hamlet
#

We used forum topic RSS before

#

Btw thanks for mentioning scrapping, I should definitely remove it from Helper right now

raw notch
#

ah yes, there was he forum rss but never thought to them

unkempt hamlet
opal arch
raw notch
#

ye i know, discord changed auth system and i've never time to check it out

#

meanwhile i've added the new tmp rss to api

#

it's already in prod

opal arch
#

You can use some library and you will have it done in a few minutes

raw notch
#

actually i having a similar problem using passport-discord in nodejs

rugged copper
#

For those of you who use Laravel and Vue, just come across this https://livewire-framework.com/

clever flicker
rugged copper
#

I would swap twitch and YouTube as the colours blend a bit to much

strong quail
#

Hello. Does anyone have idea how to create a notification system e.g. when the trip is accepted, the person gets information on the website, not email?

#

I'm thinking of utilising db and maybe some event via xmlhttp request (like I do on "dynamic loading")

#

But not sure if I think the good way.

unkempt hamlet
#

Do you use Laravel?

#

It has a robust notifications

strong quail
#

Nope, I use Fat Free Framework 😂

#

Yeah - I'm limited a bit, but as I said multiple times - it's my first time working with any PHP framework, so yeah...

#

But maybe one day I'll switch to Laravel, who knows...

mossy cloud
#

@strong quail I have a database table called Notifications, then a column for UID,content,is_read

#

Then I simply have a global function that is createNotification($uid,$content)

#

Then the unread counter for Notifications is simply SELECT * FROM notifications WHERE $userDetails->ID AND is_read=0

#

Well that gets the list of them anyway, the actual count uses SELECT COUNT(ID)

strong quail
#

Okay. Then when clicks on the bell the site loads up the notifications, right?

mossy cloud
#

Yeah :)

#

Then the page query just loads their notifications via DB and puts it in a nice lil' table :P

strong quail
#

Okay, thanks for advice

mossy cloud
#

No worries :)

raw notch
#

@unkempt hamlet @opal arch i've again the 419 Page Expired problem on posts but i've discovered maybe what could be the case, it happens after deploys

#

some days ago i tried to change the APP_KEY with php artisan key:generate and php artisan config:cache and my posts back to work

unkempt hamlet
raw notch
#

composer install --optimize-autoloader --no-dev

php artisan config:cache

php artisan route:cache

php artisan migrate --force

npm install

npm run production

#

this is my deploy scriptys

#

after git pull

unkempt hamlet
#
#!/usr/bin/env bash
start=$(date +%s)

export SENTRY_AUTH_TOKEN=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
export SENTRY_ORG=XXXXXXXX
VERSION=$(sentry-cli releases propose-version)

php artisan opcache:clear
php artisan down

composer install --no-dev -o
composer dump-autoload --optimize

php artisan cache:clear
php artisan config:cache
php artisan route:cache
php artisan view:cache

php artisan grab:info && php artisan grab:news && php artisan grab:map && php artisan grab:status
wait

php artisan up && php artisan grab:wote && php artisan opcache:optimize
wait

sentry-cli releases new -p tmp-helper --finalize $VERSION && sentry-cli releases set-commits --auto $VERSION
wait

now=$(date +%s)
sentry-cli releases deploys $VERSION new -e production -t $((now-start))
#

That's my script

#

I am producing js/css assets on development machine and push it to Git.

raw notch
#

nice sentry integration

#

i'm getting big doubt... why the storage folder in under git???

#

it should? i think not

unkempt hamlet
#

Because it has folder structure in it

raw notch
#

so the structure but not the content?

unkempt hamlet
#

Yes. Just to make sure of correct folder permissions

raw notch
#

ah no ok, on git that folders are empty already

#

because every has its own gitignor

#

just tried with your script.. nothing, post to 419

north flax
#

If you get into the beta for Github Actions, it's worth poking at for quick and easy CI setups for personal projects :>

unkempt hamlet
#

I have Gitlab 🙂

raw notch
#

me too

unkempt hamlet
#

Did you have SESSION_DOMAIN changed from null?

#

Also do you have any changes to \App\Http\Middleware\VerifyCsrfToken::class?

raw notch
#

yes and no

#

just tried to change session management from redis to cookies, always 419

#

regenerated app key, always 419

unkempt hamlet
#

Dude, domain, not a driver

raw notch
#

yes... 'domain' => env('SESSION_DOMAIN', null),

unkempt hamlet
#

same_site?

raw notch
#

'same_site' => null,

unkempt hamlet
#

Change to strict and test

raw notch
#

discord auth is not working anymore 😄

#

500 error

unkempt hamlet
#

I don't have any other tips for you, unfortunately.

strong quail
#

Because I didn't post any photos last time, I will do it now.
Below on the pictures is the presentation of recrutation form.
I use data from one of the Polish VTCs.
I know that Markdown here is messed up, but if you use it properly, the effect should be awesome.
Connection made here - TruckersMP VTC API (ID of VTC is taken from my DB and thru JSON shown here) & SteamID API (in the example there is no getting of the username, however irl perfomance in the username should be the nickname from Steam and in the background to form will be gathered SteamID and link to their profile).
Last image - presentation of Social Media which are attached (again) via TruckersMP VTC API.

#

It is in English too, so don't worry. ;)
Unfortunately I had to delay beta tests because not everything was ready, however this Sunday I think that I'll be ready.

raw notch
#

@unkempt hamlet the session cookie is supposed to have the same value across the whole session right?

unkempt hamlet
#

I think so

raw notch
#

and why mine change value every page load? 😄

unkempt hamlet
#

Something wrong with server settings, I guess

raw notch
#

i see session creating in redis, every page load is a new (or two) new entries

raw notch
#

yes, my session is resetting every page load, using database as session driver, make fill the sessions table

#

oh... maybe fixed..

unkempt hamlet
#

Lesson for you, fellow Laravel developers: never mix web and api middleware in one Route

#

api middleware doesn't care about context, hence session will be new for each load.

ember canyon
#

A new radio bot.

#

Also, I heard TruckersFM.

pallid kelp
#

Hey i was just wondering if someone from the truckersmp team could provide me with some information. I want to learn how to make a multiplayer mod, i know C++ and how to read and write asm, find values using cheat engine and recreating a player class in reclass, I know how to network things. But that is about the extent of my knowledge of this subject. I want to try and make a simple multiplayer mod with ets or ats because it seems like a simple game to start with. So i guess what i really want to know is how does one find a way to spawn in other trucks and connect them to a server in same way you guys have done?

meager spoke
#

I ain't no dev (only discord bots), but considering how many people tried to make a multiplayer mod for ets and ats, and only TruckersMP succeeded (as far as I know), it says how hard it is.

unkempt hamlet
#

@pallid kelp we have an in-house technology for that and can't share a details with you. This is a product of our hard work over the last 5 years. However, you can check this repository with some old codebase https://github.com/RootKiller/ETS2MP/. This can give you some basic idea on how to do certain things (at least back then).

pallid kelp
#

Thanks ill take a look at that!

opal arch
#

Try to find messages from mwl4 here, I think somebody needed help with reverse engineering here before, too

indigo socket
#

*hard work @unkempt hamlet serb

unkempt hamlet
pulsar jungle
unkempt hamlet
#

Ah yeah, it's September 3rd already

pulsar jungle
#

Yep

#

Vapor looks nice but a bit expensive

unkempt hamlet
tiny elbow
#

hows all the guys doing to day?

strong quail
#

Hi guys. Did anyone try to use ETS2Map API?
Because sometimes I don't get proper results (even though user is inside the game, sometimes it shows that he isn't).

unkempt hamlet
#

Well, ETS2Map API is pretty straightforward. As for reliability, I am not sure.

opal arch
#

Can you provide an example? I have never seen any weird results

cinder spear
unkempt hamlet
strong quail
#

I'll show examples tomorrow once I'll have complete data that I want to present.

#

But as far as it goes ets2map doesn't allow iframe, so that's sad. sadcat (even though I set up correctly URL e.g. https://ets2map.com/?follow=63320 )

raw notch
#

what you want to do exactly?

strong quail
#

Firstly - I want to let user know of the specific person is in ETS2 or not.

raw notch
#

have you tried Trucky API?

strong quail
#

And if he/she is, then show a position of he/she via ets2map

#

I mean... I can deal with it also via SteamAPI without any problems.

#

But I want to snap it right from the ets2map API, because it gives also some other info

#

E.g. Server on which he/she is driving

raw notch
#

and it's an info available also on Trucky API

#
  • location resolution
unkempt hamlet
#

It's using ETS2Map data, right?

raw notch
#
  • trucky data
#

cached data of ets2map every minute

unkempt hamlet
#

So, reliability should be the same Pog

raw notch
#

it is

unkempt hamlet
#

Why do you need iframe to use map api then, @strong quail?

strong quail
#

To display the map and the location. Don't want to build my own map.

raw notch
#

oh @cinder spear you are using my API :D

#

look at 3ventic example, you can use Trucky api and link trucky map

#

if you need an iframe mod, well, we can sort it :)

cinder spear
#

it was easier to find than ets2map's Kapp

raw notch
#

I know

#

and it's super fast

cinder spear
#

want to see the actual mess? Kapp

raw notch
#

sure

unkempt hamlet
#

I want too

cinder spear
#
[equals [customapi https://api.truckyapp.com/v3/map/online?playerID=[0|31812] $.response.online] True "[customapi https://api.truckyapp.com/v3/map/online?playerID=[0|31812] $.response.name is on $.response.serverDetails.game $.response.serverDetails.name near $.response.location.poi.realName $.response.location.poi.country - https://web.truckyapp.com/map?follow=[0|31812]]" "they're not trucking :("]
raw notch
#

there is a prop tell you if the player is near or inside an area :)

cinder spear
#

and I have a 500 character limit

raw notch
#

is "area", if true, is inside the area

unkempt hamlet
#

What are thooooose?

cinder spear
#

I don't think I can fit another equals check for that

raw notch
#

you have 500 chars.. for what?

cinder spear
#

maybe I can

raw notch
#

:D

#

which language is it?

unkempt hamlet
#

It's moon runes

cinder spear
#

...I should update that

unkempt hamlet
#

So, no caching? peek

cinder spear
#

yes caching

#

it proxies all requests to external servers through a proxy server so that it doesn't expose the server IP

raw notch
#

you are caching the online response?

cinder spear
#

the proxy server caches the whole response

unkempt hamlet
#

Ah ok

cinder spear
#

it also processes inner [] first; it's not a short-circuited equals check

raw notch
#

but which language is?

cinder spear
#

it's a custom... I don't know if you can even call it a scripting language, but let's call it that

raw notch
#

you wrote a scripting language?

unkempt hamlet
#

It's not Turing-complete for sure

cinder spear
#

doing basic if == is pretty much as far as it gets

raw notch
#

and... why????

#

:D

cinder spear
#

so people can do complex commands.. like that one

#

without me adding explicit support for it

raw notch
#

ah for custom commands

cinder spear
#

yeah

raw notch
#

why not something JavaScript?

cinder spear
#

and the 500 character limit comes from the fact that you configure the bot via twitch chat

#

could've used js if I researched sandboxing it properly

unkempt hamlet
#

I'd rather have a dashboard with custom scripts in it

raw notch
#

well, add support for multimessage commands

cinder spear
#

I'd rather have a dashboard too but the architecture doesn't really support it.... I started writing it in 2014

raw notch
#

.startcommand .addline ... .endcommand

cinder spear
#

before I really considered things like maintainability

raw notch
#

:D

unkempt hamlet
#

Well, you have time to rewrite it 😉

cinder spear
#

good joke Kapp

unkempt hamlet
#

Also, use Elixir for the next time lol

cinder spear
#

if I rewrote it it'd probably be in Go

#

or still C#.. I like C# a lot

raw notch
#

C# is awesome

cinder spear
raw notch
#

nice numbers

cinder spear
raw notch
#

but the real language behind for bot and server is?

cinder spear
#

it's a .net core app

#

2.1 I believe

#

running in docker on AWS

raw notch
#

core was already in 2014? really?

cinder spear
#

it started as a Mono app

raw notch
#

oh mono pogchamp_100

cinder spear
#

so bad

#

I was so happy after I moved to .net core instead

strong quail
raw notch
#

known problem :D

strong quail
#

Let's try then iframe'ing the Trucky Web monkaS

#

Example - in the gray box should be shown map with exact localisation of player

#

(forgot to add - the code to load the page is loading after showing the collapsed content

#

Not sure, what I do wrong

#

I have jQuery attached to main site, to which this code is loaded.

#

I guess then it's blocked because of that.

#

And if I would like to use it, I would to have to render map by myself

unkempt hamlet
#

I guess, it's blocked by Cloudflare edges.

strong quail
#

Maybe shrug1

unkempt hamlet
#

Scrape Shield

strong quail
unkempt hamlet
#

Well, time to render your own map trolldance

strong quail
#

Hm... But wait a second

#

What if... MonkaThink

#

I know how I'll deal with it.

#

Workaround trollrun

#

I'll do in that way - when player is online, in the tab will show up location with city etc (like TruckyApp) and on clicking follow, will popup the map

unkempt hamlet
#

Well, that's how my Helper works 😉

raw notch
#

@unkempt hamlet you use also trucky api?

strong quail
#

@raw notch Your API is syncing with ets2map API every 5s, right?

raw notch
#

map or online API?

strong quail
#

Map API

raw notch
#

every 1 minute

strong quail
#

We will see....

#

But for sure change has been made - will use TruckyApp API, but position will be displayed on ets2map, because it's more fluent.