#programming

1 messages ยท Page 11 of 1

amber oasis
#

Already got it somewhere in my computer & cats folder

#

easy way to remember though

north flax
#

Or you can use the TCP/IP stack, in which case you put the Application, Presentation, and Session cats on the same shelf :p

amber oasis
#

so that's why TCP/IP suck so much

#

๐Ÿ˜›

north flax
#

I actually use TCP/IP more nowadays, in university subjects, since it's closer to how you'd split the responsibilities, since generally teh application handles sessions and presentation tasks :p

small ermine
#

๐Ÿ˜‚

north flax
#

I installed yarn this week, in addition to npm

#

Since after googling a bit about an issue I had when testing some react stuff, it turned out that it's a fairly new issue that is most likely caused by NPM

small ermine
#

Woooo, PHP is popular ๐Ÿ˜‚ ๐Ÿ˜‚

small ermine
#

๐Ÿ™ƒ

unkempt hamlet
#

help.bigmp.ru is actually a helper.mp repository

cinder spear
#

slightly modified

diff --git a/src/handlers/pipeline.js b/src/handlers/pipeline.js
index 930d51a..e966e4c 100644
--- a/src/handlers/pipeline.js
+++ b/src/handlers/pipeline.js
@@ -4,10 +4,13 @@ var format = require("string-format");

 class PushHandler extends Handler {
   handle(json) {
+    if (['pending', 'running'].indexOf(json.object_attributes.status) > -1) {
+               return "";
+       }
     var header = format(":vertical_traffic_light:  _Pipeline for commit `{}` on **{} ({})**_\n\n",
       json.commit.id.substr(0, 7),
       json.project.name,
-      json.ref.replace("refs/heads/", ""));
+      json.object_attributes.ref.replace("refs/heads/", ""));

     var log = [];
unkempt hamlet
#

I just use the Slack endpoint for notifications

north flax
#

Discord slack webhook endpoint works well with gitlab webhooks :p

amber oasis
#

"well", servicable ๐Ÿ˜›

north flax
#

Works ๐Ÿ˜›

amber oasis
#

as I said, servicable

#

Zapier really tries to cater to everyone

unkempt hamlet
amber oasis
#

demo of how the X-xss-protection header works

cinder spear
#

sometimes I feel like the security onion is gaining too many layers

small ermine
#

๐Ÿ˜‚

#

ogres have layers too ๐Ÿ˜‰

cinder spear
#

I can already see some devs going "we don't need to worry about XSS, we have this header"

#

they are, of course, wrong, but it's going to happen regardless

small ermine
#

XD

fair jay
#

Currently learning C++ using SoloLearn app ๐Ÿ˜ƒ

small ermine
#

woop

fair jay
#

So far it's not too bad

small ermine
#

sweeetttt!

fair jay
#

Have you learn it Callum?

small ermine
#

nope

#

๐Ÿ˜›

fair jay
#

From one of my programming lectuerers in college told me it is one of the hardest languages

#

He only knows it a little bit, but he was a C# for Microsoft

small ermine
#

ahhh cool

fair jay
#

*c# Developer for Microsoft

cunning sequoia
#

@fair jay SoloLearn is how I learned how to program HTML, CSS, JS, C++ it's a very good app

small ermine
#

yup

fair jay
#

@cunning sequoia Thank you for the confidence that it will hopefully help me understand it better ๐Ÿ˜ƒ

small ermine
#

How does ETS2 save the job data, for like using in a logger? ๐Ÿค”

unkempt hamlet
#

You would have to use Telemetry for the logger

small ermine
#

Okay, I know what that is but how do I do that? I'm trying to work with someone to create a logger ๐Ÿ˜…

#

How do I get the telemetry working?

small ermine
#

Ah thanks

#

๐Ÿ˜

unkempt hamlet
small ermine
#

๐Ÿ˜‚

lilac patio
#

right im here now

#

for this new Date(datetime string here) how i make so does in json file

north flax
#

The JS showing it has to do it. If you're gonna make it in a readable format in hte json file you will have to create hte json file that way

lilac patio
#
<script>
       function updatelistleners() {

        jQuery.ajax({
            url: "http://site/data/np.php",
            //force to handle it as text
            dataType: "text",
            async: true,
            success: function(data) {
                            
            var json = jQuery.parseJSON(data);



                jQuery('#viewer').text(json.track.current);
                jQuery('#uptime').text(json.track.starttime);

            }
          });
        }

        jQuery(document).ready(function(){

            setTimeout(function(){updatelistleners();}, 100);
            // we're going to update our html elements / player every 15 seconds
            setInterval(function(){updatelistleners();}, 10000); 

        });

</script>```
#

this what i made RN

north flax
small ermine
#

The number of milliseconds since 1970?

#

Wow

#

That's why when something goes funny with deleted messages on Discord I see 1 January 1970 ๐Ÿ˜‚

north flax
#

1st of jan 1970 is the Unix Epoch, if you see a unix timestamp that is the number of seconds since a certain time that day

#

Also, source of this: https://xkcd.com/607/

#

Since in 2038 the unix timestampswill have so large values we can't store them in 32 bit ints any more

small ermine
#

Ouch

lilac patio
#

does anyone know how i put this inside json, like just says 1 at page

#

i was missing few APIS

#

i think i got it

lilac patio
#

what think so far

#

i added real viewer coutner

#

other 1 was song only XD

amber oasis
lilac patio
#

question how i set this

#

$tracklist->tracks->track[0]->artists;

#

that i did and i get nothing

#

this might be fix all that bugs

#

nvm i was on wrong url

#

XD

unkempt hamlet
#

It is an XML, not a JSON

lilac patio
#

ik

unkempt hamlet
#

Or looks like XML

lilac patio
#

i need way pull out

unkempt hamlet
#

How did your pull that off?

lilac patio
#

i tyed lot

#

i convert site to json

#

and was buggy

unkempt hamlet
#

What is the actual code?

lilac patio
#

i tryed everything

unkempt hamlet
#

var_dump($tracklist) please

lilac patio
#

im getting info form here

#

like see there

unkempt hamlet
#

$tracklist->track[0]

#

And so on

#

Your parent tracks is not presented

lilac patio
#

oww

#

i gatcha

#

i made 1 for YT

#

$xml->entry[0]->children('yt', true)->videoId[0];

#

but i was try figure do on that

lilac patio
#

there ago i fixxed it

#

i think now stable

lilac patio
#

ik ik

#

i want use radonomy for now till i get my butt off them service and premade hosting

#

btw

#

Discord bot done

#

๐Ÿ˜›

lilac patio
#

meh

small ermine
#

It's clever that

#

Gotta make sure it's done right though

small ermine
#

Well you gotta make sure it's all done properly, no half-assed attempt

#

Otherwise it's pointless

#

Yeah

#

If it's not done properly like that it looks even worse

#

Ouch

#

๐Ÿ˜‚

#

Thank god

#

๐Ÿ™ƒ

wicked lava
#

anyone knows that moment when your pc crashes and the file you've just worked on looks like this afterwards?

small ermine
#

๐Ÿ˜‚

#

Ouch

amber oasis
#

that's a hex view, it's only null bytes

#

it's broken

wicked lava
#

I'd rather called it destroyed

#

sounds worse

#

Thanks to Google Backup Sync for saving it ๐Ÿ˜„

grand blade
#

xd

#

tfw google backs up the new broken file

lilac patio
small ermine
#

๐Ÿ‘Œ

lilac patio
#

๐Ÿ˜ƒ

#

i changed site a bit

small ermine
#

bit of API there ๐Ÿ˜„

lilac patio
#

i made so only listlen on ETS 2, ATS and MC server

#

yeh

#

people complaining about host

#

so this only way cant complain

small ermine
#

Yeah

lilac patio
#

#DontPutOnSiteOnlyIngame

#

๐Ÿ˜›

small ermine
#

sweeet

lilac patio
#

problem for me API doesnt like host i got

#

aka Radionomy API vs free website hosting

#

so thats why keeps bliping out

small ermine
#

ahh

#

who's hosting itt

lilac patio
#

infinityfree, its kinda bad hosting for free

#

but good have invate stuff

#

but thy lamated APIs callouts on thy dedi

#

problem is i dont have small dedi or something for it so im using that hosting

amber oasis
lilac patio
#

<-- Money is issue here

#

i hardly dont get money, mostly been spend get MC server going

#

plus i need get domain too

#

so ยฏ_(ใƒ„)_/ยฏ

#

all im doing is calling out this file then put data on site

#

but as ya see Radionomy doesnt like host of it

north flax
#

Based on laod speed, I'm guessing you haven't cached results.

#

Always cache results, else you ping their api's on EVERY pageload.

#

Not caching is probably against their policy, just as it is against ours.

#

Now, I haven't done anything to check conclusively, but I suspect you're not caching.

amber oasis
#

._. that's slow, 99% certainty it's uncached

north flax
#

Exactly

#

If Radionomy blocks your api calls, it's likely they've blocked the ip for sending too many requests.

cinder spear
#

scaleway is good until you need to reboot

#

then it gets annoying

amber oasis
#

Not had any issues with my docker swarm blobcatshrug

cinder spear
#

I run most of my stuff on OVH cloud

amber oasis
#

Yeah, I ran into issues getting swarm to run reliably there for some reason

#

also, my setup would be far more expensive on OVH cloud

cinder spear
#

it is quite a bit more expensive, you're right there

amber oasis
#

got multiple low-power workhorses, a couple of high power ones, and dedicated masters

cinder spear
#

~70โ‚ฌ a month for my twitchbot's servers alone

amber oasis
#

*dedicated virtual masters

#

A couple of Windows hosts and I could schedule anything on my cluster

lilac patio
#

down side is idk how to catch it

amber oasis
#

Have you tried to googleIt

lilac patio
#

is it curl

#

if is i have done that before

amber oasis
#

no, that's not a cache

lilac patio
#

well gessing i dont then

#

idk how catch it

amber oasis
#

not "catch", but "cache"

lilac patio
#

get i mean

#

like idk how to

amber oasis
#

google "php cache request"

lilac patio
#

says i can do this

#
header('Cache-Control: no-store, no-cache, must-revalidate'); 
header('Cache-Control: post-check=0, pre-check=0', FALSE); 
header('Pragma: no-cache');```
#

not sure true

small ermine
#

I'm not a great dev

#

but to me, no-cache sounds like the opposite

#

of what you wanna do

amber oasis
#

That's client side caching, you need server side caching

small ermine
#

ยฏ_(ใƒ„)_/ยฏ

lilac patio
#

i cant do server side

#

๐Ÿคฆ

amber oasis
#

You have to

lilac patio
#

not dedi

small ermine
#

you know what that means?

lilac patio
#

its website hosting

small ermine
#

get some free hosting that isn't like that ๐Ÿ˜‰

amber oasis
#

Caching can be file based

small ermine
#

i know a couple

amber oasis
#

You can't interface with the TMP API without caching acording to the API documentation

#

that's violating the TOS

small ermine
#

naughty boi

#

XD

lilac patio
#

well idk how catch

#

thats how far i cant tink off

north flax
#

Store it on your own server, only check the TruckersMP api every 1 minute. Do that on your server side.

#

That's the essence of serverside caching.

small ermine
#

๐Ÿ™ƒ

lilac patio
#

so saying store as file

north flax
#

That's one option, yes.

lilac patio
#

well idk how do that with like 3 or 4 APIs ยฏ_(ใƒ„)_/ยฏ

small ermine
#

so you should find out

#

ยฏ_(ใƒ„)_/ยฏ

#

xD

lilac patio
#

i try looking up

#

and nothign about it part askign use ducker

#

hosting doesnt have docker

#

hold on

#

will this work or no?

#

catch this to file http://trucker4lifefm.epizy.com/data/radioData.php

#

even thow already setup

#

well i tryed

rich flint
small ermine
#

XD

lilac patio
#

idk how do it

#

like OMG

#

i try look up examples and none work

small ermine
#

how to cache a response from an API?

amber oasis
lilac patio
#

Ducker thow

#

cant run Ducker stuff

#

hosting not ducker supported

amber oasis
#

*Docker

#

and that's not Docker

#

Try reading a bit before saying "can't use x"

#

cause PHP SimpleCache doesn't even mention Docker

lilac patio
#

well docker / composer then i see composer.json

amber oasis
#

You can always use Composer

lilac patio
#

ik i can but site doesnt

amber oasis
#

Site can always use composer

#

if it can't, you can't run PHP anyways

lilac patio
#

like i sid its S***t hosting like i ammited

#

i cant go here buy hosting

#

and can run PHP

amber oasis
#

Spend some time learning before you build something usable

lilac patio
#

just needs custom coded it

amber oasis
#

You have huge gaps in your understanding of how things works

lilac patio
#

for example if i use curl on there suspended my account for nothing

amber oasis
#

start off with the last one, as well as fill in with PHP tutorials from laracast

lilac patio
#

i had to use 000webhosting for all curl

cinder spear
#

you can do it at the webserver level too, if you don't want to program anything special for caching
nginx for example:

proxy_cache_path /tmp/nginx levels=1:2 keys_zone=API:5m inactive=30m; #store max 5 megs of data, drop when not been requested for 30 minutes
server {
  ..
  location /tmpapi/ {
    proxy_pass https://api.truckersmp.com/;
    proxy_cache API;
    proxy_cache_key $request_uri;
    proxy_cache_valid 200 30m; #cache HTTP OK responses for 30 minutes
    proxy_cache_use_stale error timeout invalid_header updating http_500 http_502 http_503 http_504; #use old cached response when TMP API returns an error, or there's already an updating request outgoing
  }
}

and then you can just request localhost/tmpapi/v2/... on the server or yourserv.er/tmpapi/v2/... in your webpage's js

amber oasis
#

wouldn't quite work if he can't even use composer directly on the box blobcatjoy

cinder spear
#

true

#

but I'm like 110% against hosting that doesn't give you access to the webserver config anyway

#

especially 000webhost

amber oasis
#

He did specify that he has basically 0 budget

cinder spear
#

"In approximately March 2015, the free web hosting provider 000webhost suffered a major data breach that exposed almost 15 million customer records. The data was sold and traded before 000webhost was alerted in October. The breach included names, email addresses and plain text passwords ." (emphasis mine)

small ermine
#

hmph. Theres a couple of hosting places that have decent free things

cinder spear
#

yet to see a solid free host for anything that wasn't a favor from a friend who has a server

small ermine
#

ehh, there's a couple I guess

amber oasis
#

Usually it's bad stuff like 3v said

small ermine
#

yeah

amber oasis
#

Might set out on a new endeavour, replace my new monitoring with newer monitoring blobcatjoy

cinder spear
#

my theory is that if a solid free service existed, it would be wildly popular

small ermine
#

yeah

amber oasis
#

TICK stack, Telegraf, InfluxDB, Cronograf, Kapacitor

cinder spear
#

I need to setup some monitoring to begin with

amber oasis
#

telegraf got an insane amount of supported modules

#

like, down to supporting Teamspeak for example

#

and you can use Chronograf, or Grafana for your graphing

#

As for the alerting, there's a lot of supported alerting backends supported, including just plain basic webhooks or slack webhooks

#

or Alerta for an overview

lilac patio
#

well i made cache

#

fanelly

#

now radionomy broken XD

small ermine
#

ngl actually took me about an hour XD

lilac patio
#

right cache works

#

but now index.html and servers.php erroing now

north flax
opal arch
#

@small ermine you have not seen what I have made LUL
Just kidding, good job, man. Keep going!

lilac patio
#

i got workign ik what i did wrong

#

i didnt set path where data gonna be

small ermine
#

thanks! ๐Ÿ˜„

small ermine
#

@opal arch I kept going ๐Ÿ˜‚

#

๐Ÿ˜

opal arch
#

@small ermine This is easy, do more ๐Ÿ˜›

small ermine
#

๐Ÿ˜‰

#

Will do on Friday, college tomorrow and Thursday

#

But it's better than it was

amber oasis
#

blobcatthonking Chronograf crashes all my browsers

#

oic, a few thousand requests going on

opal arch
#

@small ermine Yea, send more pictures :P
I could maybe send some, too ๐Ÿ˜„

small ermine
#

๐Ÿ˜

north flax
#

The AC broke/was turned off in a serveroom. Besides other damages, they found this keyboard xD

amber oasis
#

at the uni?

north flax
#

No, from reddit ๐Ÿ˜›

opal arch
#

Not only flat design, but nowadays also flat keyboard kappa

cinder spear
#

is this what they call ergonomic? Kappa

opal arch
wicked lava
#

Does anyone knows an easy (not complicated) way to adjust the height of a textarea in html/css/js to the content that's inside?
(Just like on the forums: https://i.imgur.com/NyjK5OH.gifv)

small ermine
#

Hmm

#

Don't you just make the height or rows attribute so that it's small, and let it resize automatically?

#

Idk if that works, cause I used CKEditor

wicked lava
#

That's my plan, but idk how to let it resize automatically :/

small ermine
#

It should do it by itself with CKEditor

#

I think

wicked lava
#

and without ckeditor? ๐Ÿ˜›

I just don't like embedding things that someone else created... I'd rather create it myself

small ermine
#

Yeah I don't know, a lot of effort to make a rich text editor yourself though XD

#

I'm too lazy for that

pearl badger
#

@wicked lava isnt it like height: min-content

#

in css

#

or like

#
height: min-content;
min-height: 400px;```
#

rarely use css so idk if it works

opal arch
#

@wicked lava Or I found something with jQuery

    $(this).height(0).height(this.scrollHeight + 16);    // Part with '+ 16' is not needed, but it looks better and there is no scroll bar then there :)
}).find('textarea').change();```
#

@pearl badger I tried it myself and it did not work. Tested on Chromium

pearl badger
#

:/

#

ah

wicked lava
#

@opal arch It works almost

opal arch
#

You can see what is on the next line troll

#

This looks as working one, try it out ๐Ÿ˜ƒ

#

But next time try to use Google, I did same ๐Ÿ˜›

wicked lava
#

Also kinda weird...

#

It resizes once I stop typing

opal arch
#

@wicked lava Now it should work

cinder spear
wicked lava
#

That worked perfectly ๐Ÿ˜ƒ

unkempt hamlet
#

Wow

small ermine
#

Looks interesting

unkempt hamlet
amber oasis
#

typo in your comment, you said "this path" rather than "this patch" ๐Ÿ˜›

unkempt hamlet
#

ty Tuxyq

amber oasis
#

yw CJ

small ermine
#

Anyone able to help me with this pain in the ass called bitbucket? -_-

#

Basically, Plesk won't pull the updates, and if I delete the thing in Plesk and re-clone it, nope. But I can push my files to the repo and all the details are correct..

north flax
#

That's most likely far too little information for anyone to help you

small ermine
#

well, I've had a bitbucket repo set up with the git option on Plesk

#

And for the past however-long, it's worked perfectly

#

today i went on, and it won't let me pull any updates

#

aaaand now it's working...

#

๐Ÿค”

north flax
#

Probably downtime or a hiccup in bitbuckets systems, or your connection to them.

small ermine
#

yeah probably ๐Ÿ˜‚

#

sorry!

wicked lava
#

ยฏ_(ใƒ„)_/ยฏ

#

Title says it all

#

Reminds me on the tmp forum troll

#

Did anyone tell him to do Esc + :q + Enter?

amber oasis
small ermine
#

Awesome

wicked lava
cinder spear
#

arrow functions don't have their own this, they use the enclosing scope's this and arguments

#

in the first one, this refers to the element that triggered the click whereas in the second one this refers to whatever this is outside of the callbacks.

#
console.log(this); // 1
$('td').click(function(){ console.log(this); }); // 2
$('td').click(()=>{ console.log(this); }); // 3

1 will be the same as 3, 2 will be the <td> that was clicked

wicked lava
#

Ahh... makes sense

small ermine
#

I added a theme to osticket and now I have so many errors it's unbelievable. Literally being spammed with errors ๐Ÿ˜‚

unkempt hamlet
#

So, good day to start using Yarn and learn Ava

amber oasis
#

Always a good day to switch to yarn

small ermine
#

๐Ÿ˜‚

#

Google recursive

amber oasis
unkempt hamlet
amber oasis
unkempt hamlet
#

And I am using cheap shared hosting ๐Ÿ˜ƒ

amber oasis
#

Just add CF blobcat

unkempt hamlet
#

I did, but I am using Let's Encrypt certificate (which auto-updates and installs from Cpanel itself)

amber oasis
#

I got LE between my host and CF

lilac patio
#

semes liget get bots for teligram, kik, skype and more

small ermine
#

Not exactly proper development, BUT I did make this from our db...
Basically a really helpful spreadsheet that has links that might be needed, a search for a VTC, list of all of them, some stats, and other stuff ๐Ÿ˜…

#

It's helpful for the people who are helping me, and doesn't show things like passwords or actual information

pearl badger
unkempt hamlet
amber oasis
small ermine
#

๐Ÿ˜‚

shy swan
small ermine
#

๐Ÿ˜‚

wicked lava
#

๐Ÿ˜„
npm -uninstall

shy swan
#

three months later

unkempt hamlet
left fern
#

๐Ÿ˜‚

small ermine
#

๐Ÿ˜‚

#

That's amazing

opal arch
#

It did not load for me ... ๐Ÿ˜ฆ troll

drifting wasp
#

^ Canโ€™t tell if your serious ๐Ÿ˜‚๐Ÿ˜‚

small ermine
#

๐Ÿ˜‚

opal arch
#

Of course I am not, I added the troll ๐Ÿ˜„

small ermine
#

Wut

#

Oh xD

#

Thought I'd loaded general

#

๐Ÿ˜…

unkempt hamlet
#

It's magic ยฉ

small ermine
#

Ooh

#

๐Ÿ‘€

small ermine
#

I've got links, but they can't be clicked on any mobile/tablet or a small window size?

opal arch
#

Maybe bad styles? ๐Ÿค”

small ermine
#

ยฏ_(ใƒ„)_/ยฏ

#

but it's annoying ;-;

#

took literally hours to get it all neat

opal arch
#

Send me

#

I will test ๐Ÿ˜„

small ermine
#

okie

small ermine
#

Foxed

#

๐Ÿ˜‚

opal arch
#

LOL

small ermine
#

๐Ÿ˜›

north flax
#

Trying to decide on a language to start with for an idea for a project :p
Primarily considering kotlin, python, go, and elixir.

All of them to get better at the language, and in Elixir's case it would also be a start at learning a functional language. ๐Ÿ˜›

small ermine
#

Ooh

opal arch
#

@north flax Assembler weSmart

lean rampart
#

hey

amber oasis
#

Assembly is totally the wrong language, knowing wolfie

#

Elixir is worth it

cinder spear
#

Assembly is worth knowing but you'll most likely never come across a situation where it's the best choice

north flax
#

Ended up starting it in Python. And had time to get annoyed at stupid shit in PyCharm and pip, namely bad error messages.

#

For example:
Duplicate entry in python interpereter list => "The file .../python.exe does not exist". It did exist.
A package's dependency doesn't work on linux => "Could not find the package"

unkempt hamlet
small ermine
#

That's kinda disgusting ๐Ÿ˜‚

unkempt hamlet
#

That's kinda proxy troll

unkempt hamlet
amber oasis
#

Did a couple of regex crosswords

#

they can get quite tricky

languid needle
#

is there anyone that knows about discourse?

small ermine
#

Probably someone

languid needle
#

im just waiting

unkempt hamlet
#

I know

amber oasis
#

Just ask ๐Ÿ˜‰

small ermine
#

Don't ask to ask, just askk

lilac patio
#

you guys gonna like this

#

i changed layout

#

now gonna make Server Status

unkempt hamlet
#

Meh

small ermine
#

i did a thing

shy swan
#

Advertising in Rich Presence... lol

small ermine
#

๐Ÿ˜‰

#

XD

unkempt hamlet
#

๐Ÿ”จ

small ermine
#

wut

#

๐Ÿ˜‚

wicked lava
#

You need a mobile version

small ermine
#

ah

#

no clue ๐Ÿ˜‚

#

ah wait

#

I know

#

XD

#

because it's transparent

#

might work now

shy swan
#

Tru

lilac patio
#

lel

#

mine more complex

small ermine
#

meh

unkempt hamlet
#

Mine

small ermine
#

mine's using third-party software soooooo

#

๐Ÿ˜›

#

lazy

shy swan
small ermine
#

oooooh

#

How hard can it be for a total beginner? ๐Ÿ˜‚

shy swan
#

Just entering everything you want there.

small ermine
#

ah

shy swan
#

The hardest thing would be to create an application on discordapp.com and uploading the pictures.

lilac patio
#

there we go

#

i had to change top title

shy swan
small ermine
#

๐Ÿ˜„

shy swan
#

Not as detailed as yours but contains only the useful information

lilac patio
#

yeh

#

look how far i maked in bot

#

getting there

#

30 Commands in total in my bot

amber oasis
#

this isn't the place to advertise your bot

small ermine
#

but technically if you're showing off some development skills ๐Ÿ˜‰

#

i guess it's technically ok

#

ยฏ_(ใƒ„)_/ยฏ

lilac patio
#

XD

#

well @small ermine my skills in nodejs Brill

#

and problem is this was my last project past

small ermine
#

xD

lilac patio
#

this was my last project i made but it kinda died out fast because i havent resently updated it

#

that bot died out fast

#

all codes broken and bugged as hell

#

was like 3 man workers on there 2 abanded for not helping me no more and for me that project just gone

#

so kinda i rebrand new project RN with new bot

#

with fixed codes

#

resonal why is this

#

not just discord

#

other bots too

#

@small ermine let ya know i have to make this APIs in java too for Minecraft Plugin so more complex to me

#

i already made Mixer/Twitch side

small ermine
#

๐Ÿ‘Œ

north flax
north flax
small ermine
#

๐Ÿ˜‚

amber oasis
amber oasis
north flax
small ermine
#

๐Ÿ™ƒ

rich flint
#

ooh

small ermine
#

Fancyy

opal arch
#

Yay ๐Ÿ™ƒ

small ermine
#

๐Ÿ™ƒ ๐Ÿ™‚ ๐Ÿ™ƒ

amber oasis
#

blobcatjoy Lisp of all things

#

blobcatjoy first version of reddit looks to have been using plain-text passwords

cinder spear
#

it was a very different time 12 years ago

opal arch
#

@amber oasis But when you forgot your password, you could get it back! weSmart kappa

rich flint
#

back then you didn't worry about hackers stealing your passwords cos people were still trying to steal your wallet LOL

lilac patio
#

im so tired RN like i been up try setup Linux on my other Pc but because was running so slow, idk what i pose do now

lilac patio
#

Anyone good at java. To me I just give up

small ermine
#

Javaaaa..... Not me ๐Ÿ˜‚

wicked lava
#

Just tell us your problem and we'll see whether we can help

small ermine
#

Hell

#

O

lilac patio
#

well i try make plugin detect SQL so for example if someone registered on site and gives the role in database, but if user is VIP and ect then if thy add thy MC username on site and if thy join server then thy automaticly give them the Role when joining?

#

problem is idk how do in SQL and loop it to check

#

for example if are VIP then Plugin can exicute command on server

#

if get i mean

#

i never coded in SQL with java and stuff do that mostly ik how exicute commands thats it

lilac patio
#

guys

#

TruckersMP error

small ermine
#

You're late xD

lilac patio
#

XD

#

ik

#

i found out

#

i need dat image btw

#

idk how get it

#

?serverinfo

night rootBOT
#
๐Ÿšš TruckersMP ๐Ÿš› is unavailable.
Owner

HumaneWolf#0001

Region

vip-amsterdam

Channel Categories

9

Text Channels

61

Voice Channels

9

Members

7914

Humans

7906

Bots

8

Online

2001

Roles

66

small ermine
#

๐Ÿ˜‚

#

Google it?

lilac patio
#

fastest way

small ermine
#

There'll be something there xD

small ermine
#

๐Ÿ˜›

lilac patio
#

failed

#

failed again :/

small ermine
#

Nope

lilac patio
#

forgot dat command already

#

XDD

#

anyways but yeh i forgot april 1st

small ermine
#

Accidentally pulled a Sword Art Online

#

Re-made our login system

#

Forgot to create the logout script ๐Ÿ˜‚ ๐Ÿ˜‚

lilac patio
#

is this correct

#

for edit info

#

i trying make profile editer page

#

and database doesnt allow me do it

pearl badger
#

@lilac patio just dont use sql

cinder spear
#

what's e

#

nothing wrong with sql

#

get into the habit of using prepared statements

lilac patio
#

E part of error message

#

if erros line

#

problem is idk how to update info

#

thats i trying do

small ermine
#

Hello @ember canyon.

#

๐Ÿ‘Œ

lilac patio
#

๐Ÿ™‰

small ermine
#

๐Ÿ˜‚

wicked lava
#

atm I try to design a responsive design for a web page. I can easily adjust the design by media queries, but I also need to adjust some click events of certain html elements (using js).
Both should be changed at the same particular viewport width.
Now the problem is... for the media queries, the scrollbars are included - but for $(window).width() which I'm using to retrieve the width in js does not include the scrollbars.

How can I make both refering to the same width so both the design and the events are changed at the same width?

opal arch
#

@wicked lava Use flexbox ๐Ÿ™‚ ๐Ÿ˜„

amber oasis
#

also, forget about using JS, responsive design is best done in pure CSS

small ermine
#

^-^

wicked lava
#

Is there way to change event listeners using css? @amber oasis

amber oasis
#

no, but you don't need events for responsive design

#

use media queries

#

as well as flexbox and grid

wicked lava
#

I think I need to be more specific...
I have built a little month choice like this. Using media queries I made the choice items stack below each other if the viewport is smaller or equal 767px. That already works fine.

Now my idea was to collapse the non-selected choice items in the mobile version. They should be shown when I click on the active item and hidden once I click on the active item again.
So I need a click event listener on the active item.
But in the PC version the choice should be non-collapsible. So I need to detach the listener as soon as the page gets wider than 767px

opal arch
#

@wicked lava So make it easily with JS and hide/show it with CSS

#

If the resolution is higher than 767px, do not show the item. If the resolution is smaller, show it.

wicked lava
#

^ And this condition is problematic. How do I check whether the width is greater/less than 767px?
I already found $(window).width() but there I got the problem that it doesn't count the scrollbar while media queries do count the scrollbar.

cinder spear
#

so you want it to be a dropdown for mobile but list for PC despite the viewport size being the same?

wicked lava
#

No. The device doesn't matter for me, only the viewport size

cinder spear
#

I wouldn't detach the listener, but check window.innerWidth in the listener

#

otherwise you'll need to be attaching/detaching it on window.onresize

wicked lava
#

ah... window.innerWidth was what I needed :D
I also just found another way: not checking the window size, but checking the css properties that I change with the media queries. If the property is one that I only apply on the small version, then the window is obviously smaller than 767 px.

Thank you three for your help ๐Ÿ˜ƒ

cinder spear
#

yeah you could also use that

#

like if you have a tracking pixel (1x1 image that only shows for tracking purposes), could change that based on media queries and check its propertiess

lilac patio
#

i still confused RN

#

look at mah screenshot for sec

#

and look at my code

#

i cant update info in PHP

#

by sipific login

cinder spear
#

what's the error tho

#

oh

#

what's $query?

#

on line 4 in your hastebin you use $query, which hasn't been defined in that function

lilac patio
#

is where databse reads at

#

$db is where server connected

#

$query is where exicute database

#

like example for login

#

are looking in it @cinder spear

cinder spear
#

yeah but you're using $query without defining it

opal arch
#

@lilac patio It is very unsafe

#

You insert the username into SQL query

north flax
#

@lilac patio Do not ever use thet query in production. Learn to use prepared statements.

lilac patio
#

meh

#

i gonna update to soon anyways

#

but much is bassic login sytem

hollow shadow
#

Why speed limit 150km/h ??

rich flint
#

because we wont have idiots flying and crashing into each other

#

it might be bad but can turn into the best thing ever

hollow shadow
#

@wicked lava thx

amber oasis
#

never use md5

lilac patio
#

question all is, is this good BET or NOT. i try get river RFR to ETH and ETH to Bitcoin. i have like $20 of RFR

#

prices on both

#

what i got corrent

amber oasis
#

This is a developer channel, not a crypto currency channel blobcatjoy

small ermine
#

๐Ÿ˜‚

#

I don't even know why bitcoin is so tiny, like what is 1 bitcoin?!?!?

lilac patio
#

ยฏ_(ใƒ„)_/ยฏ

#

much is i got River RFR

#

and got Bitcoins now

small ermine
#

I've been looking at the API, and he Steam API

#

Can you tell me if I've got this right?

#

So, I get provided with a link to both the TMP profile and the Steam profile. I can pull the IDs from that, and check the TMP API for that user. Then I can check if the Steam IDs match up. If they do, I can look at the hours the person played on ATS and ETS2 through the Steam API.

tidal zodiac
#

That is correct but all you really need is their Steam ID. You can pull their TruckersMP info from the TruckersMP API with their Steam ID. And just note to pull their hours from Steam their profile needs to be set to public

small ermine
#

Oh does that work too?

#

I was using the TMP API to double check the Steam ID

#

Since the user has to provide both steam and TMP links so that the other people can click it, is there a way to pull just the IDs from the links they give?

ember canyon
#

Elaborate?

small ermine
#

The user sets their TMP and Steam profile links in their profile on my site. Is there a way to turn those links into just the IDs before sending it to the API?

ember canyon
#

Ah, I think I get you. So you are wanting the user to input there profile link & then you want to get the data from the API?

small ermine
#

Yeah, well they save the links to their account, but I want the info from the API to find hours played, so I don't need the full link, but it's good to keep the full link xD

#

They save the profile links, and the IDs on their own are needed only behind the scenes to get the data from the APIs

#

They can still see the links

ember canyon
#

Right. ๐Ÿค”

small ermine
#

๐Ÿ˜… not the best at explaining it

#

But basically, I want to grab their link, and get just the ID from it before using the API

ember canyon
#

Right.

amber oasis
#

Little fun hack to get the number in a url if it's known to only contain the ID of the user: filter_var($url, FILTER_SANITIZE_NUMBER_INT)

#

If you input https://truckersmp.com/user/50 to that function call, you'll get 50 out

#

If you enter https://truckersmp.com/user/50?123 you'll get 50123 so the ID has to be alone in the URL

small ermine
#

Awesome!

amber oasis
#

You'll see the forums pass the full World of Trucks URL to get their plates

#

behind the scenes, that's what I do

small ermine
#

Ahh sweet! I'll give it a go

amber oasis
#

You are relying on the fact that the user provides a correct url without any extra fuzz

#

the plates api doesn't really cause any issues if it's incorrect, hence naรฏvely doing it that way

#

if it results in an invalid call, it'll still be cached, so no extra load is exerted on WoT

small ermine
#

That's good(?)

#

๐Ÿ˜‚

amber oasis
#

yes

small ermine
#

Sweet

#

I'll do some fiddling with this

amber oasis
#

basically the understanding I have with SCS is as long as WOT API don't cause any issues to them, it's ok

small ermine
#

Cool!

#

Can I also use your API to check any current bans?

#

I read the docs but I got slightly confused xD

amber oasis
#

WOT-API doesn't interact with TMP at all

#

it's 100% for WoT

small ermine
#

That's good

#

But can I still check if the player has current active bans using the TMP API?

#

๐Ÿ˜‚

#

Spelling on point

amber oasis
#

It's not accurate iirc

small ermine
#

Ah okay

#

Fair enough

amber oasis
#

I vaguely remember the API not making it clear if a ban has expired in some edge cases

small ermine
#

Ah okay

wicked lava
amber oasis
small ermine
#

Now then

#

got your TMP API workin

#

I'm having trouble getting the hours played on the STEAM API for one specific game

#

๐Ÿ˜‚

#

oh wait

#

nope that just broke it XD

opal arch
#

It is by Steam. What have you been expecting? troll

small ermine
#

I can't use the appids_filter

#

xD

#

I did it

#

๐Ÿ˜น

opal arch
#

So big spam by you ๐Ÿญ

wicked lava
small ermine
#

convert minutes into hours w/ php? not working ๐Ÿ˜‚

opal arch
#

$hours = $minutes / 60; troll

small ermine
#

oh yeah ๐Ÿ˜‚

#

shhh

#

one more thing

opal arch
#

What the hell

#

Why do you react to your own messages?

wicked lava
#

why not

small ermine
#

how?

opal arch
#

wut?

small ermine
#

I have this array from json_decoding the API stuff

#

i only want the playtime_forever

#

on its own

#

howwww

opal arch
#

$array[0]->playtime_forever?

small ermine
#

yeah, thanks ๐Ÿ˜›

opal arch
#

No problem โค

small ermine
#

@opal arch using krav as an example ๐Ÿ˜‚

opal arch
#

NO

small ermine
opal arch
#

I did not have time to click that ๐Ÿ˜ฆ

small ermine
#

๐Ÿ˜‚

#

it's pwd-protected 4 now

opal arch
#

Almost 2500 hours LOL

small ermine
#

xD

opal arch
#

Addicted as me on Redbulls troll

small ermine
#

double checked, it works

#

๐Ÿ˜‚

opal arch
#

Try for me, please!

small ermine
#

maybe

#

you only have ETS2?

opal arch
#

Yes

small ermine
#

thought so

#

๐Ÿ˜›

opal arch
#

I am not American boi

small ermine
#

xD

opal arch
#

I have 1000 hours in ETS2 caugh caugh

small ermine
#

XD

#

206 hours on record

#

๐Ÿ˜น

opal arch
#

Shhh

#

Remove it

small ermine
#

๐Ÿ˜›

opal arch
#

Nobody should see it

small ermine
#

๐Ÿ•‹

opal arch
#

The box looks like a box from CS:GO KZ LOL

small ermine
#

xD

#

kaaba

opal arch
small ermine
#

xD

wicked lava
#

Reminds me of my forum signature

small ermine
#

๐Ÿ˜„

#

got it to work with the DB

#

that's going in our driver panel

opal arch
#

Oh, God. I will not login there ๐Ÿ˜„ ๐Ÿ˜„

small ermine
#

๐Ÿ˜‚

opal arch
#

GDPR, do not forget! kappa

small ermine
#

I can get it to do that from profile links

#

๐Ÿ˜›

#

it's non-identifiable data!!!!!!!

#

๐Ÿ˜‚

#

anyway

#

it'll pull the integer IDs from the profile links, put that into there, and pull the hours played

#

then put it in the db

opal arch
#

But I store IPs of InsertSecretHere ... I think I should do something ๐Ÿ˜„

small ermine
#

XD

#

probably!

opal arch
#

I store so many data about users ... :/ ๐Ÿ˜„

small ermine
#

xD

opal arch
#

Like if you apply for a position, you must insert many data about yourself

#

So ... ye

small ermine
#

๐Ÿ˜‚

#

wow

opal arch
#

? ๐Ÿ˜„

small ermine
#

well I got it to work

#

you just input your ID for us (e.g. 1)

opal arch
#

ok

small ermine
#

๐Ÿ˜„

#

will be put on a panel as soon as it gets made ๐Ÿ˜›

north flax
opal arch
small ermine
#

๐Ÿ˜‚

opal arch
small ermine
#

xD

wicked lava
#

Why do you need 2 bytes for a value that can't even reach 255? Does that make sense?

amber oasis
#

Thats the only time in computing where future proofing something makes sense ๐Ÿ˜‰

#

When eg. .bmp was made, the norm was black and white monitors

#

they couldn't foresee what color depth would be useable in the future

#

And it can reach a value of 0xFF, but it won't make any sense, as your monitor won't be able to display it

wicked lava
#

I wonder if anyone still uses Bitmaps when we are able to display such a high color deep ๐Ÿ˜„

north flax
#

From the description of a project:

========================
Known issues:
========================
[...]
In case of intoxication ( using [Project name] under Windows ) please call your doctor immediately.
rich flint
#

ahh right so the caching failed

opal arch
#

Speedlimiter is actually everywhere ๐Ÿ˜„

amber oasis
#

Use fileinfo() to get the last write time ;)

rich flint
#

Well it's all done thanks to StuartD helping out. https://api.sgtbreadstick.tk will now get the TMP Server Status API and chache it every minute :3

#

well

#

as soon as someone visits it or it is being used by another site it will grab the API but it will be cached for others when they visit during that minute, if nothing uses it, it won't cache or grab anything

north flax
rich flint
wicked lava
#

Why are you using the Desktop tool... use the command line

rich flint
#

I find desktop one easier to use tbf

shy swan
#

Ew spam

rich flint
shy swan
rich flint
#

lol

#

I forgot about doing the release and just did it today lool

#

but yeah v1.2 is out, have a look ๐Ÿ˜‰

#

And before you complain it's cached via my API

shy swan
#

Wew

#

I will check the code later... Iโ€™m on phone

rich flint
#

Alrighty

#

It looks awful on phone cos yaaay bootstrap 3 ๐Ÿ˜‚

north flax
rich flint
#

oh rip

#

i'm just making it better ๐Ÿ˜›

shy swan
#

Looks the same. iPhone 6S.

#

So, itโ€™s nice!

rich flint
#

๐Ÿ˜›

amber oasis
#

pretty slow

rich flint
#

slow?

#

i bet my host is having issues again -_-

amber oasis
#

took a good second at least on first load

rich flint
#

it's having a moment again probs

#

try now

#

took about 0.4 seconds to load for me

amber oasis
#

it's a symptom that something is wrong, perhaps your cache is hanging for example ๐Ÿ˜‰

#

in certain cases you could for example opt to serve stale data

wicked lava
#

Isn't it normal that the first load takes a bit longer? I mean... before it can be cached, it needs to be loaded at least once ๐Ÿค”

#

Or do I get sth wrong?

rich flint
#

it's going from the API to a MySQL database and then it loads the info from the database and every minute (if there's a visitor) it will refresh the data

