Posts

Showing posts from July, 2024

Create a Live Chat Web Widget Tutorial using Javascript

Image
Simple live chat javascript demo There's been so many chat widgets out there you can just use. But what if you want to create and manage the entirety of your system by yourself? It's very easy to create another live chat widget on your own. In today's tutorial, I'm going to show you how to create a live chat using JavaScript and Node.js. The chat will be very simple, allowing you to modify it according to your needs and styles. The main features of our chat will include: - A page for clients - A page for the admin that can simultaneously reply to all incoming client chats We'll begin by setting up the client-side of our chat application. This will be the interface that your users interact with when they visit your site. The HTML file, which we'll call user.html , will contain the basic structure for the chat interface. You can style it to fit the look and feel of your website, adding CSS for visual appeal and JavaScript to handle the interactions. Ne

Unix Tail Command on Windows to Print Live Logging

Image
Show live logs in windows Windows is a great operating system for day-to-day use, but there are some things in Linux and Unix that Windows doesn't have out of the box. For example, when I need to SSH into a Linux server, I often want to view log files using the tail command. Unfortunately, Windows doesn't have a native tail command. However, we can create our own function to mimic this simple tail operation using PowerShell. Using Get-Content Get-Content -Path logfile.txt -Wait To mimic the Unix-like tail -f command in PowerShell permanently, you can create a custom function in your PowerShell profile. 1. Open PowerShell or Windows Terminal : First, open Windows PowerShell or Windows Terminal and ensure you're using PowerShell. 2. Modify Your PowerShell Profile : Your PowerShell profile is a script that runs every time you start a new PowerShell session. To edit this profile, open it with any text editor. The profile is typically located at Documents\WindowsPowerShe

Dead Inside poetry & artistic illustration

Image
Dried Insight artistic illustration The unhappiness An unending, uncertain, unachievable goal, not even sure what the goal is, low self esteem, constantly comparing the success of others, far away from someone you care about, unhealthy condition, constantly yawning from lack of sleep and obese from unhealthy food, fear of being replaced or kicked out from the job, fear of uncertain embarrassment, unconfident about body shape, doesn't have real strong faith in anything, simply living like a rat, searching for pleasure, running away from danger NB: These poems I created come from a place of self-reflection, exploring the reasons why humans often find themselves unhappy. I truly believe that happiness isn't a mysterious science. It's usually quite simple to identify the sources of our unhappiness. The real challenge lies in overcoming the obstacles that prevent us from achieving happiness. It's a journey that requires patience, effort, and a willingnes

When a Developer Starts to Hats the Computer

Image
Developer hustling As a developer working a 9 to 5 and then continuing to grind on a side hustle afterwards, I often feel incredibly stressed. I can't quite pinpoint if it's the lack of sleep and exercise or the unhealthy food I consume, but I'm starting to despise working with the computer. Even just touching the mouse and navigating to the app I need feels overwhelming. Sometimes, I wonder if I should take a break from chasing that dream startup I've been envisioning and just focus on achieving a healthier work-life balance with my day job. The constant hustle can be exhausting, and I'm beginning to question whether pushing through is the best path or if stepping back might help me recharge and ultimately bring my startup vision to life with renewed energy and clarity. Balancing the demands of a full-time job, a side hustle, and family responsibilities can be overwhelming. I have family that I don't want to miss the time we together, adding another layer of pr

Am I Going to Hell for Working as a Game Developer?

Image
Sunset at the beach I’ve been spending a lot of time binge-watching "The Good Place" lately, a show where people are sent to a good or bad place based on their actions while they are alive. It’s essentially a modern take on the concepts of heaven and hell. Personally, I think it’s one of the best TV shows ever made because I enjoy philosophy. Lately, though, it’s made me think about my own ethical dilemmas. I work as a developer in the entertainment game industry, and sometimes I wonder if my job is actually benefiting society. Are we just encouraging people to spend their time and money on something that might not be good for them? Are we fostering selfish behaviors and contributing to negative consequences? But then, I remind myself that my goal is to create engaging and enjoyable software. I want people to love what I create and find happiness in it. It’s not my intention to make them waste their time and money. In my defense, creating something that brings joy is already

Ffmpeg tutorial video to photos

