Rsync with Github actions when using a a custom port
Published on:If you want to rsync with a custom port in a GitHub action, you need to do three steps:
- Add the port to as a secret
- Add the port to known_hosts file
- Perform the rsync action
If you want to rsync with a custom port in a GitHub action, you need to do three steps:
I bought Operator Mono two years ago. If you don’t know, Operator Mono is this fancy code font that was in the rage back then.
It’s nice. It has a unique serif feel to it. And it has real italics on a code font. Real italics
It’s pricey too — it costs $200. It took me a long time to contemplate and I finally bought it.
<Image src="/assets/2022/operator-mono/operator_ide2.png" alt="Operator mono used for some code." loading="lazy" />
Fast forward two years, I decided to stop using Operator Mono and switch back to a free font.
Have you noticed you write a lot of asynchronous code in Express request handlers? This is normal because you need to communicate with the database, the file system, and other APIs.
When you have so much asynchronous code, it helps to use async/await. It makes your code easier to understand.
Today, I want to share how to use async/await in an Express request handler.
You won't need to serve up HTTPS when developing locally because localhost
is treated like a secure context.
But you need to use a HTTPS scheme even on localhost in some cases — like when you're trying to work with Facebook's API.
We're going to talk about how to serve up a HTTPS website on localhost
. It's quite simple. Really.
You may be frustrated with how the industry uses "wrong" practices to filter out candidates — most companies focus on data structure, algorithm and the Big O notation as interview questions when hiring.
It's wrong! Why? Because it's not like developers deal with data structures and algorithm everyday, right? Shouldn't they focus on letting someone show their project and explain their logic?! Why do they use leet code or give you a data structure for you to solve and explain when you don't care about them?
Hello! It's a tradition for me to write a review for the year. I'm going to do it again this year even though I haven't been blogging for a couple of months.
Many things happened last year so it's easier for me to split this review up into 4 sections:
It's normal to feel anxious when applying for a job. After all, you're trying to present your best self in hopes of getting the job. Today's article will help you learn to control or work with this anxiousness.
I propose four ways to work through your anxiousness
I found out about Astro while reading CSS Trick's newsletter. I knew I had to check it out since both Chris and Robin were excited about it. And boy, I'm excited too, even though I only read the Github Readme!.
I want to share why I'm excited about Astro today.
Both async
and defer
attributes look like they do the same thing at first glance, but there are nuances to async
and defer
. Most of the time, you'd want to use defer
instead of async
, even though async
sounds sexier.
But why?
I'd like to walk you through the differences and why you should use them (and also why you don't have to use them).
For a while I've been telling myself that it's okay as long as I tried my best. It's been a decent strategy for a long time, but it's not working for me anymore.
I want to explain why it doesn't work and what pitfalls you might want to watch out for if you use the same strategy in your life.
My Macbook broke down after using it for a year — the logic board got fried. I got this Mac repaired and it broke down a month later. The logic board got fried again 🤦♂️.
Long story short, Apple agreed to repair the Mac again for free. They also agreed to send me a new Macbook as a replacement since my current one gave me so many problems.
In the meantime, I've gotten pretty good at setting up my Mac and I'd like to share how I do this with you.
I'm playing around with Sass again recently and I noticed newer features (like @use
and @forward
) are only available on Dart Sass. Upon further inspection, I noticed that LibSass is now deprecated.
This article aims to help you get started with Dart Sass if you're using Gulp.
It used to be straightforward to disable languages for Prettier in VSCode. You just added a prettier.disableLanguages
setting and you were done.
// In settings.json
[
"prettier.disableLanguages": [
"javascript",
"javascriptreact",
"json",
"markdown"
],
]
Unfortunately, prettier.disableLanguages
is deprecated so we can’t do this anymore. Here’s what we can do instead.
Prettier is an opinionated tool that helps you format code. I love Prettier, but I don't like its opinions with JavaScript. I prefer using Standard for JavaScript because it doesn't have semicolons (which makes the code cleaner to read).
It used to be complicated to use Prettier and Standard together. We had to disable Prettier for specific languages. Thankfully, there's a simpler way now.
JavaScript contains many things — lots of different methods and ways to do things. How do you remember them all?
If you ask around the web, many people will say you don't have to remember everything since you can always google. But this answer doesn't help — you can't always Google everything, every time. If you forget absolutely everything and Google everything all the time, you're going to be real slow when you code!
So what's the alternative? What must you remember? What can you forget? That's what this article is for.
If you don't have a job as a developer, learning how to code becomes a much bigger challenge for a simple reason — developers can learn to code on the job.
I want to share with you 7 major challenges people face when learning, especially if they don't have a developer job. I'm also going to talk about how you can overcome each challenge.
I finally completed my JavaScript course — Learn JavaScript — two weeks ago. I spent 4 years writing this course (which is a long time!). Today, I want to reflect on this journey and complete it before I move onto the next one.
If you're interested in hearing the lessons I learned from dedicating 4 years of my life to building one course, then this article is for you!
One irritating thing about Github Actions is you can't debug secrets. If you try to debug secrets you'll get ***
in the log.
<Image src="/assets/2021/debug-github-actions-secret/run-echo.png" alt="run echo" />
This makes sense because Github is trying to help us keep the secret secret (ha!). But it doesn't help when we're trying to figure out whether there's something wrong with the secret we provided.
I wanted to use Github Actions to deploy zellwk.com — when I push a commit into Github, I want Github Actions to build my site and deploy to my Digital Ocean server.
The hardest part of this process is deploying to the server with SSH and rsync. I tried various Github actions like SSH Deploy and SSH Action, but I couldn't get the permissions to work for A LONG TIME.
I found most articles about Github actions and SSH didn't help me much. I got stuck with debugging for a few days before I finally figured out how to make the process work.
Today, I want to share the exact steps to deploy via rsync and SSH. This process works for any server, even if you don't use Digital Ocean.
Github Actions is a Continuous Integration (CI) + Continuous Deployment (CD) tool by Github.
CI and CD are bombastic terms, but they simply mean the following:
Although Github Actions is one of the many CI + CD Tools out there, it's probably the simplest one to use (in my experience). Unfortunately, the Github Actions docs is a complete mess — they keep pointing you to different pages, expecting you to read everything (and understand everything) when you're still trying to set up your first action.
Today I want to share the basics of using Github Actions so it becomes easy for you to use it.