#

plus there's the CSS, JS, FA and that stuff as well to load too

#

however for the API itself, it seemed to have taken about 100ms-200ms to load

#

even after clearing all cache and stuff

amber oasis
#

@wicked lava first load is normal to be longer yes, but he had already had someone else open the page, in which case, serving stale data is possible too

#

TMP does that somewhere

#

I think it was for the time endpoint, where it's not a huge issue if stale is displayed

#

might also be on the servers endpoint itself

north flax
#

Servers endpoint ye, caches for 1 min and serves cache isntead of db data

amber oasis
#

One of the endpoints will serve stale as well

#

can't remember which blobcatjoy

#

at least one

ember canyon
#

@rich flint You should use curl instead of file_get_contents ๐Ÿ˜‰

rich flint
#

i haven't tried curl so idk

#

also i had to update my DNS on my pc to google's just to access discord -_-

ember canyon
#

good thing about curl is that is has a timeout so you could say after 1 or 2 seconds of not getting an answer from the server it will stop trying. file_get_contents will try forever and takes about 60 seconds for that to timeout

rich flint
#

hmm i'll try it

#

that's if i can try and get it to work or something

small ermine
#

Hey I'm testing something out and I'm getting a Fatal error: call to undefined function password_verify()
I'm using PHP 7.2.4 for it

