#Code

𝕂𝚞𝚋𝚒𝚔ℙ𝚒𝚡𝚎𝚕kubikpixel@chaos.social
2025-07-15

What’s the difference between ordinary functions and arrow functions in JavaScript?

Arrow functions (also known as ‘rocket’ functions) are concise and convenient. However, they have subtle differences compared to function declarations and function expressions. So how do you know which one to use, and when?

🧑‍💻 jrsinclair.com/articles/2025/w

#javascript #arrow #functions #webdev #js #web #dev #coding #code #frontend

Redu4allReduc4all
2025-07-15

📍 Mode | Wish
🔥 Offre : Jusqu'à 60 % de réduction sans code promo
🏷️ Réduction : 60%
📖 Bénéficiez de remises automatiques sur une sélection de produits sans saisir de code promo.

🔗 Profitez-en : glp8.net/c/?si=19847&li=184667

2025-07-15
This #code :text_is: like 55% debugging
:Wah: ...

function sendSignedRequest($inboxUrl, $body) {
$keyId = "#main-key";" target="_blank" rel="nofollow noopener noreferrer">https://alceawis.com/alceawis#main-key";
$privateKeyPem = file_get_contents(__DIR__ . '/private.pem');
$date = gmdate('D, d M Y H:i:s \G\M\T');
$bodyJson = json_encode($body, JSON_UNESCAPED_SLASHES);
$digest = 'SHA-256=' . base64_encode(hash('sha256', $bodyJson, true));
$p = parse_url($inboxUrl);
$signatureStr = "(request-target): post {$p['path']}\nhost: {$p['host']}\ndate: $date\ndigest: $digest";
openssl_sign($signatureStr, $sig, $privateKeyPem, OPENSSL_ALGO_SHA256);
$sigHeader = 'keyId="' . $keyId . '",algorithm="rsa-sha256",headers="(request-target) host date digest",signature="' . base64_encode($sig) . '"';

$hdrs = [
"Host: {$p['host']}",
"Date: $date",
"Digest: $digest",
"Signature: $sigHeader",
"Content-Type: application/activity+json"
];

// Debugging: Log the headers and request body
file_put_contents(__DIR__ . '/debug.log', "[" . date('c') . "] Sending request to: $inboxUrl\n", FILE_APPEND);
file_put_contents(__DIR__ . '/debug.log', "[" . date('c') . "] Headers:\n" . implode("\n", $hdrs) . "\n", FILE_APPEND);
file_put_contents(__DIR__ . '/debug.log', "[" . date('c') . "] Body:\n$bodyJson\n\n", FILE_APPEND);

$ch = curl_init($inboxUrl);
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => $bodyJson,
CURLOPT_HTTPHEADER => $hdrs,
CURLOPT_RETURNTRANSFER => true
]);

$resp = curl_exec($ch);

// Debugging: Log the response
if (curl_errno($ch)) {
file_put_contents(__DIR__ . '/inbox.log', "[" . date('c') . "] cURL error: " . curl_error($ch) . "\n", FILE_APPEND);
} else {
file_put_contents(__DIR__ . '/debug.log', "[" . date('c') . "] Response: $resp\n\n", FILE_APPEND);
}

curl_close($ch);
return $resp;
}

•acws #acws
2025-07-14

Sudden whimsy: If you #steganographically embed a message somehow in sea-urchin roe, is that #uni #code?

Steven P. Sanderson II, MPHspsanderson.com@bsky.brid.gy
2025-07-14

I did another post on use with() and within() from Base R, simply because it bears repeating. I don't think it gets enough eyeballs. Post: www.spsanderson.com/steveondata/... #R #RStats #BaseR #RProgramming #Programming #RCode #Code

I did another post on use with() and within() from Base R, simply because it bears repeating. I don't think it gets enough eyeballs.

Post: https://www.spsanderson.com/steveondata/posts/2025-07-14/index.html

#R #RStats #BaseR #RProgramming #Programming #RCode #Code
Steven Sandersonspsanderson@rstats.me
2025-07-14

I did another post on use with() and within() from Base R, simply because it bears repeating. I don't think it gets enough eyeballs.

Post: spsanderson.com/steveondata/po

#R #RStats #BaseR #RProgramming #Programming #RCode #Code

I did another post on use with() and within() from Base R, simply because it bears repeating. I don't think it gets enough eyeballs.

Post: https://www.spsanderson.com/steveondata/posts/2025-07-14/index.html

#R #RStats #BaseR #RProgramming #Programming #RCode #Code
𝕂𝚞𝚋𝚒𝚔ℙ𝚒𝚡𝚎𝚕kubikpixel@chaos.social
2025-07-14

JWTs Are Not Session Tokens , Stop Using Them Like One

When JSON Web Tokens (JWTs) hit the mainstream, they were hailed as the solution to everything wrong with session management. Stateless! Compact! Tamper-proof! Suddenly, everyone started stuffing them into every web app like ketchup on bad code.

🧑‍💻 archive.fo/01UkP

#json #jwt #webdev #token #web #code #bad #badcode #WebTokens #ketchup

𝕂𝚞𝚋𝚒𝚔ℙ𝚒𝚡𝚎𝚕kubikpixel@chaos.social
2025-07-14

AI coding tools make developers slower, study finds

Artificial intelligence coding tools are supposed to make software development faster, but researchers who tested these tools in a randomized, controlled trial found the opposite.

