#programming
1 messages ยท Page 11 of 1
Or you can use the TCP/IP stack, in which case you put the Application, Presentation, and Session cats on the same shelf :p
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
๐
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
Woooo, PHP is popular ๐ ๐
๐
https://github.com/jellysquid3/gitlab-discord-bot is what I used when I used gitlab
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 = [];
I just use the Slack endpoint for notifications
Discord slack webhook endpoint works well with gitlab webhooks :p
"well", servicable ๐
Works ๐
as I said, servicable
Zapier really tries to cater to everyone
sometimes I feel like the security onion is gaining too many layers
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
XD
Currently learning C++ using SoloLearn app ๐
woop
So far it's not too bad
sweeetttt!
Have you learn it Callum?
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
ahhh cool
*c# Developer for Microsoft
@fair jay SoloLearn is how I learned how to program HTML, CSS, JS, C++ it's a very good app
yup
@cunning sequoia Thank you for the confidence that it will hopefully help me understand it better ๐
How does ETS2 save the job data, for like using in a logger? ๐ค
You would have to use Telemetry for the logger
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?
@DanielVavra "99 little bugs in the code, 99 bugs in the code
Take one down, patch it around
128 little bugs in the code"
I feel this "song" explains game development quite well
๐
right im here now
for this new Date(datetime string here) how i make so does in json file
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
<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
new Date(json.track.starttime), then look at https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date to find out more about how to display it
The number of milliseconds since 1970?
Wow
That's why when something goes funny with deleted messages on Discord I see 1 January 1970 ๐
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
Ouch
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
My first programming language lives on! https://hackaday.com/2018/02/22/quickbasic-lives-on-with-qb64/
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
It is an XML, not a JSON
ik
Or looks like XML
i need way pull out
How did your pull that off?
What is the actual code?
var_dump($tracklist) please
oww
i gatcha
i made 1 for YT
$xml->entry[0]->children('yt', true)->videoId[0];
but i was try figure do on that
ik ik
i want use radonomy for now till i get my butt off them service and premade hosting
btw
Discord bot done
๐
meh
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
๐
anyone knows that moment when your pc crashes and the file you've just worked on looks like this afterwards?
I'd rather called it destroyed
sounds worse
Thanks to Google Backup Sync for saving it ๐
๐
bit of API there ๐
i made so only listlen on ETS 2, ATS and MC server
yeh
people complaining about host
so this only way cant complain
Yeah
sweeet
problem for me API doesnt like host i got
aka Radionomy API vs free website hosting
so thats why keeps bliping out
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
https://www.scaleway.com/ gets you cheap boxes to spin
<-- 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
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.
._. that's slow, 99% certainty it's uncached
Exactly
If Radionomy blocks your api calls, it's likely they've blocked the ip for sending too many requests.
Not had any issues with my docker swarm 
I run most of my stuff on OVH cloud
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
it is quite a bit more expensive, you're right there
got multiple low-power workhorses, a couple of high power ones, and dedicated masters
~70โฌ a month for my twitchbot's servers alone
*dedicated virtual masters
A couple of Windows hosts and I could schedule anything on my cluster
down side is idk how to catch it
Have you tried to 
no, that's not a cache
not "catch", but "cache"
google "php cache request"
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
I'm not a great dev
but to me, no-cache sounds like the opposite
of what you wanna do
That's client side caching, you need server side caching
ยฏ_(ใ)_/ยฏ
You have to
not dedi
you know what that means?
its website hosting
get some free hosting that isn't like that ๐
Caching can be file based
i know a couple
You can't interface with the TMP API without caching acording to the API documentation
that's violating the TOS
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.
๐
so saying store as file
That's one option, yes.
well idk how do that with like 3 or 4 APIs ยฏ_(ใ)_/ยฏ
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

