#programming
1 messages ยท Page 10 of 1
๐ โค

Oooh
Anyone good with API's here? ๐ค
There are several types of apis, and each has a different interface.
I am wanting to use the 'PUT' method... I can't see to make it update the data.. I just brings backUser ID not define
Again, there are a lot of different API's. Starting with saying what API you're trying to access, and what endpoint, is a good start, else people won't be able to help.
code + error and some more infromation on which API you're using
Hi ๐
๐
basically this https://i.sgtbreadstick.tk/LlszgY0j.png
i tried width: 100%; any many other things, didn't change
So, your .footer is absolute, so it will not inherit width/height of parent element
oh
rip me lool
i changed absolute to relative but it seems to have done this https://i.sgtbreadstick.tk/2FuOGpSM.png
tbh i coded it from scratch so it looks a bit ugly rn
Did you want to footer being fixed to the bottom all the time?
well so it goes to bottom but not fixed so it is at bottom of content all the time
it worked before
but i lost the code due to my pc dying
๐คฆ
๐
XD
bad decision 
Is Discord Bot Maker actually any good? I want a bot and have no experience
wow
Lol. @slow wagon I am the moderator of the whole Discord Bot Maker Program community
It uses discord.js so it's very good. But you'll have to be in the community. Otherwise you don't get support lol
Some other users of the TTL community got DBM too
And the bot from TTL was made in DBM
oooh
And there are many good mods
so worth it? ๐
In my opinion yes
alrighty
I would just program it myself :p
That's why I started develop mods for the program
ooh
Learning Javascript to Typescript isn't that hard
Make a new clean VPS. Only allow connections via ssh keys
No password based ssh
Then I dunno, never used cpanel xD
What is the rat???
Is it a live, physical, rat?
if only looool
Rats are little animals 
Is the server in someone's living room, and they put their pet rat cage on it? xD
Still confused
i'm a little bit confused
but someone managed to get SSH access to root and they said they put a RAT on it
Who told you so?
someone called kontrol
Check SSH access logs.
kontrol#7972
Check if any unknown IP has connected.
Is kontrol is OVH representative?
nope
Then blick him for good
but his IP showed up with access to the vps
we blacklisted it
so now hopefully he shouldn't access it anymore
Yes, but make sure your SSH keys work.
i hope it works :/
Because if they don't, or you lose them, you can't get back in
We should have the RAT emoji from now)))
๐
Oh yeah
So, there is no Spectre and Meltdown
This is only a ๐
Anyway, CPanel should have 2-Step Auth as well