#

It all used to work ๐Ÿ˜‚

rich flint
#

well obviously the password_verify() isn't defined by looks of that tbh

north flax
#

Except that it's a valid function, and it's a part of the PHP core

rich flint
#

hmm

small ermine
#

Yeah

#

It's worked before

#

Like yesterday ๐Ÿ˜‚

#

I set it up properly

#

It's worked for weeks and weeks

#

So I have no idea why it isn't working

rich flint
#

try using an older php version?

#

that sometimes fixes things

small ermine
#

I would but it's supported by any PHP over 5.something and I'm on the latest xD

rich flint
#

try 7.1

small ermine
#

I literally had it on 7.2.3 a few days ago

#

Workin

rich flint
#

working on 7.1?

small ermine
#

XD

#

I'll check

#

Now then

#

Why does it work on 7.1.16 but not 7.2.4?

#

๐Ÿค”

rich flint
#

updates can break things ๐Ÿ˜‰

#

i mean look at windows 10

#

well

wicked lava
#

speaking of windows 10 updates
sometimes when my windows tries to look for updates automatically I get a bluescreen

rich flint
#

rip

ember canyon
#

yup, works alot faster for me ๐Ÿ˜„

rich flint
#

i did timeout at 10

#

what would be the best timeout duration?

ember canyon
#

