CatNoir
CatNoir
Explore posts from servers
CDCloudflare Developers
Created by CatNoir on 11/11/2024 in #general-help
Why is turnstile or any captcha useless?
I just got raided on my chat app, why don't captchas do their job of preventing bots? Is there something I'm missing?
3 replies
PPrisma
Created by CatNoir on 11/6/2024 in #help-and-questions
Psql Timeout connecting a new connection from collection pool
Hello, I used to get this error like a couple of times a day, which would crash my whole server. Today, it's been happening way more often. As soon as I start my server, my CPU usage goes too 100% and after a few mins, my servers crashes with the same error My chat app has like 1.5k users. Is there anyway to troubleshoot why this is happening?
9 replies
CDCloudflare Developers
Created by CatNoir on 10/29/2024 in #general-help
Are there any limitations for "transform-via-workers"
Are there any limitations? or is it still 100,000 per day if i usehttps://developers.cloudflare.com/images/transform-images/transform-via-workers/
5 replies
CDCloudflare Developers
Created by CatNoir on 10/15/2024 in #general-help
DNS only 127.0.0.1 gets redirected to https, didnt used to.
No description
12 replies
CDCloudflare Developers
Created by CatNoir on 10/5/2024 in #general-help
Help with cache
When a user deletes an image from my server, it can still be viewed because of cloudflare cache. When I click on the purge cache button on cloudflare, the image is removed. Is there anyway to fix this behaviour without removing caching? is there anyway i could send a signal to cloudflare automatically to remove the cache?
19 replies
CDCloudflare Developers
Created by CatNoir on 9/13/2024 in #general-help
Html error form validation error display
No description
9 replies
SSolidJS
Created by CatNoir on 8/11/2024 in #support
Override component events
TLDR: I used onContextMenu in a lot of components. Is there anyway to override and apply custom logic to that event without changing much code?
<div onContextMenu={...}></div>
<div onContextMenu={...}></div>
On Chrome Mobile, the onContextMenu event fires when you press and hold on an element. on Safari mobile, It doesn't work, so I have to apply custom logic. But currently I have a lot of components where I have already used onContextMenu. Is there anyway to apply custom logic to onContextMenu without changing much code?
3 replies
SSolidJS
Created by CatNoir on 7/31/2024 in #support
How can I use a custom hook with createMemo in many places?
I have created a hook like this:
// This is a hook
const useInMultiplePlaces =() => {

const complicated = createMemo(() => {
// something complicated
})

return {complicated}
}
// This is a hook
const useInMultiplePlaces =() => {

const complicated = createMemo(() => {
// something complicated
})

return {complicated}
}
I then use this hook in multiple active rendering components. the createMemo is probably ran multiple times everytime the useInMultiplePlaces hook is ran in those components. Is there anyway to like... have like a key for this memo, and reuse the same memo.. idk what im saying but i hope you understand my issue 😭
26 replies
SSolidJS
Created by CatNoir on 4/8/2024 in #support
Why does adding a new field duplicate the value?
No description
6 replies
SSolidJS
Created by CatNoir on 1/22/2024 in #support
Best pattern when using createStore to store large amount of data for a large app?
As the title says, what is the best pattern, is there an example on github or something you could show? In react + mobx, I know this pretty nice pattern which looks really clean and been using. Is there something like this pattern or something better for createStore?
import { makeAutoObservable } from 'mobx';

class Users {
users: Record<string, User> = {}
constructor() {
makeAutoObservable(this)
}
addUser(data: RawUser) {
const newUser = new User(data)
this.users[id] = newUser
}
}

class User {
id: string
username: string
firstName: string
lastName: string
constructor(data: RawUser) {
this.id = data.id
this.firstName = data.firstName
this.lastName = data.lastName
this.username = data.username
makeAutoObservable(this)
}
get fullName() {
return `${this.firstName} ${this.lastName}`
}
updateName(newUsername: string) {
this.username = newUsername;
}
}
import { makeAutoObservable } from 'mobx';

class Users {
users: Record<string, User> = {}
constructor() {
makeAutoObservable(this)
}
addUser(data: RawUser) {
const newUser = new User(data)
this.users[id] = newUser
}
}

class User {
id: string
username: string
firstName: string
lastName: string
constructor(data: RawUser) {
this.id = data.id
this.firstName = data.firstName
this.lastName = data.lastName
this.username = data.username
makeAutoObservable(this)
}
get fullName() {
return `${this.firstName} ${this.lastName}`
}
updateName(newUsername: string) {
this.username = newUsername;
}
}
4 replies
SSolidJS
Created by CatNoir on 1/26/2023 in #support
Unknown file extension ".ts" for rollup.config.ts
2 replies
SSolidJS
Created by CatNoir on 1/5/2023 in #support
How can I execute a function from parent?
How does ref work? I want to execute a function from parent, something like this:
// Parent
function Parent () {
let something;

return (
<Child something={something}/>
)
}

// Child
function Child(props) {
props.something = () => console.log("hello");

return <div>Hello</div>
}
// Parent
function Parent () {
let something;

return (
<Child something={something}/>
)
}

// Child
function Child(props) {
props.something = () => console.log("hello");

return <div>Hello</div>
}
Is something like this possible?
15 replies
SSolidJS
Created by CatNoir on 12/28/2022 in #support
How to change child child value?
https://stackblitz.com/edit/github-gp2gff?file=src%2FApp.tsx I'm trying to make some kind of parser, but I don't know how to fix this problem. Any help?
37 replies
SSolidJS
Created by CatNoir on 12/23/2022 in #support
How do i pass ref to child?
<div ref="how can i access this ref in ChildComponent?">
<ChildComponent/>
</div>
<div ref="how can i access this ref in ChildComponent?">
<ChildComponent/>
</div>
2 replies