Skip to content

Instantly share code, notes, and snippets.

@ynwd
ynwd / catch.go
Created January 23, 2025 07:43
try catch go
package main
import (
"log"
)
// Goals: never crashing the program!
func problem2() {
defer func() {
if err := recover(); err != nil {
@ynwd
ynwd / nginx-compute-engine.md
Created January 15, 2025 10:12
Installing Nginx and Certbot SSL certificate on GCP Compute Engine

Setup GCP Free Tier Compute Engine with Terrafom

# Prepare terraform installation
sudo apt-get update && sudo apt-get install -y gnupg software-properties-common

wget -O- https://apt.releases.hashicorp.com/gpg | \
gpg --dearmor | \
sudo tee /usr/share/keyrings/hashicorp-archive-keyring.gpg > /dev/null

gpg --no-default-keyring \

How to Start a Startup

by Paul Graham, YC Founder

Key Components for a Successful Startup:

  • Good people: Find passionate and dedicated individuals.
  • Make something customers want: Focus on creating a product that meets customer needs.
  • Spend as little money as possible: Be frugal and avoid unnecessary expenses.
@ynwd
ynwd / store.ts
Created September 23, 2024 04:45
Store: key & value map with TTL
import { Store } from "https://fastro.dev/core/map/map.ts";
// init store with options.
// you have to prepare the repository
// and GITHUB_TOKEN if you want to save
// to Github repository
const store = new Store({
owner: "fastrodev",
repo: "fastro",
@ynwd
ynwd / wa.svg
Created June 30, 2024 08:39
wa
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ynwd
ynwd / estimation.md
Last active June 9, 2023 02:00
Run fast, pay later

Time estimation is used to predict the amount of time that will be required to complete a task. We have talked about how a central part of being a project manager involves planning. Carefully performing key steps of your planning process, such as time estimation, can have a big impact on the success of your project. Conversely, flawed time estimation is the root cause of many failed projects. That means many projects fail because project managers and teams fail to accurately estimate the time that it will take to complete tasks.

Let’s discuss the following case study, which discusses how inaccurate time estimation can affect a project.

Run fast, pay later: A case study on time estimation

Kendra just scored a project manager role on a new project. It was a highly competitive bid, and the company and Kendra are eager to do a great job.

Kendra realized immediately that the timeline for the project would be almost impossible to execute. However, this was the first big project she was asked to manage. There

@ynwd
ynwd / qemu.md
Created May 26, 2023 03:46
Macos, Qemu and Debian

Install homebrew

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Install QEMU and other required packages:

brew install qemu
@ynwd
ynwd / Vagrantfile
Last active December 21, 2022 12:52
Alpine and Kubernetes in Vagrant
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "generic/alpine317"
config.vm.synced_folder ".", "/vagrant"
config.vm.network "forwarded_port", guest: 6443, host: 6443
config.vm.provider "virtualbox" do |vb|
vb.memory = 4096
@ynwd
ynwd / setup_oauth.md
Last active July 26, 2022 03:05
Cara Setup Oauth2 di Kong Gateway
@ynwd
ynwd / podman-docker-compose.md
Created June 24, 2022 08:56
How to run docker-compose on podman and macos

podman

Install podman and docker-compose

> brew install podman
> brew install docker-compose

Create a symlink so podman can be executed with "docker" command.