🤷‍♂️ theregister.com/2025/07/11/ai_

#coding #ai #slow #code #dev #fast #random #development #tools

Redu4allReduc4all
2025-07-14

📍 Hight Tech | Alibaba
🔥 Offre : T-shirts dès 0,50€ sans code promo
🏷️ Réduction : 0.5€
📖 Une collection de t-shirts tendance à partir de 0,50€ chez Alibaba. Aucun code requis !

🔗 Profitez-en : dt51.net/c/?si=8274&li=1668110
#50€

Daemon Silversteindsilverz@calckey.world
2025-07-13

#Tip of the day (and something I just developed and tested some minutes ago): you can hide the anime-esque "catgirl" picture of "Anubis" (as in that open-source project that acts as a "Man-in-the-middle" (more like "Catgirl-in-the-middle") against DDoS and crawling activities by using the same mechanisms behind cryptojacking) using the following uBO (uBlock Origin) filter (possibly compatible with other adblockers as well, such as ABP):

/.*/##img:matches-attr(src=/(happy|pensive|rejected)/)

In a nutshell:
/.*/ matches all domains (because "Anubis" can be lurking behind any domain), ##img:matches-attr() matches image (<img>) elements which matches a specific attribute, which is src, to be compared against a RegExp expression, /(happy|pensive|rejected)/, which contains all possible image filenames for Anubis's states ("happy", "pensive" and "rejected").

Possible caveats:
- It will match
any image whose URL contains one of the words "happy", "pensive" or "rejected", not just Anubis.
- If there are modified versions of Anubis, they may have different image naming, which won't be matched and filtered properly.

Why?
Well, it's just a matter of taste. I'm personally not interested in seeing any anime while I'm browsing websites, let alone anime art injected as another MitM. I have nothing against anime and/or those who like anime, I just don't like anime for myself.

Also, I haven't much against the Anubis project, except for it behaving like another CloudFlare / Google ReCaptcha but being open-source and having a "cute anime girl" aesthetics doing "computations" and heating my poorly-cooled decade-old laptop CPU, although I perfectly understand its purpose (blocking AI crawlers and other botnet crawlers, a blocking of which is understandable and necessary to instruct hyperscalers (Google, OpenAI, Meta, Anthropic, Alibaba/Qwen, DeepSeek, etc) to respect the damn
robots.txt. Anubis, just do the cryptojac... I mean... the "Proof-of-work computations". There's already text stating whether the request was approved, rejected or undergoing evaluation, so there's no need for any images... Yeah, I'm boring.

Recommended reading: https://www.fsf.org/blogs/sysadmin/our-small-team-vs-millions-of-bots

Tags: #code #snippets #ubo #ublockorigin #filters #anubis #mitm #captcha #freesoftwarefoundation #crawlers #catgirl #anime

N-gated Hacker Newsngate
2025-07-13

🔍🎨 Oh great, yet another promising to your life by letting you play detective on apps—right from the comfort of your bloated . Because clearly, what every developer needs is more and AI suggestions to fuel their . 🙈💻
github.com/APKLab/APKLab

Adam | AddshoreAddshore@mas.to
2025-07-13

I spent over 6 hours and some number of $ comparing 9 different coding assistant and language model combinations (including video recordings) so that you don't have to!

The user experience really differs between the coding tools and the models

addshore.com/2025/07/ai-code-a

#ai #llm #code #gpt #gemini #amazonq #claude #anthropic

Jesus Castagnetto 🇵🇪jmcastagnetto
2025-07-13

The general purpose practice, to help comply with they AI Act.

digital-strategy.ec.europa.eu/

mootchoowal aid requestssmote
2025-07-13

URGENT $466/500 DUE TOMORROW

please help Evel, a severely , and xens family survive this month! xen struggles to cover expenses for xens kids. check out xens & collective aldercone.studio

- cashapp & venmo: evelbrute
- ko-fi.com/aldercone/goal
- throne.com/evel
- liberapay.com/heckinTech

a snapshot of a game that the aldercone studio collective, of which evel is a part of, recently finished. A foresty scene using the glitch game graphics of a big sign that says "now entering alderwood point". there's lots of trees and bushes of various kinds. There's also a big white goose standing to the right of the sign and somewhat hidden amongst the bushes and trees is a sort of post-apocalyptic postal carrier. you can find the game at aldercone.itch.io
علی‌اصغر فتحی‌خواه‌ :verified:fathikhah@persadon.com
2025-07-13
2025-07-13


서비스입니다.
단점은 유료라는거,
추가로
비슷한 서비스인
도 확인해보세요

youtu.be/dmr4A7qc_kw?si=OOhKO6

SΛNJΛYMENØNsanjaymenon
2025-07-13

Minimal ASCII snake game for Neovim to train your hjkl motions and mode switching muscle memory

github.com/ashish0kumar/snake.

Redu4allReduc4all
2025-07-13

📍 Mode | Giglio
🔥 Offre : –30 % sur votre panier avec ce code
🏷️ Réduction : 30%
📖 Faites-vous plaisir avec –30 % de remise sur votre commande Giglio grâce à ce code 100 % fonctionnel.

💡 Idéal pour les achats mi-saison et nouveautés
✔️ Code vérifié – taux de succès élevé

🔗 Profitez-en : glp8.net/c/?si=19810&li=184660
#–30 %

Client Info

Server: https://mastodon.social
Version: 2025.04
Repository: https://github.com/cyevgeniy/lmst