Free web resources everyday
Tag: WebDev
Web development news and tutorials
ReadWriteWeb.com
Web Apps, Web Technology Trends, Social Networking and Social Media
Nifty Corners Cube
Rounded corners the javascript way
Nifty Corners Cube
StackOverflow.com
Random snippets of all sorts of code, mixed with a selection of help and advice.
Server api endpoint SSL requirements for IOS 18 requests
30 August 2025 @ 11:01 pm
I am trying to make a Get Request to a server endpoint. The endpoint is on a shared host that I control except that I have minimal control over the SSL.
Recently--I think since IOS 18, after an asynchronous request, the app is hanging for 20 seconds or so before returning results and in the console I see up to 10 or more messages as follows:
tcp_input [C6.1.1:3] flags=[R] seq=19931096, ack=0, win=0 state=CLOSED rcv_nxt=19931096, snd_una=42308392
Apparently [R] means reset. The code making the request looks like this:
NSLog(@"starting call NOW to url: %@",dataUrl);
NSURLSessionDataTask *data = [session dataTaskWithURL:dataUrl completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
NSLog(@"heard back from server");//This takes 20 seconds even when the data is just a few bytes
According to so
SSH connection over WireGuard VPN drops after ~1 minute despite keepalive settings
30 August 2025 @ 10:59 pm
I have a device connected to my home network via WireGuard VPN. The VPN subnet is 10.0.0.x/24.
The issue is:
I can successfully connect to the device via SSH.
The SSH session works fine initially but disconnects after about 1 minute.
After the disconnect, I have to reconnect manually.
What I’ve tried so far
Lowered the MTU on the WireGuard interface (Ubuntu server side) to 1280 → no effect.
Checked /etc/ssh/sshd_config for any timeout-related flags (none are set). Rebooted the server → no effect.
Verified that the WireGuard client has PersistentKeepalive = 25 configured.
General network connection seems stable (no packet loss outside of SSH).
Question
How can I prevent SSH sessions from dropping after ~1 minute over WireGuard VPN?
Cannot launch URL in flutter in android emulator
30 August 2025 @ 10:55 pm
I have this code to open an uri:
final Uri emailLaunchUri = Uri(
scheme: 'mailto',
path: GlobalConstants.supportEmail,
query: 'subject=Hola Soporte DCore&body=Necesito ayuda con...',
);
if (await canLaunchUrl(emailLaunchUri)) {
await launchUrl(emailLaunchUri);
}
else {
final Uri webUri = Uri.parse('https://demo.freshdesk.com/support/tickets/new');
if (await canLaunchUrl(webUri)) {
await launchUrl(webUri);
}
}
On the other hand, this was added to AndroidManifest.xml file.
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<queries>
<intent>
<action android:name="android.intent.action.PROCESS_TEXT"/>
<data android:mimeType=&quo
Responsive Layout: Image Shifts and Caption Disappears in Mobile View
30 August 2025 @ 10:55 pm
I'm trying to simulate the layout and behavior seen on the following page:
https://www.whitehouse.gov/administration/donald-j-trump/
On desktop view, everything appears fine — the image and text are positioned correctly within the blue background area. However, when I switch to a responsive or mobile view, I notice unexpected behavior:
The image shifts inside the blue background in a way I didn't anticipate.
The accompanying text either disappears completely or is pushed out of view.
I'm not sure why this is happening in my implementation. I would like to closely replicate the responsive behavior shown on the official White House page, including how the image and text behave when resized.
Could you help me understand how this layout is structured and how I can reproduce the same behavior reliably using responsive design (e.g., using USWDS or custom C
Tiptap custom markInputRule removes closing bracket from match
30 August 2025 @ 10:47 pm
I’m trying to create a custom mark in Tiptap v3 that highlights tags written like value inside inline text.
Here’s my current extension:
import { Mark, mergeAttributes, markInputRule } from "@tiptap/core";
export const TagMark = Mark.create({
name: "tag-mark",
addAttributes() {
return {
type: { default: null },
class: { default: "tag-mark" },
};
},
parseHTML() {
return [{ tag: 'span[data-type="tag-mark"]' }];
},
renderHTML({ HTMLAttributes }) {
return [
"span",
mergeAttributes(HTMLAttributes, {
"data-type": "tag-mark",
style: "color: green",
}),
0,
How to get i2c_dev to coexist with direct usage of i2c drivers?
30 August 2025 @ 10:45 pm
I am building a project that uses esp_lcd,and the TSL2591 component from the component library.
To my knowledge these are both well maintained and commonly used in the idf, and should be able to coexist together.
TSL2591 seems to rely on i2c_dev for control of i2c and handles all i2c communication internally, whereas esp_lcd has you manage it directly through i2c drivers, passing in the i2c bus handle. when I'm trying to get them to both work together, I get the following runtime error when initializing the TSL2591:
D (382) tsl2591: Initialize sensor.
V (382) i2cdev: [0x29 at 0] Attempting to take device mutex (Handle: 0x3fca3fbc)...
V (392) i2cdev: [0x29 at 0] Taking device mutex with timeout 1000 ms (100 ticks)
V (402) i2cdev: [0x29 at 0] Device mutex taken successfully.
V (402) i2cdev: [0x29 at 0] i2c_dev_read_reg called (reg: 0xa0, size: 1)
V (412) i2cdev: [0x29 at 0] i2c_dev_read called (out_size: 1, in_size: 1)
V (422) i2cdev: [0x29 at 0] Performin
Catching an Alignment Check Exception on Windows
30 August 2025 @ 10:35 pm
I'm trying to perform a misaligned memory read / write and catch it inside a __try and __except block.
After setting the RFLAGS.AC bit to 1, I perform the misaligned read which causes my program to crash. Would expect it to be normal but this happens even if I enclose the code inside a __try block. I was thinking SetErrorMode and SEM_NOALIGNMENTFAULTEXCEPT would fix this issue, but upon reading I discovered that the mode suppresses these exceptions and makes it invisible for the application.
//SetErrorMode(SEM_NOALIGNMENTFAULTEXCEPT);
ULONG Buffer[4];
PULONG Misaligned = (PULONG)((char*)Buffer + 1);
__try {
_
Why does flake8 flag E226 only when whitespace is missing on both sides of operator?
30 August 2025 @ 10:25 pm
Here is a minimal reproducible example:
j = 0*0 # Flagged for E226.
j = 0* 0 # Not flagged for E226.
j = 0 *0 # Not flagged for E226.
As the comments suggest, flake8 flags only the first line, not the others, for E226:
$ flake8 tmp.py --ignore=E225,E231,E117,F401,F811,F841,E303
tmp.py:1:6: E226 missing whitespace around arithmetic operator
But Flake8 rules require a space before and after:
There should be one space before and after an arithmetic operator (+, -, /, and *).
I installed and updated flake8 with pip:
$ python3 -m pip install flake8 --upgrade
Why does flake8 flag only the first line?
How to remove the extra space between two cut commands?
30 August 2025 @ 8:35 pm
I was making a script for a challenge I saw a while ago, which asks: "extract the 2nd ASCII character from every line in input if the line characters are less than 7, 2nd and 7th if more", it's more of self testing than a real challenge, I went for it, but I have a problem,
in the script
#!/bin/bash
while read input
do echo $(echo -n $input | cut -c 2 && echo -n $input | cut -c 7)
done
When I enter any input that has characters more than 7, the output contains ' ' between the two characters.
Example input:
T.T - Test Text
The problem that it outputs '. T', while I was expecting '.T' Without the space.
I tried using tr -d " " but this will delete all spaces, for example if the input is T e s t, tr will delete the second character, not only the extra space.
I also tried to change the script to
#!/bin/bash
while read input
Generate types using kysely-codegen and implement kysely in Nodejs project
30 August 2025 @ 1:39 pm
Project Details
Nodejs
Database in SQL Server 2012
I am getting this error while I try to generate types in kysely-codegen and no information on what the error is
This is the command I ran:
npx kysely-codegen --config-file ./.kysely-codegenrc.json
{
camelCase: false,
dateParser: 'timestamp',
defaultSchemas: [],
dialect: 'mssql',
domains: true,
envFile: './src/config/env/.env.development',
logLevel: 'debug',
numericParser: 'string',
outFile: 'C:\\development\\okbooks-organizationService\\src\\config\\db.d.ts',
overrides: {},
url: 'Server=localhost,1433;Database=MedicalWEB;User Id=root;Password=root;Encrypt=false;TrustServerCertificate=true;'
}
Using dialect 'mssql'.
Introspecting database...
node:internal/process/promises:392
new UnhandledPromiseRejection(reason);
^
UnhandledPromiseRejection: This error originated either by throwing inside of an async function without
960.gs
CSS Grid System layout guide
960.gs
IconPot .com
Totally free icons
Interface.eyecon.ro
Interface elements for jQuery
Interface.eyecon.ro
ThemeForest.net
WordPress Themes, HTML Templates.
kuler.adobe.com
color / colour themes by design
webanalyticssolutionprofiler.com
Web Analytics::Free Resources from Immeria
webanalyticssolutionprofiler.com