Image
Ffmpeg video to photos I’ve found that FFmpeg is incredibly useful for handling various video operations. For instance, when I need to extract images from a video I’ve recorded, FFmpeg comes in handy. Sometimes, capturing the perfect photo can be tricky. It’s much easier for me to record a scene and then extract each frame from the video. This way, I can pick the best shots for social media or any other purpose. Here’s how you can do it: 1. Install FFmpeg (if you haven’t already): - On Windows, you can use Chocolatey, a package manager for Windows. - Simply open a command prompt and run choco install ffmpeg 2. Open a terminal or command prompt on your computer. Run the following command to take a PNG screenshot every second from a WEBM file: ffmpeg -i input.webm -vf "fps=1" screenshot_%04d.png Explanation of the command: -i input.webm: This specifies the input WEBM file. You can replace input.webm with your own video file, whether it's in MP4, MKV, or ano

HTML CSS Ripple Effect When User Click Any Button

Image
Button click ripple effect As a UI/UX developer, I sometimes need to implement cool effects from other platforms that aren't natively supported in my environment. One example is the material design Ripple effect. Below, I've included some CSS and JS code to override the button click effect to use the material ripple effect. The ripple effect is like a droplet of water. When you click or touch the button, it shows ripple effects, adding more interaction and feedback for the user. This helps users know exactly that their action has been registered. As UI/UX developers, it's crucial to provide feedback to users to indicate that their actions have been registered, preventing them from clicking the button multiple times out of uncertainty. This ripple effect accomplishes that. When working on Android mobile devices, native UI components often include material design elements by default, such as the ripple effect when using material design. However, web interfaces can be a bit

Search all files in Linux and open it in Vim directly

Image
FZF combine with VIM I've recently discovered a neat trick that combines FZF and Silver Searcher (ag) to make my development workflow smoother. If you're like me and you want to respect your .gitignore while using FZF, and you also want to open files in Vim straight from FZF, here's a simple guide: First things first, you'll need to install FZF and Silver Searcher. You can do this easily with the following command: sudo apt- get install fzf silversearcher-ag Once you have these tools installed, the next step is to tweak your .bashrc file to set up the right environment variables. This ensures that FZF respects your .gitignore file by default. Open your .bashrc file with your favorite text editor: nano ~/.bashrc Add the following line to the file: # For respecting gitignore export FZF_DEFAULT_COMMAND= 'ag -g "" ' This command tells FZF to use Silver Searcher (ag) to list files, respecting the .gitignore . Next, let's set up a function i

Dark Mode Toggle Javascript Tutorial For Website or Blog