XD
how to cache a response from an API?
ok, one more pointer: https://github.com/gilbitron/PHP-SimpleCache
*Docker
and that's not Docker
Try reading a bit before saying "can't use x"
cause PHP SimpleCache doesn't even mention Docker
well docker / composer then i see composer.json
You can always use Composer
ik i can but site doesnt
like i sid its S***t hosting like i ammited
i cant go here buy hosting
and can run PHP
Spend some time learning before you build something usable
just needs custom coded it
for example if i use curl on there suspended my account for nothing
i had to use 000webhosting for all curl
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
wouldn't quite work if he can't even use composer directly on the box 
true
but I'm like 110% against hosting that doesn't give you access to the webserver config anyway
especially 000webhost
He did specify that he has basically 0 budget
"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)
hmph. Theres a couple of hosting places that have decent free things
yet to see a solid free host for anything that wasn't a favor from a friend who has a server
ehh, there's a couple I guess
Usually it's bad stuff like 3v said
yeah
Might set out on a new endeavour, replace my new monitoring with newer monitoring 
my theory is that if a solid free service existed, it would be wildly popular
yeah
I need to setup some monitoring to begin with
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
https://puu.sh/zGPue/4685044aa3.png
From the bottom of a file in the old reddit sourcecode ๐
@small ermine you have not seen what I have made LUL
Just kidding, good job, man. Keep going!
thanks! ๐
@small ermine This is easy, do more ๐
๐
Will do on Friday, college tomorrow and Thursday
But it's better than it was
@small ermine Yea, send more pictures :P
I could maybe send some, too ๐
๐
The AC broke/was turned off in a serveroom. Besides other damages, they found this keyboard xD
No, from reddit ๐
Not only flat design, but nowadays also flat keyboard 
is this what they call ergonomic? 
Using works of others is sometimes fun ...
https://image.prntscr.com/image/xKKNSh_RQWm2JZkhBUwX5Q.png
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)
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
That's my plan, but idk how to let it resize automatically :/
and without ckeditor? ๐
I just don't like embedding things that someone else created... I'd rather create it myself
Yeah I don't know, a lot of effort to make a rich text editor yourself though XD
I'm too lazy for that
@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
@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();```
You can test it here: http://jsfiddle.net/C8e4w/554/
Test your JavaScript, CSS, HTML or CoffeeScript online with JSFiddle code editor.
@pearl badger I tried it myself and it did not work. Tested on Chromium
You can see what is on the next line 
@wicked lava http://jsfiddle.net/ImpressiveWebs/fGNNT/1333/
Test your JavaScript, CSS, HTML or CoffeeScript online with JSFiddle code editor.
This looks as working one, try it out ๐
But next time try to use Google, I did same ๐
Test your JavaScript, CSS, HTML or CoffeeScript online with JSFiddle code editor.
@wicked lava Now it should work
why so complicated? https://stackoverflow.com/a/25621277/1780502
That worked perfectly ๐
Looks interesting
Jeffrey Way should return 2 hours of my life... https://github.com/JeffreyWay/laravel-mix/issues/1533
typo in your comment, you said "this path" rather than "this patch" ๐
ty Tuxyq
yw CJ
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..
That's most likely far too little information for anyone to help you
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...
๐ค

Probably downtime or a hiccup in bitbuckets systems, or your connection to them.
ยฏ_(ใ)_/ยฏ
Title says it all
Reminds me on the tmp forum 
Did anyone tell him to do Esc + :q + Enter?
Assembled the first post in a series on how to set up Docker swarm on scaleway, etcd is the first out the gate: https://www.thor.re/docker-swarm-etcd/, feedback is appriciated
Awesome
I actually thought both ways of creating an anonymous function would result in the same...
But it seems like it makes a difference for jQuery... Does anyone know why?
jq code: http://prntscr.com/itga2x
console: http://prntscr.com/itg9vj
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
Ahh... makes sense
I added a theme to osticket and now I have so many errors it's unbelievable. Literally being spammed with errors ๐
So, good day to start using Yarn and learn Ava
Always a good day to switch to yarn
Mine is crap https://schd.io/5TO1
I deployed most of the header stuff like Scott Helme: https://scotthelme.co.uk/security-headers-cloudflare-worker/
And I am using cheap shared hosting ๐
Just add CF 
I did, but I am using Let's Encrypt certificate (which auto-updates and installs from Cpanel itself)
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


๐

๐
๐
npm -uninstall
three months later
๐
It did not load for me ... ๐ฆ 
^ Canโt tell if your serious ๐๐
Of course I am not, I added the troll ๐
A pre-trained deep neural network making predictions on live camera input, trying to make sense of what it sees, in context of what itโs seen before. It canโฆ
It's magic ยฉ
I've got links, but they can't be clicked on any mobile/tablet or a small window size?
These click and work
these don't
Maybe bad styles? ๐ค
okie
LOL
๐
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. ๐
Ooh
@north flax Assembler weSmart
hey
Assembly is worth knowing but you'll most likely never come across a situation where it's the best choice
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"
That's kinda proxy 
is there anyone that knows about discourse?
Probably someone
im just waiting
I know
Just ask ๐
Don't ask to ask, just askk
Advertising in Rich Presence... lol
๐จ
ah
no clue ๐
ah wait
I know
XD
because it's transparent
might work now
meh
My nice friend here build an easy tool for Rich Presence. For users who canโt copy and paste premade templates from the web https://github.com/generalwrex/DiscordPresenceSetter
Just entering everything you want there.
ah
The hardest thing would be to create an application on discordapp.com and uploading the pictures.
๐
Not as detailed as yours but contains only the useful information
this isn't the place to advertise your bot
but technically if you're showing off some development skills ๐
i guess it's technically ok
ยฏ_(ใ)_/ยฏ
XD
well @small ermine my skills in nodejs Brill
and problem is this was my last project past
xD
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
๐
And, if you want a humorous read: https://medium.com/@caspervonb/a-brief-totally-accurate-history-of-programming-languages-cd93ec806124
1801 - Joseph Marie Jacquard uses punch cards to instruct a loom to weave "hello, world" into a tapestry. Redditers of the time are not imp...
๐
Save Code Share - A campaign to call attention to the implications of the EUs Copyright Reform for code sharing
The short version of why you should care, if you're in the EU: https://blog.risingstack.com/eu-citizens-lets-save-code-share/
https://github.com/reddit-archive/reddit1.0 Original reddit source code :p
๐
ooh
Fancyy
Yay ๐
๐ ๐ ๐
Lisp of all things
https://github.com/reddit-archive/reddit1.0/blob/master/sites.lisp#L60 welcome to parenthesis hell
first version of reddit looks to have been using plain-text passwords
it was a very different time 12 years ago
@amber oasis But when you forgot your password, you could get it back! weSmart 
back then you didn't worry about hackers stealing your passwords cos people were still trying to steal your wallet LOL
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
Anyone good at java. To me I just give up
Javaaaa..... Not me ๐
Just tell us your problem and we'll see whether we can help
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
You're late xD
fastest way
There'll be something there xD
๐
Nope
Accidentally pulled a Sword Art Online
Re-made our login system
Forgot to create the logout script ๐ ๐

is this correct
for edit info
i trying make profile editer page
and database doesnt allow me do it
@lilac patio just dont use sql
what's e
nothing wrong with sql
get into the habit of using prepared statements
E part of error message
if erros line
problem is idk how to update info
thats i trying do
๐
๐
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?
@wicked lava Use flexbox ๐ ๐
Try this: https://stackoverflow.com/a/8340177
also, forget about using JS, responsive design is best done in pure CSS
^-^
Is there way to change event listeners using css? @amber oasis
no, but you don't need events for responsive design
use media queries
as well as flexbox and grid
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
@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.
^ 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.
so you want it to be a dropdown for mobile but list for PC despite the viewport size being the same?
No. The device doesn't matter for me, only the viewport size
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
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 ๐
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
i still confused RN
look at mah screenshot for sec
and look at my code
i cant update info in PHP
by sipific login
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
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
yeah but you're using $query without defining it
@lilac patio Do not ever use thet query in production. Learn to use prepared statements.
Why speed limit 150km/h ??
because we wont have idiots flying and crashing into each other
it might be bad but can turn into the best thing ever
@wicked lava thx
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
This is a developer channel, not a crypto currency channel 
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.
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
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?
Elaborate?
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?
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?
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
Right. ๐ค
๐ 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
Right.
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
Awesome!
You'll see the forums pass the full World of Trucks URL to get their plates
behind the scenes, that's what I do
Ahh sweet! I'll give it a go
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
yes
basically the understanding I have with SCS is as long as WOT API don't cause any issues to them, it's ok
Cool!
Can I also use your API to check any current bans?
I read the docs but I got slightly confused xD
That's good
But can I still check if the player has current active bans using the TMP API?
๐
Spelling on point
It's not accurate iirc
I vaguely remember the API not making it clear if a ban has expired in some edge cases
Ah okay
When using the tracker.ets2map.com/v3/playersearch api, how often may I call it per minute whithout having to worry about an api ban?
Assume same as api.truckersmp.com
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
It is by Steam. What have you been expecting? 
@amber oasis And what is it for api.truckersmp.com? ๐
convert minutes into hours w/ php? not working ๐
$hours = $minutes / 60; 
why not
wut?
I have this array from json_decoding the API stuff
i only want the playtime_forever
on its own
howwww
$array[0]->playtime_forever?
yeah, thanks ๐
No problem โค
@opal arch using krav as an example ๐
NO
I did not have time to click that ๐ฆ
Almost 2500 hours LOL
xD
Addicted as me on Redbulls 
Try for me, please!
Yes
I am not American boi
I have 1000 hours in ETS2 caugh caugh
๐
The box looks like a box from CS:GO KZ LOL
xD
Reminds me of my forum signature
Oh, God. I will not login there ๐ ๐
๐
GDPR, do not forget! 
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
But I store IPs of InsertSecretHere ... I think I should do something ๐
I store so many data about users ... :/ ๐
xD
? ๐
ok
How to stalk users 
๐
When you implement stuff too late
(the empty column)
xD
Why do you need 2 bytes for a value that can't even reach 255? Does that make sense?
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
I wonder if anyone still uses Bitmaps when we are able to display such a high color deep ๐
From the description of a project:
========================
Known issues:
========================
[...]
In case of intoxication ( using [Project name] under Windows ) please call your doctor immediately.
Well i think it's borked lool https://i.sgtbreadstick.tk/DeL3MhXi.png
ahh right so the caching failed
yeah deffo went wrong https://i.sgtbreadstick.tk/BQ03qowI.png
it should look like this with no caching, but i need to figure out how to make it cache https://i.sgtbreadstick.tk/arw2BvQ0.png
Speedlimiter is actually everywhere ๐
Use fileinfo() to get the last write time ;)
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
๐ซ Why do this to me Github https://i.sgtbreadstick.tk/zj2BJQGM.png
Why are you using the Desktop tool... use the command line
I find desktop one easier to use tbf
Ew spam
https://github.com/SgtBreadStick/TruckersMP-Status Updated to v1.2
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
https://sgtbreadstick.tk/beta/ If you wanna see a preview of it
https://puu.sh/zWV9i/5d0a532da0.png Looks awful on PC as well ๐
๐
pretty slow
took a good second at least on first load
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
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?
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
@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
Servers endpoint ye, caches for 1 min and serves cache isntead of db data
@rich flint You should use curl instead of file_get_contents ๐
i haven't tried curl so idk
also i had to update my DNS on my pc to google's just to access discord -_-
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
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 ๐
this any good? https://stackoverflow.com/questions/16700960/how-to-use-curl-to-get-json-data-and-decode-the-data
well obviously the password_verify() isn't defined by looks of that tbh
hmm
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
I would but it's supported by any PHP over 5.something and I'm on the latest xD
try 7.1
working on 7.1?
speaking of windows 10 updates
sometimes when my windows tries to look for updates automatically I get a bluescreen
rip
https://sgtbreadstick.tk/beta/v1.2/ i changed it to cURL and everything seems good
yup, works alot faster for me ๐
1 ๐
is this alright for the actual API thing (api.sgtbreadstick.tk)? https://i.sgtbreadstick.tk/edDjZluG.png
๐
Fairly simple way to check if it's new enough data
Awesome
Been meaning to figure that out
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
๐
Use the command line...
That desktop tool is as if you built your website using wix ๐คข Easy but bad style
that's a terrible error message
You essentially need to know the github desktop app to be able to help someone with that error
I used that Desktop versions before... then I switched to command line because you never get errors 
Not working with git that deeply then 
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
Google "git <what you want to achieve>"
If you use something regularly you'll learn it by heart quickly
git commandline isn't very hard to pick up
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
Righty, I'm back ๐
gg
but i think me randomly typing has figured it out ๐
Wow my status page has gone from this
To this
ugh, the icon keeps refusing to show -_-
;-;
sometimes it goes funny for https
http://sgtbreadstick.tk/beta/v2.0.1/ might work
^^^
pro-tip: don't self host FA
And while you're at it, upgrade to 5.x: https://fontawesome.com/get-started
Your site is fairly slow to respond with the assets
i should use FA instead of these glyphicons ๐
either works, pick your favourite ยฏ_(ใ)_/ยฏ
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
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?
Using a CDN is faster
By using a CDN, you are more likely that the user has it in cache already
ahh
for popular libraries like FA and Jquery, that's a very good idea
well jquery is also self hosted, should i put that on a CDN too?
well yeah