1 ๐Ÿ˜„

rich flint
ember canyon
#

๐Ÿ‘

small ermine
#

Fairly simple way to check if it's new enough data

#

Awesome

#

Been meaning to figure that out

rich flint
small ermine
#

Ouch

#

I've had problems with things like that before, I couldn't figure it out so I always completely remade the repo or whatever

#

๐Ÿ˜‚

rich flint
wicked lava
#

Use the command line...

That desktop tool is as if you built your website using wix ๐Ÿคข Easy but bad style

rich flint
#

there

amber oasis
#

blobcatthonking that's a terrible error message

#

You essentially need to know the github desktop app to be able to help someone with that error

shy swan
#

I used that Desktop versions before... then I switched to command line because you never get errors blobokhand

amber oasis
#

Not working with git that deeply then blobcatjoy

rich flint
#

I've no clue how to use command line tbh

#

i know the fix to that

#

i just gotta delete the "/.git/refs/heads/v2.0" file and it should fix the issue

north flax
#

Google "git <what you want to achieve>"

#

If you use something regularly you'll learn it by heart quickly

amber oasis
#

git commandline isn't very hard to pick up

north flax
#

Ye, it's usually along hte lines of git <term for what you want to do> or git <term for what you want to do> <name> <add/remove/edit> or something like that