It's like a mouse 
๐
Imagine the person who made the RAT you downloaded was some 4chan troll and every day just changed your windows font to comic sans rainbow :^ )
awe, that' is pure evil
That's funny https://status.npmjs.org/incidents/41zfb8qpvrdj
๐ ๐
How are y'all getting the embed thingy when the website is posted?
Hm.. My discord is dead xD
Yeah like that up there ^
@slow wagon They are HTML tags on the page, canโt remember what they are right now
And they have different tags as well for Facebook and Twitter
Open Graph http://ogp.me/
is what you're looking for @slow wagon
Oh thanks
Do u need anything or is it just put in the meta tags?
Um... What do u want actually?
It's the meta tags, just look up what the tags actually mean and what you should put there
Alrighty
Sorta managed to get it to work lool https://i.sgtbreadstick.tk/qWOAV3GT.png
it actually did set it to london but it's just called eu-west
yea server regions have different names in the clients and internally
Anyone here experienced with using mybb who is willing to help?
Also, saying what it's about makes people able to judge more whether they can help or not
hmm guess, what i am looking for isnt entirely for mybb although i can use it for mybb
So....?
"Anyone here experienced with using mybb who is willing to help?" looks like a question to me
Be spesific, nobody is going to bother answering without knowing what they are getting themselves into
invisionpower is better IMHO
it's what TMP use too
timely security updates, solid support and easy to use both for users and admins
Yeah but it's not free tho ^
last time I used a free forum around ~2011, SMF was the best
Problem I have with IPB I find hard to integrate it with a website
what kind of integration?
it has a REST API and it isn't difficult to use the forum session for login either
IPB is horrendous 
never had significant issues with it
We have random shit issues every now and then
O.o
Does anyone have any experience using firebase? If yes can you tell me your impressions?
It's alright for simple things
I like that description: It's not good, or fine for a use case. It's almost fine xD
Lool eeeeh... I guess I'll just try it with low expectations.
I got high expectations, because forums haven't changed in over 2 decades.
the only other thing that's stayed the same for that long is people's reluctancy to support ipv6 
Yeah, that's not a group you want to be associated with
It's like the antifa of the IT world
yeah
@full locust one thing to say about Firebase - documentation is a good damn joke...
Lool...so then it's trial and error?
No, docs are just bad as is
Many examples online, but no good example in docs
To be clear - SDKs are really straight forward
I am using official JS library (app/database/auth) + firebaseui-web for an auth
Ohhh okay, thanks. What I'm looking for is somewhere to stored raw data from a crawler I'm making online so that other members of my team and myself can transform it at a later time.
You can totally do that. But keep in mind - there are API calls limit for a free tier.
Also, db space limit.
They have a file storage too.
Ohh? of course
lool didn't take that into consideration at all...
Just set up a Postgres database
I hate it when you type something nicely formatted into paragraphs, then submit it, and the page replaces all the new lines with a single space
๐
can someone explain why web hosting is insanely confusing
elaborate?
I'm trying to use my vps to host a website, but all the tutorials I follow haven't worked..
Hmm normally it isn't that complicated, but there can be many problems that cause the whole thing to not work
Casued by the google ads.
Ah, i see
I actually suggested that to be changed but it got rejected lol
that was before i joined the team lel
I think I remember it being declined once. Don't think it's a big job to change it to a responsive bit of ad code, but I can't really do it.
I believe you declined it aswell xD
Can't remember
All you do with ads in css is
*Ad id* {
max-width: 100%;
max-height: 100%;
}
If that doesn't work the try the !important tag. ๐
It's not that simple... you need to update all the ad units to be responsive which means create new ad units and updating all their codes.
Using !important should be avoided at all cost
Here we go: https://helper.mp/vote
there's really no reason to ever use !important in a well managed project
it's useful for things like stylish so users can apply their own styles
Does anyone happen to know how to Webhook a Google form? So when someone submits the form it then pops up in Discord? I got close to ti but didn't quite hit the nail properly.
@pliant ruin use something like Zapier, I guess. I have, and it works quite well. The free version checks every five minutes I believe
๐
That, or check yourselves with a cron job and an api call
second hit on google when googling for Google forms webhook: https://productforums.google.com/forum/#!topic/docs/lBmP-2EBc90
The code in OP works for me
Just have to make the trigger as well, which isn't obvious
Nice
Would it be possible to add this header to the vote api?
access-control-allow-origin: *
Thanks ๐
Woo
Anything just i greeted
Oh XD
Well... hello guy (I won't yell about the tag but it's true it wasn't needed at all :/ )
๐
@north flax Yeah I already used that code, and I've set up the triggers correctly. But it didn't work. Might try again tho..
I get this problem
line 4 is if (e.response.getItemResponses().length < 3) {
It's why I use things that do it for me ๐


๐
@pliant ruin testing it in the code editor won't work
Yeah I did test applications and that didn't work though
Make sure the code is saved, I noticed that sometimes is a bit wonky
and verify that the trigger is setup, as well as that you have given the full URL to your webhook and authorized it
google docs should request the authorization automatically, if it doesn't, set up the hook again
It asked for it before, but unsure if that was for this code or not.
syntax error now ๐ค
Post it as a gist
^
screenshots of code are bad, and doesn't show the entirety of the code
Niceee
Missing a curly bracket at the end @pliant ruin
I removed it because it was an 'error' that didnt go awaay
set your IDE/editor to format on save
What are you writing the code in?
The google script editor..
depends what you're programming tho

Close minded much
I can't use Visual Studio code with this, otherwise I would be using I. I have to use Google script editor because I'm using it on a Google form
Need help and can't get it here? The Coding Den can maybe help; https://discord.gg/code
Developer/OpenSource oriented emojis: https://discord.gg/yk8z9bz
Advertising


๐จ

only wolfie can ban me 
Humaneeee!!!!!
Wolfie won't ban me 
Sure? 
Quite
But not completely.
I know where Wolfie lives 
Lol
takes like 15 minutes with the tube from where I am now
Mhh. Then we have to contact Discord. Otherwise you would be unbanned in minutes.
@amber oasis At work? :p
yup
You know that you made something useful, if someone rips it off. Original: https://helper.mp, ripoff: http://tmpstatus.tk (a few version older that mine).
btw, he made an autoupdate ๐
idk what it detected my language as but it was completely off
I am defeated from autoupdates ๐ Still waiting MDB Vue with complete Modals to rebuild Helper from scratch.
I'm just getting started with react
Hehehhe, they linked to my favicon. Time to be nasty 
Lol
Should say joined, but the link isn't expired, that's for sure
I love it ๐ https://www.ifltrucking.com/tmpstatus.php
ew that blinking red
I know, delightful!
Makes the list readable at all. Also, as if full servers are unusual or even a danger
and it's not like ppl need to even care until the queue is ~10% of the number of slots on the server.
lol
Red goes faster!
That's why our servers are glowing red hot.
I think you give OVH too much credit 

we're not using AMD boxes, so they are glowing red from the bits, not the cpu 
bruuh, lol well I mean at least it's back right? xD
On a different topic, does it make sense to do the CompTIA A+ certification exam if I already have a uni degree or will have one soon?
In WoT website style 
Hey, I've put nicEdit on my site and it's not doing things. I've basically broke the whole site, of anyone's available and fluent in PHP and fiddling with nicEdit..
๐
New virtualbox vm escape vouln, affects windows, mac and linux: https://twitter.com/_niklasb/status/953604276726718465
yaaaaaay ๐
Great Vue.js course, 94% off -> https://www.udemy.com/vuejs-2-the-complete-guide/
Ooh
spends all day fighting with code trying to figure out why it won't work.
3am: has an epiphany figures out the issue
like bruuh ๐ญ ๐
๐
I did that recently
I was working with an API I was making.
And I was confused at why it was throwing 500s everywhere
So I googled "PHP", and guess what??
<? php is DEFINITELY not how you do it ๐
lol
that feeling when you've done a fairly large change to a codebase, and it works as intended first try
โค
Your emoji bots prune command continued deleting messages on my discord. @amber oasis
lol, it's a command that wasn't meant to be included at all XD

it carried over from my selfbot
yeah, I got one that makes some things easier, doesn't do anything fancy
But it is illegal.
Itโs against Discordโs Tos if youโve got something which logs in via a users token.
You need an application on discords dev page for that.
It's not actually mentioned in their ToS 
Basicly: don't screw up
Well. That's weird
the reasoning for the support article is to make your average user not do it, since the average user is known to screw up a lot
Yes you're right. But I still prefer bot applications
I'll often simplify things down to "don't do it", even if it's technically allowed, but where the technicality requires you to understand where the line goes
If what I do with my selfbot was possible with a bot account, I would
and do
Okay. You won... 
my selfbot aids me for example it tracking when I get pinged and where
if you update emojibot to 3e5949e, you'll be right before the point where I started making it use a database
I'll be rolling out an update to it some time today, so if you want to use my hosted one instead, I'm posting a link to invite it to your guild soonโข
@shy swan ^
Okay. Thank you for the info! I may do that
but I am currently too busy.
๐
I moved from file based to environment variables backed by k8s
I'm working my way towards Consul based for config and Vault for secrets
Nice
Friend's pc, he's learning python. You can't tell me how to print my statements 
http://prntscr.com/i2y864
but you haven't learned that yet!! 
@amber oasis selfbot ๐ I expected better of you
python is a good one to know
trying to draft a message in VS Code be like
Python is good, though, do suggest learning eg. Postgres instead of MySQL
MySQL isn't all that great, it's passable, where as Postgres is excellent
It's used widely, but you should learn postgres before mysql, mysql is great if you love surprises though 
๐
had an issue with mysql recently
solution? double the RAM on the machine
always love the "throw more power at it" solutions
We used to store sessions in mysql for the game
until the entire server was slow as a dog because of the number of rows in that one table, even if it wasn't being actively queried
and it wasn't close to mem max when that happened
in memory store sounds much better for game sessions
That's what it is now, but not at the time
it's not the only caveat I've found with MySQL, and it's not really well covered, but query times can increase substantially with the size of any table within the database
0.75 sec for a SELECT .. JOIN query on two tables with ~485 million rows each
I don't remember the exact number, but we where at an order of magnitude above that
*over an order of magnitude
I can check back again when it reaches billions
I have a couple of IDE's
https://puu.sh/z7ec7/b52191fa31.png
I use phpstorm :p
$ vim

var_dump(); ๐
If you're a student, you can get all of JetBrains' stuff for free
php storm is hands down the best IDE for PHP, great support for debugging in all kinds of scenarios, and one of the cheaper ones (Zend used to, maybe still does, make the best, but it was crazy expensive)
php tools for vs iirc. is more expensive than phpstorm?
also, only windows 
yeah, my god is php tools expensive
79โฌ
actually, phpstorm is slightly more expensive; 89โฌ before you have perpetual use license
but if you are a student, it's free, and you get all the other IDEs as well
I'm trying to get all the data separated by <br> as one body of text but I can't find a solution
How the source data is formatted.
<span>
paragraph_1
<br>
<br>
paragraph_2
<br>
<br>
paragrapgh_3
</span>
what I have so far
def parse(self, response):
items = {}
review_list = []
reviews=response.xpath('//div[@data-hook="review"]')
#loop through sel times to add each comment
for index, sel in enumerate(reviews):
items[index] = AmazonItem()
title = sel.xpath('//a[@data-hook ="review-title"]//text()').extract()
author = sel.xpath('//a[contains(@data-hook, "review-author")]/text()').extract()
rating = sel.xpath('//i[contains(@data-hook, "review-star-rating")]/span[contains(@class,"a-icon-alt")]/text()').extract()
review_date = sel.xpath('//span[@data-hook="review-date"]//text()').extract()
review_body = sel.xpath('//span[contains(@data-hook, "review-body")]/text()').extract()
items[index]['customer_comments_title'] = ''.join(title[index]).strip()
items[index]['customer_comments_author'] = ''.join(author[index]).strip()
items[index]['customer_comments_date'] = ''.join(review_date[index]).strip('on')
items[index]['customer_comments_rating'] = ''.join(rating[index]).replace('out of 5 stars','')
# *** the important bit****
striped_br_text = ''.join(review_body[index]).replace('<br>','').replace('\n','').rstrip()
items[index]['customer_comments_text'] = striped_br_text
review_list.append(items[index])
data = {
'reviews': review_list
}
yield data
language: python
I just found a solution, had to tweak the xpath to throw html and all in text and then I cleaned up with replace()
Thanks for your answer tho ๐
alrighty, glad you managed to fix it
i haven't used python for a looong time tbh
i'm rly bad a python tbf
i'm surprised i actually replied with something ๐
last i used python was on Raspberry Pi 3 Model B+
loooooooooool ๐
I actually just started last month so it's quite the ride for me right now ๐ญ
rip
currently on my rpi https://i.sgtbreadstick.tk/2018-01-23_22-58-42.png
i use it to host my discord bots
wow nice, could've used your help last semester then, wouldn't have suffered so much. oh well ๐ญ
i was gonna use it to code but i gave up and that's it's only use rn
and the fan i put on it was soooo loud so i took it off
and put thermal paste and heat sink on
i'm that bad at python... https://i.sgtbreadstick.tk/2018-01-23_23-01-18.png
i managed to get something with it! https://i.sgtbreadstick.tk/2018-01-23_23-02-32.png
that's all the python i'm doing today 
how do I get someonthing like this to work for me
http://prntscr.com/i4odgd
oh wait nevermind I think I found it I remember tuxy mentioning something about rich presence
My raspberry pi is currently turned off and kind of outdated on my shelf :p
who needs a rasp pi when you can just take some 10 year old office pc to do the same & have a DVD drive (if for whatever reason you would want to watch movies on your discord bot host server) 
@amber oasis or whoever... we are able to see the Community Contributor voice channel. Change the right from @everyone โSee Voice and Text channelsโ to disabled.
Maybe @north flax looks like Tuxy sleeps. Sorry for tagging you all...
its there to make people want to join it but can't when theres people in it

like the events, support and convoy control VCs
(which apart from events are never used but they still around)
But it shouldnโt have an own category...
and I could join the events channel 
Automate swarms of office workers to solve puzzles inside your very own parallel computer made of people. A thrilling followup to the award winning Human Resource Machine. Now with more humans! FeaturesMore puzzles, more humans, more rippling bra...
Initiating Soon
A friend sent me this... and this is why you sanitize your inputs https://gyazo.com/0659eb322364b0315e1e3878ea138979
โฃ
That's little ram 
for that amount of cpu yeah
that's very little usage
making the most out of mine
but that' 1/4 of what I use :p
true
also swapping a "bit"
yeah, completely stable tho
it's my "surprised it works so well and I'm scared to touch it now" server
trying to install vs-code and end up getting corrupt/unreadable thing in temp files
why does it always have to be me lol
Have you tried turning your pc off and on again? 
AST is one thing, but getting the opcodes and tokens in a somewhat easy fashion
๐ New JavaScript features in ES2018:
- async iterators/generators https://t.co/5e9A4MMP6V
- object rest/spread https://t.co/X14jGn31Aj
- Promise.prototype.finally https://t.co/Uct3ga7KtJ
- various RegExp features https://t.co/bQQjtuKKEs
671
1281
had to fix my hdd lol
well, well, well
http://prntscr.com/i79i77
@north flax https://medium.com/@taylorotwell/laravel-5-6-preview-single-server-scheduling-54df8e0e139b
Today Laurence Ioannou, founder of the Laravel monitoring application Eyewitness.io, contributed a great new feature to Laravel 5.6โฆ
Neat, ty
Guys, I'm trying to get php mail() working on a windows IIS server (yes, not a great choice but its a choice XD). I've got this from stackoverflow or something similar but doesn't work. I don't have access to the sendmail.ini or whatever, only the .user.ini.. I've tried port 25 and 465. Any help?
SMTP = mail.truckersdatabase. cf
smtp_port = 25
auth_username = email@truckersdatabase.cf
auth_password = passwordgoeshere1
sendmail_from = email@truckersdatabase.cf```
only ever send mail yourself as a last resort
it's like time. Letting someone else handle it for you is going to save you a lot of trouble
Its for an activation email thing
if it sucks donโt use it
IIS isn't strickly suck, but it's silly to use for PHP, especially with linux boxes being as cheap as a lego brick
Linux is the lego of the IT world
On a side note, feels nice when you build a docker container, and it works
works great and easy to build upon but hurts like hell if you accidentally step on it?
My code ๐
toot toot
got grafana up and running on my own box 
I think something isn't quite right
Grafana is interpeting it as a percent value, but it's cpu seconds
you can define the unit for each stat

@amber oasis A few processor cores worth of load xD
Reminds me I should poke at the jobs botdottir does every 10 sec
since every 10 sec she has a cpu spike
Significant one
Just haven't bothered since she runs just fine, as does everything else on the same box :p
https://forum.truckersmp.com/index.php?/topic/28804-developer-resources/ has been updated a bit
Interested in developing something? Here are some resources you can use to learn, improve and run it!
ย
Frameworks
Elixir: Phoenix (phoenixf...
@ember canyon I don't like the alternative ๐ ๐
And good idea with the Linux thingies, but my friend is hosting it for me and its a really good thing I got going so


๐ ๐
BTW, anyone using Letsencrypt, make sure that you're not using the TLS-SNI-01 authenticator, it was disabled due to a security vuln

another fun challenge is to do a malicious XSS in 24 chars
that's a real vulnerability I reported to a website
where the 24 chars are inserted into a <sometag {potentially other attributes} title="{here}" {potentially other attributes}> unescaped
So, readdir's callback appears to never get called in node, typescript
Works fine with readdirSync, so not that big a deal in this specific case, since it's done once at startup
import { readdir } from 'fs';
readdir('/tmp', function () {
console.log(arguments);
});
compiles to
"use strict";
exports.__esModule = true;
var fs_1 = require("fs");
fs_1.readdir('/tmp', function () {
console.log(arguments);
});
and outputs
{ '0': null,
'1':
[ -snip- ] }
I threw in a bunch of console.log's, not one of them actually got printed to the console.
node 8.9.4, typescript 2.7.1
Node 9.5.0, TS 2.7.1
gonna update to 9 and check again
It has worked just fine on i.e. botdottir, so not sure why it's not working now
need to update the system anyway
It's also a straight up copy of how tux imports commands and such on his open source bots
directory permissions maybe?
No, it's ran on windows on the same user that owns the dir, and then readdirSync would have an issue as well
Only annoying thing is the lack of nvm, other than that it doesn't really matter
still works with 9.5
I'll write it again, probably some random mistake I miss while reading it
I'm on 9.x something on linux
I should go reconfigure netdata on my log box
9.2 is my current node version
Ye, worekd when I rewrote it. Some msitake somewhere, not sure where x3
git diff 
w0t is Stats Bot ;-;
It is a bot who stats 
But wot does it trak
Stats ofc 
huh, just found out my Raspberry Pi 3 can do FM Transmitting from 1Mhz to 250Mhz
Most micros can 
Right so, im wanting to make a website with a text and video based chat. Can anyone give me any websites that may help me to do this??
Including JQuery, HTML, CSS, PHP
Video-based chat?
Any help??
when you break your site because you didn't realise you can't concatenconcentrate
or whatever
๐คฆ
bless you
Does anyone know how to run a URL in the background without the browser opening??
With VBScript
I have done so much searching but nothing of what I found works
Set WshShell = Nothing don't work because its not supported in Visual Studio 2017
curl?
curl?
Wut ๐
@north flax Looking at Curl on stackoverflow, im not too sure of what it said. Can u please explain what it does
Most used library in the world for contacting servers over http and various other protocols in programs
And return the result to your program.
.net has the necessary stuff to make a request
Ok, I might try it if I find out how to ๐
Yeah, .net has the stuff you need built in
no need to involve curl for that
Ok thanks you to ๐
There's a few possible solutions here: https://stackoverflow.com/questions/11255688/vb-net-hide-a-window-through-code-not-is-net-window
Thanks Tuxy
Do you want a fish as a thank you?? ๐ (Really bad joke due to your profile gif)
I should stop these really bad jokes haha
lol, I was searching up like a whole long question
At least 20 words or more long ๐
keep it short and concise when googling
Indeed, I try to haha
when I do
me.visible = False
It makes my software to go invisible, not the browser ๐ค
Let me just do the HTTPRequest thing if that works
guys go install Better Discord holy looks awesome
I know, but its quite annoying sometimes
Well urm, my software just crashed ๐
Any reason why?
Tired another code, crashed again
Stress...
Hate my life ๐
Lads, im still confused man. I cant find out how to
I found some way but it opens windows media player but then I want that hidden
tf are you even doing? xD
trying to get a radio station through vb
without opening a browser
or media player
there should be an API that you can use without opening media player ๐
MSDN is a good place to start with anything microsoft
Indeed, I try that first, thank you
https://docs.microsoft.com/en-us/dotnet/api/?view=netframework-4.7.1 has largely replaced the old MSDN site for .NET
Ok, thank you
@north flax Sorry for the tag, but how do I do your way?? The HTTPRequest
I have done so many ways and the way that I have found brings up a bloody virus thing
which is with WindowsMediaPlayer
Like, I want to press button, and then the radio station plays
I don't know VBasic really
Ah, I see

it's not that difficult
Other way around in this case though, the last in the commit chain is 2 days old seemingly from git hub's ui, while there being changes more recent
Elon Musk: I'm putting people on Mars!
Developers: Fantastic, more timezones to support.
5824
12183
don't think it's relevant until there's significant consumer-level communication between the two
LOOL when you hear it :'D
https://youtu.be/7i1f23AVsn4?t=47s
Anyone here know how to make a custom automatic triplogger?
i know how, but I'm not going to code anything like that
ah, difficult?
Of course
lol, I was thinking of getting one done for my VTC
There's a few ways of doing it
a pointer for you: telemetry API
ty tuxy and ratcho
@north flax Sorry for tag, however what is the code to get discord bot to show the ets2mp server status??
I wanna update my server bot
Don't worry. Just looked at pins. I'm a noob
You need to learn to use a rest api, and use our api, to make it work.
Use google.
That's correct. However, what you need more specificly is to load a website, and parse json, to get hte data. Then you need to find our api docs
Fairs
graphQL > REST 
graphql would be overkill for the shit tmp does
the api isn't designed for 3rd parties
Graphql is cool, but a bit overkill for the limited amount of data we offer and such :p
If we had a larger, more complex set of data in our api, with more relations and stuff, it could be cool to implement graphql
You can either use the SDK, the telemetry API or something called ETCARS which is fairly new and still in development (I think there is an alpha) but it provides a local raw socket server which provides a json array and handles different events such as job submission
erlang has caught a lot of wind recently
but that has a denial of service vulnerability that you don't even need to exploit for it to be in effect
Only if you don't run it
TIL you can do shit like this: ```javascript
let getUser = osuApi.getUser({u: id}).then(v => return).catch(โฆ);
setTimeout(() => {
if(getUser) {
// getUser is now resolved
}
});```
Why you'd do that idkโฆ
I guess that'd be like https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/finally in a way
The finally() method returns a Promise. When the promise is settled, whether fulfilled or rejected, the specified callback function is executed. This provides a way for code that must be executed once the Promise has been dealt with to be run whether the promise was fulfilled successfully or rejected.
nah, the setTimeout callback is called when the stack is empty, it's even covered explicitly in the promise documentation on MDN
I guess it could have some edge case uses, i.e. to run something before a program finishes
strange af either way
Yeah, it is
Lol, tbf it's not an obvious one if you have never heard of it
When I booted my server earlier 
That lets encrypt one lmfao
@Humane That new vc private feature is a great addition ๐ However - just in case it's not too much effort - would it be possible to add a command that creates a voice channel that can be only accessed by a specific rank?
I won't say it's already there but... uhm
So what's the point in putting that here?
No, that suggestion is checked because of the "basically VC creatoers should be able to control who can access their channel"
Not planning on making a role based access any time soon
kinda looks like it isn't cleaning them up though wolfie ๐
x.x Par1 is out of everything but c1 and arm64-2GB instances on scaleway
similar deal in ams
Make a cluster of c1's, use software supporting clusters ๐
much rather use arm64s
Botdottir is running from a C1 in Par btw :p
They didn't offer arm64 when I got that c1, and I've been too lazy to move it
I wonder if you can snapshot a c1 and restore on arm64
Potentially :p
If I didn't need a paid keymetrics plan to do it, because limitations on number of servers, I might have remade it and dockerized the stuff running on that c1
Would be neat to make it possible for people to change their ranks and stuff in the browser, then we could attach descriptions to the ranks and such as well. Hmm :p
But then I'd need to make a more persistent backend for @glass rampart, and write the rank commands and management into her as well
And I am not sure how much use it would actually have x3
Just killed and nuked GA on my website :p
Now it's just that CF also tracks that stuff by default
I can relate with that one a deep level
gives project assignment in python
doesn't teach python
basically gives us 3 weeks to learn everything then a test afterwards
How do I put the TruckersMP Status API into my website??
Yes im searching and I cant find anything, plus the website isn't live yet and it only would be allowed to be viewed via my VTC Staff. Also yes, im looking at the API Doc's
@royal wharf
<?php
$servers = json_decode(file_get_contents("http://api.truckersmp.com/v2/servers"), true); ?> ```
Then you could do something like this:
``` <?php
foreach($servers['response'] as $serv){
if($serv['online']){
$status = '<strong><font color="green">Online</font></strong>';
} else {
$status = '<strong><font color="red">Offline</font></strong>';
}
if($serv['speedlimiter']){
$speedlimiter = 'Speed Limiter - <strong><font color="green">Enabled</font></strong>';
} else {
$speedlimiter = 'Speed Limiter <strong><font color="red">Disabled</font></strong>';
}
} ?>```
Hope that helps ๐
np ๐
So that would work with HTML?
echo it?
You must cache the response, the above will not satisfy the api usage requirements
And how do I do that?
ye i should probably cache it
but how ๐
magic ๐
hokisposis
done
๐
Your on visual studio code, im on visual studio community
๐
i use visual studio for c# etc
by using a cache, if you don't know how, google it ๐
@ember canyon Urm. Well it done by what some of the PHP script done but is this how it meant to be??
no
2 secs
oki
I've never done PHP before so its new to me
<?php $servers = json_decode(file_get_contents("http://api.truckersmp.com/v2/servers"), true); ?>
foreach($servers['response'] as $serv){
if($serv['online']){
$status = '<strong><font color="green">Online</font></strong>';
} else {
$status = '<strong><font color="red">Offline</font></strong>';
}
if($serv['speedlimiter']){
$speedlimiter = 'Speed Limiter - <strong><font color="green">Enabled</font></strong>';
} else {
$speedlimiter = 'Speed Limiter <strong><font color="red">Disabled</font></strong>';
}
echo '<div>
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">'. $serv['name'] . ' - ' . $serv['game'] .'</h3>
</div>
<div class="panel-body">
Players: '. $serv['players'] .' / '. $serv['maxplayers'] .'<br />
Status: '. $status .'<br />
'. $speedlimiter .'
</div>
</div>
</div>';
}
?>
```
make sure to cache it
let me know if something like that works
Should I make a status widget for the websites?
@royal wharf no that in a php file would create a dynamic html page
That should work
In .php but not as a .html file
But tbh i haventbused pfp in ages
I've never used it so
I realised that all my websites are done via aspx (asp.net) so... ๐คท I dunno what to do
You're perfectly able to get data from a json api endpoint using aspx.
No need to learn a new language for that
I see ๐ค
Oh wait. I don't think I have the jquery.js script in my traffic part of the webite anyway ๐
Let me do that real fast haha to see if it works
You'll have to make a back end regardless, which loads from our server and caches the result, so that your pageloads don't impact our service.
Indeed
What is the cache script ๐ค I cant find it
I'm bit stupid when it comes to API cos i've never done any of this before
Caching the response just means you save it somewhere. Where that is doesn't matter to us, it's just so that when someone loads your website it loads from that file, that database, or what have you, instead of contacting our api every time
https://github.com/HumaneWolf/tmpstatus/blob/master/servers.php
Here is an example, it saves the truckersmp api response and the time it was fetched to files.
When you use fetchAsJson or fetchAsObject it checks the time file to find out if it has up to date data, if not then it checks our api.
tmpstatus - A status page for the TruckersMP.com multiplayer mod for ATS and ETS2, created using their API.
Ah thank you!! ๐
So do I all that php script and the API php script into 1 php file??
No, the code I've written has dependencies. Look up composer if you want info about that, but in general, you should go and look at some php tutorials before starting to write too much code
Ok. I'm just a noob, lets just keep it as that ๐ ๐ข ๐ญ
All you need to know is how to handle files on your server using php.
If someone calls your website, your website, the php script should get the data from the api. But before you send the data back to the client, the code should create a text file on the server. It needs to contain the current unix time stamp and the content of the json you got from the api.
When someone calls your website again, the code should read that text file before contacting the api. If the timestamp in the text file is older than let's say 180 seconds, it's not current anymore and you need to contact the api again and update the textfile. But if the timestamp is not older than 180s, you just read the data from your text file instead using the tmp api.
I got some of that. Not all of it
I cannot provide an example since I'm more experienced in node.js than php
for relatively small caches something like memcached or redis can serve you better than a file on disk
Been a while guys! Here to dev and truck once again! ๐
oooh
Not sure what broke botdottir's +vc channel cleaning, but it's fixed ny anyway
wohoooo ๐ ๐
I don't get why users are unable to delete their channels themselves
yeah
Ahh
Installer be like https://i.sgtbreadstick.tk/y1Lr4Kxf.png
been stuck on that for at least 30 mins
just on 94% thing
it said Applying earlier but does nothing
well i go look for a "Build" button, i spent 10 mins looking for what i think is meant to show up and i can't seem to find a build button -_- https://i.sgtbreadstick.tk/8uDmFGXC.png
i knew i shouldn't have started using visual studio
all i am doing is compiling source code
๐
why do i even try... https://i.sgtbreadstick.tk/cZqawsN4.png
is that unknowns?
yes
i just changed the background for simple mode to see if it works
and instead i can't even compile it lool
lol
where's your csproj?
csproj?
...the project file that defines what runtime your project should be built against
it can't build the project if it doesn't know what to build it for
I'm surprised you have that much code without one tbh
usually you start a project by creating the csproj (or having the IDE create it)
all i did was grab the files and put them into...
well it just crashed
so how do i add all the truckersmp launcher code to the project?
You can't TruckersMP launcher is propritary and reverse engineering it will result in a permanent ban per the ToS
It's unknown no's laucher source code not official one lol
Ye seen as he put source code to it on github
I mean I'm not that good. Like i can reverse engineer a program. That's just a miracle LOL
Haha
Well you can change it to launch anything I guess, or make your own custom launcher
Or just find out how it works
Hi
Loads
got this working ๐
mhm looks nice
Thanks ๐
Ooh
Still doing a bit more PHP ๐ ๐ then I'll do some of the nicer languages ๐
Javascript isn't nice 
Haha
Well another language then ๐
Besides PHP
Anyway, are there any devs around here that have a bit of spare time to help me out with a certain trucking-related project, involving making a new better looking panel? My designs aren't the best ๐ ๐
I just make a ets2 mod which is trailer colour
Would it work in ets2mp?
Its just a blue trailer
Which I done my self
I did find a ets2mp blue trailer mod but it wasn't the right type of blue for my vtc
I don't want to cause any issues so
Don't worry. Found ForeRunners software thing ๐
Hope it works
๐ค Well... It didn't even enter my mod menu thing
Probs compressed it wrong
๐คฆ I'me ever so stupid
I can't get mine working, it broke my TMP ๐ ๐
lol
@royal wharf That mod should work, but you need to attach the trailer in SP, deactivate the mod and switch to MP again
Yeah thats what I been doing and I been overriding the trailers also but nothing worked. I just got a SellPlan trailer instead ๐
lol sorry @wicked lava totally forgot about what I was about to say hours and hours ago.
xD
As I said, I just used the SellPlan trailer instead cos my VTC paintjob is blue, black and white and the trailer has black top so
Simple fix ๐คท ๐
If once anybody will have the same problem again, I will recomment that solution.
Won't ever happen, I guess ๐
lol
Man oh man. Ubuntu dual boot with Chrome OS on chromebook is amazing
๐
lol ok
Tuxy, tbh I think chromebook chatter in here is ok because to get ubuntu you require developer mode ๐ค But I respect ya views so I will talk in #tech about it
Wew overlays
Just because it requires "developer mode" doesn't make it a development thing @royal wharf
wow ImRock, your resolution is lower than my bank account balance ๐
๐คฃ
5/7 short commit hash: 777c000
More like 7/0 ๐
๐
Ooh
question all i am looking for a discord.js bot that will look on the twitch api and get information off of the twitch api like following a channel and community and twitch team and following a twitch community the bot will have to run on windows
basicly like a page scraper
https://dev.twitch.tv/ here's the documentation for twitch's api
(this isn't a place to ask someone to do stuff for you, but to help you learn how to do it yourself
Which is good cause when you learn some things, you can apply that to other things, and try doing something yourself!
Right so i found a little bug in the recruitment page (no not the fact most say i've been banned recently
)
It goes uneven and i found a way of resolving it ๐
I had to find a way cos i saw many people get triggered cos of it ๐ Plus it triggered me too lool
So made a nice little bug report and a full way of resolving it just incase ๐
Funny thing is im being useful for once
iirc. there's an issue on it and the fix is to use flexbox 
the template used on the website is a pitfa to work with
TIL the difference between async and defer; https://stackoverflow.com/questions/10808109/script-tag-async-defer
mhm, async loads concurrently, defer defers it
the load happens async in both cases, but execution is blocking or defered
see the response from Prasanth Bendra in the link above
Developers? Can you make realistic slippery ice and snow?
Make it hard to get through.
The winter season is almost over..
Fyi: this channel is not a channel where you can request things to the developers of TMP, but you can post your idea in the suggestion subforum on the TMP forum and maybe it'll be in the game
Anyway, this is a channel for developers to just talk about web, game, software development and more
๐
Winter season is almost over. 1ft deep snow which is rarest ever appears...
๐
Aaaanyway
XD
tfw you strugle to figure out why things don't work quite as documentation says, only to find the implementation provided is incorrect
then when you go, armed with the new knowledge, to make a PR, only to find that the issue has been fixed in the later versionsโฆ
Full stack developer Timo Prรผรe has created a Guzzle middleware that helps you set up advanced API request throttling within your Guzzle handler stack. Learn more about his middleware and the accompanying Laravel package that makes using this middleware a breeze in your Laravel projects.
XD
In web-dev class, a friend tested his project and got a 404 error, he tried to solve it but he messed up and got a 500 one, me: "See the positive side, you've just gained 96 points"
lol
๐
XD
Yeah XD
But I mean 500 can be a lot of things, at least with 404 you know something's missing, and it might actually tell you too sometimes, but 500 can literally be anything
500s are logged to your error log ๐
eg. with laravel, it's even better, it's in your app/storage/logs, unless you use some other logging system
you should makes the development process a breeze
Yeah ๐ I'll have to take a look some time
Gonna stick with what I've got now though while I finish this off ๐
What I know ish
Idk I'm tired XD
Excuses ๐






docker + flanneld + etcd working together
