Yahoo Warraich
Yahoo Warraich
TTCTheo's Typesafe Cult
Created by Kevon Young-Reaves ✨⭐✨ on 1/8/2025 in #questions
Does anyone know a good utility to track how much you've coded in a day?
For vs code, I love https://marketplace.visualstudio.com/items?itemName=softwaredotcom.swdc-vscode code time. It is honestly great. It's opensource, it keeps a history of you which you see as a helpful chart, you can integrate it with git to compare yourself with your team. Does what I need to do and does it well
7 replies
TTCTheo's Typesafe Cult
Created by Lr-Projects on 1/5/2025 in #questions
How to store/design dynamic roles in jwt
Anytime
17 replies
TTCTheo's Typesafe Cult
Created by Nat on 1/1/2025 in #questions
Enable mouse scroll or mouse drag in number input?
for more precise control, you could add fractions of moved or something else
11 replies
TTCTheo's Typesafe Cult
Created by Nat on 1/1/2025 in #questions
Enable mouse scroll or mouse drag in number input?
I know I'm late to the party but if you want to add in the hold and drag functionality, it is pretty simple. You could do something like: let isDragging = false; let startX = 0; document.addEventListener("mousedown", (event) => { isDragging = true; startX = event.pageX; }); document.addEventListener("mouseup", (event) => { isDragging = false; }); document.addEventListener("mousemove", (event) => { if (!isDragging) return; const moved = event.pageX - startX; startX = event.pageX // So you can continually add moved without keeping state of initial position // do something with moved });
11 replies
TTCTheo's Typesafe Cult
Created by Jaa9 Bravo on 1/3/2025 in #questions
Google drive as file storage
go to your google cloud admin panel, create a service account, grant it the proper api permissions and add it to the folder. Implementing it in code is fairly simple too.
11 replies
TTCTheo's Typesafe Cult
Created by Jaa9 Bravo on 1/3/2025 in #questions
Google drive as file storage
I would recommend against using google drive for file storage. They have made it just an absolute boat load of shit that you have to haul your ass through to get file storage working properly. The methods they provide require adding enough complexity to not make it worth it until you absolutely need to. That being said, I've found service accounts to provide the lowest barrier to entry to most google services. You create a folder on your google drive, add your service account as an owner or something and you can do what you want to do. The google drive api is, afaik, meant only for when you need to access a client's drive.
11 replies
TTCTheo's Typesafe Cult
Created by Lr-Projects on 1/5/2025 in #questions
How to store/design dynamic roles in jwt
i personally try to store as little information in a JWT as possible. Let your server do all the work. While JWTs are secure, I dont want to trust any information from the client that I dont have to. Plus, what happens if you need to refactor code and in the refactor you end up changing flags or permission levels? I usually just have an id in the JWT and not a lot else.
17 replies
TTCTheo's Typesafe Cult
Created by Anish on 12/30/2024 in #questions
Proxy for ssh protocol
yessir
24 replies
TTCTheo's Typesafe Cult
Created by Anish on 12/30/2024 in #questions
Proxy for ssh protocol
I guess it comes down to versatility. Being able to provision a container directly instead of renting a VM and then provisioning containers on that VM
24 replies
TTCTheo's Typesafe Cult
Created by Anish on 12/30/2024 in #questions
Proxy for ssh protocol
In most instances, VMs are containers running in the cloud with pre allocated resources and limited access. And while yes this does give the user greater control over what they want but I would imagine that would serve more or less like services offered by cloud providers only that where those services are plug and play, provisioning your own containers is more flexible but less easy to integrate
24 replies
TTCTheo's Typesafe Cult
Created by Anish on 12/30/2024 in #questions
Proxy for ssh protocol
I think yours fit the bill more specifically
24 replies
TTCTheo's Typesafe Cult
Created by Prashant on 12/30/2024 in #questions
Status: Callback Failed
It would be much easier to help if you provide some context. What dashboard? What is the app built on? What are you trying to do? With the limited information, its tough to provide a solution
12 replies
TTCTheo's Typesafe Cult
Created by Anish on 12/30/2024 in #questions
Proxy for ssh protocol
you cant use nginx to forward non http requests. You've got many ways to forward the traffic. You could modify your sshd_config file and use match blocks within it as @rboud suggested. It would look like: #Define all the ports you want to forward Port 2323 #Configuration for x.myservice.com Match Host x.myservice.com Port 2323 You can also implement ssh multiplexing with a tool like HAProxy. You can learn more about this at: https://docs.haproxy.org/ I'd consider using version 3.0.0 as it the latest LTS version. Perfect for a project
24 replies
TTCTheo's Typesafe Cult
Created by Anish on 12/30/2024 in #questions
Proxy for ssh protocol
where the port acts like your proxy parameter
24 replies
TTCTheo's Typesafe Cult
Created by Anish on 12/30/2024 in #questions
Proxy for ssh protocol
If you're using docker, just simply map the containers ssh port (22) to some other port on the host (2323) with something like: docker run -d -p 2323:22 --name my_container your_image or if you're using compose add this to your service: ports: - "2323:22" now if you ssh by using the command ssh -p 2323 user@somehost you should be able to access your container
24 replies
TTCTheo's Typesafe Cult
Created by SunkenInTime on 12/29/2024 in #questions
Advice on how to switch over to web development with previous software development experience
the point that I am trying to make is learning to code is one thing, understanding your code and how to make good choices is another. When you learn things as you need to, you retain them for longer, you may occasionally want to reinforce what you know by searching for better solutions. Dont be afraid to try new things and Good luck!
13 replies
TTCTheo's Typesafe Cult
Created by SunkenInTime on 12/29/2024 in #questions
Advice on how to switch over to web development with previous software development experience
are clunky. when writing code, autocomplete is limited, you cant safely check if the variable has the correct type or not, as your project grows, problems show up more often and you now spend more time fighting JS then writing new code. That is when you will discover TS. the solution to all your problems
13 replies
TTCTheo's Typesafe Cult
Created by SunkenInTime on 12/29/2024 in #questions
Advice on how to switch over to web development with previous software development experience
Honestly, web development is very broad and will most likely include something that interests you. I'm currently a full stack developer and I found coding bootcamps to be boring, and kinda useless. Sure they can help you to some extent, learn the syntax of the language, quirks of JS (Theres so many I doubt one can uncover all of them in one lifetime), tech stacks etc etc. But that's boring and would most probably make web dev seem more mundane than it actually is. I would recommend you take a progressive approach. Dont try to make an entire app in one go. That never helped me. Instead, start small, almost laughably small. Simple HTML files with some CSS flair. Familiarize yourself with the DOM because if you dont, it will give you headaches. Trust me, getting a hand of the DOM, how it is laid out, what relations can be formed, how can it be manipulated will give you an advantage. Once you can create basic web pages, try doing something more complicated and very soon you'll realize why you need JS. What a lot of coding bootcamps miss out on is the why. When you are limited by HTML and CSS, you'll have an incentive to learn JS. Incentives are really important and one as big as not being able to make complex apps is a pretty good incentive. Dont spend the time learning every JS function there is. Learn as you need to learn. Need to manipulate the DOM? Learn how to do that in the JS. Need to style something after the fact, learn how to style with JS. Small baby steps will help you out more here. When developing your app, you'll soon realize that vanilla JS is CLUNKY. Everything you need to do, takes soo long and is absolutely tedious. You'll soon find the solution, Frontend frameworks. I wont really point you to any one. You basically cant make a wrong decision with the choice of your frontend framework as they are all excellent. Choose one you like, and enjoy using. Soon you will realize that even with all the power at the tips of your fingers ( literally ) things
13 replies