Image
In today's post, I'm excited to share a simple yet powerful way to add dark mode functionality to your website or blog. This is especially useful because many web technologies still struggle to follow system themes automatically. Even though users can find dark mode plugins for browsers, not everyone has them installed. This tutorial is part of a series where I share various widgets that I have created for blogs and websites. Today, we’ll look at how to implement a ‘Dark Mode Toggle’. This button will allow your visitors to switch your site’s theme between dark and light modes effortlessly. The beauty of this dark mode toggle is that it is created purely using vanilla JavaScript, meaning it doesn’t require any additional libraries. This makes it incredibly easy to integrate into any website, whether you’re using Blogger, WordPress, or any other platform. To get started, simply copy and paste the following code snippet before the closing `</body>` tag in your HTML file,  (

Add Floating Go to Top Button Into Your Website or Blog

Image
Embeddable script 'go to top' button Today, I'm going to explain how to place a floating "Go to Top" button on your Blogger site. This can also be applied to any website, not just Blogger. The process is straightforward and only requires adding a script before the closing </body> tag of your HTML. Here's how to do it: 1. Log in to Blogger - Navigate to the Theme menu. - On your active theme, instead of pressing Customize , click the triangle icon to reveal additional links. - Select Edit HTML . - Scroll to the end of the HTML or search for the </body>  tag. - Insert the following script right before the </body> tag: Here's the script to Add Floating Go to Top Button in your website (any website). The only magical part of the entire script is this snippet: button.addEventListener('click', function() { window.scrollTo({ top: 0, behavior: 'smooth' }); }); Everything else is j

STOP following those self-help content, START doing your immediate tasks and responsibilities

Image
The fastest way to reach any point is Start to walk immediately I feel like I'm almost halfway to achieving my dreams, thanks to the mindset I've developed from all the self-help books and content I've consumed over the years. It's been quite a journey, and I've learned a lot. However, this relentless drive towards a big dream has made me somewhat of a workaholic. I've become so focused on achieving something monumental that I've started to forget about my surroundings and the simple pleasures in life. The Cost of Chasing Big Dreams This idea of achieving something grand has made me lose touch with everyday joys. I can't remember the last time I truly savored the taste of my food or enjoyed a small moment without thinking about the next big milestone. The constant chase for something bigger has overshadowed my ability to appreciate the here and now. Taking a Break from Self-Help Content So, I've decided to take a break from all the self-help content

If money is your main motivation reconsider being a developer

Image
The contrast money situation between developer and Influencers If money is your main motivation, you might want to reconsider becoming a web developer or any other kind of developer. The ones raking in the most cash are often business owners or social media influencers. Their success usually hinges more on being born genetically attractive or personally charming rather than on creativity or hard work. Being a developer is more about the thrill of solving problems, the excitement of discovering something new, and finding better solutions. If you're passionate about coding, these aspects can be deeply fulfilling. However, if your primary goal is to get rich quick, this might not be the path for you. Let's take a look at the founders of the three major operating systems: Windows, macOS, and Linux. Linus Torvalds, the creator of Linux, is arguably the most talented developer among them. His technical prowess is unparalleled, but his deep technical focus means his financial situatio

Java my childhood memories, my home

Image
Rice fields My childhood in the countryside of Java is a treasure trove of memories. Growing up there was an unforgettable experience. My long-lost friends and I used to have so much fun playing in the rice fields with buffaloes. We would hunt for fish and fruits in the jungle, and when the rain poured down, we would light a fire and stay inside an uncovered hut in the middle of the rice field, cooking the fish and corn we had gathered. The warmth of the fire and the company of friends made those rainy days special. I really miss those moments. Java is the most populated island in the world, governed by Indonesia. This island holds a special place in my heart as it is the homeland of my ancestor, mother, father, and myself, at least until I moved to the capital after finished high school. The cultural and governmental distinctions between Java and the rest of Indonesia are quite significant, and I'd like to share some of these differences with you. First and foremost, the language.

I feel like I am having Mental Breakout

Image
  Inside of stress person's mind Hey there, I hope you're doing well. Today, I want to share something deeply personal with you. Recently, I've been experiencing a mental breakout, and it hasn't been easy. But I believe in the power of vulnerability and sharing our stories, so here's mine. Recognizing the Signs It started subtly. A feeling of overwhelming fatigue, difficulty concentrating, and a constant sense of dread. I knew something was off, but I brushed it aside, thinking I could push through. Sound familiar? It's easy to ignore the signs when life gets busy, but acknowledging them is the first step to healing. The Struggles of Being Introverted One of the main causes of my mental breakout is feeling disconnected from my friends. As an introvert, I find it hard to start conversations with friends or people in general. This has often left me feeling isolated and misunderstood, even among those who care about me. Living and Working Alone I work alone and liv

CODE NO MORE? take it slowly and re-think it again

Image
Lately, I've been feeling a bit restless in my career as a programmer. Day by day, the excitement I once felt for coding seems to be fading, and I've found myself yearning for a different kind of creative outlet. Surprisingly, this new passion has led me towards becoming a music artist, particularly in the realm of Techno music. My newfound interest sparked an intense dive into electronic music. I’ve been soaking up the history, from the pioneering sounds of Germany's 70s band Kraftwerk to the vibrant beats of modern EDM stars like Avicii. Watching documentaries, listening to countless tracks, and even trying my hand at creating some basic tunes has been incredibly invigorating. I've invested in a few simple instruments – a keyboard, a guitar – and some software to help me bring my musical ideas to life. However, amidst this musical exploration, I stumbled upon a documentary about Avicii. Known for his incredible contributions to EDM, Avicii's story is both inspirin

I just created My Code Editor - a Visually enhanced editor unlike any other

Image
Code Editor by Techgalery.com Hi everyone, I’m excited to share something I’ve been working on that I think you’ll find interesting. I’ve always been a bit tired of the typical black and white code editors, so I decided to create something a little different. Why This Code Editor? A Fresh Visual Experience I wanted to make coding more visually enjoyable, so this editor has a more vibrant and customizable interface. It’s designed to reduce eye strain and hopefully make coding a bit more pleasant for you. Background YouTube Video Playback One feature I’m particularly excited about is the ability to play YouTube videos in the background while you code. Whether it’s tutorials, music, or podcasts, you can have it all in one place without having to switch between apps. I thought this would be a cool way to enhance the coding experience. Built with Python QT This editor is built using Python QT, which helps make it responsive and efficient. I chose Python QT to ensure that the interface is no

Popular posts from this blog

ERROR 1348 Column Password Is Not Updatable When Updating MySQL Root Password

How To Create Spring Boot Project Using Netbeans

Spring Kafka - How to use ReplyingKafkaTemplate send and reply synchronously