#

i.e. git commit. It's pretty simple to guess when you know the terminology :p

small ermine
#

Righty, I'm back ๐Ÿ˜‚

rich flint
#

gg

small ermine
#

but i think me randomly typing has figured it out ๐Ÿ˜‚

rich flint
#

ugh, the icon keeps refusing to show -_-

small ermine
#

;-;

#

sometimes it goes funny for https

#

^^^

amber oasis
#

pro-tip: don't self host FA

#

Your site is fairly slow to respond with the assets

small ermine
#

i should use FA instead of these glyphicons ๐Ÿ˜‚

amber oasis
#

either works, pick your favourite ยฏ_(ใƒ„)_/ยฏ

small ermine
#

FA definitely

#

๐Ÿ˜›

cinder spear
#

self hosting assets available from a CDN is only a good idea as a fallback

#

client has blocked the CDN? Load it from your own instead

#

it's a rare case though

rich flint
#

i don't use FA 5 because many icons i used before were taken to this stupid "Pro License" and $60 is not what i'll pay for something that was free

#

also why is it bad to self-host FA?

wicked lava
#

Using a CDN is faster

rich flint
#

ahh ok

#

i might make it fa 5 with CDN, but FA 5 has some icons i used sent to pro

amber oasis
#

By using a CDN, you are more likely that the user has it in cache already

rich flint
#

ahh

amber oasis
#

for popular libraries like FA and Jquery, that's a very good idea

rich flint
#

well jquery is also self hosted, should i put that on a CDN too?

amber oasis
#

*get it off a CDN

#

you don't put it on a CDN yourself, it's already there

rich flint
#

well yeah

amber oasis