Skip to main content

Posts

Chiếc nón kì diệu phiên bản 2004 viết bằng Pascal

Nhân dịp sinh nhật Turbo Pascal 40 tuổi, tìm lại trò chơi Chiếc nón kì diệu mình viết năm 2004. Hồi đó không hiểu kết nối như thế nào mà cũng được đăng lên báo. e-CHÍP bắt đầu từ 2003, tới 2016 thì ngưng báo giấy chuyển lên báo điện tử, rồi từ từ chìm dần. Hồi đó ít báo chí, chỉ mong chờ Làm bạn với máy ví tính và e-CHÍP ra để đọc ngấu nghiến. Tới giờ vẫn còn nhớ câu slogan "Tin học như cơm bình dân". Chắc anh chị em 9x làm IT thì ai cũng biết tới báo này, cả một bầu trời tuổi thơ luôn. Xem thêm bài của bác Phạm Hồng Phước về báo e-CHÍP .  Do web sập rồi nên copy nguyên văn lại bài PR cũ ra đây, văn vẻ hồi đó cứ như ChatGPT viết... Giới thiệu về chương trình “CHIẾC NÓN KÌ DIỆU” Ngôn ngữ: Pascal Tác giả: Đào Hoàng Sơn (THCS Đống Đa) 1. Ý tưởng ban đầu Ban đầu, chỉ với sự hứng thú với chương trình chiếc nón kì diệu trên truyền hình, đồng thời do được chơi 1 trò chơi làm bằng Flash giả như là chương trình chiếc nón kì diệu nên tôi đã nảy ra mong muốn làm 1
Recent posts

Replacing GCP with Railway for faster cold start

TL;DR I switched a Dart API from Cloud Run to Railway for a 300% faster cold start, simplified DevOps, and a straightforward fee structure. Problem I'm working on this project github.com/daohoangson/flutter_widget_from_html . It is a pub.dev package that's super handy for Flutter developers who want to seamlessly render HTML in their apps. Now, when it comes to HTML, it can get pretty dynamic, right? That's why having a playground to showcase features, troubleshoot issues, and tackle bugs is crucial. The Google team has this fantastic tool called dartpad.dev , which is just perfect for this kind of thing. However, there's a little catch - third-party packages like mine usually can't be used there (unless you have thousands of likes, as explained on  Medium ). So I decided to take matters into my own hands, forked it, then deployed try.fwfh.dev with additional package support. Initial idea since 2019 First deployment  in 2021 Cl

Wow, thanks GitHub!

 

500 GitHub stars 🌟

  It has been ten months ...

Mysterious Android version code = configured value plus 2000

If you are building Flutter app and shows app version in-app for users to see (mostly testers). You may run into a weird issue that the version code is different from the configured value. E.g. if you run ` flutter build --build-number=1234 ` it will show up as ` 3234 `, 123 shows up as ` 2123 `... What the hell is happening? flutter.gradle#L864-L876  is the culprit. Basically ` --split-per-abi ` will increase the version code number by 1000, 2000, 3000, etc. as seen above. If you don't want that behavior, just build one single fat APK.

300 stars and 100 forks 🎉

  It only takes eight months  😅

A faster Docker for Mac experience

Docker for Mac is freaking slow, this is known issue for years. I'm switching to docker-machine running within Parallels for now... Image from unsplash.com Install the tools I use brew to quickly install these: brew install docker-machine brew install docker-machine-parallels Create the virtual machine The --driver param and vm name is required. The others are all optional, the default values are quite low so I bumped the specs a bit. docker-machine create --driver=parallels \   --parallels-cpu-count=2 \   --parallels-disk-size=100000 \   --parallels-memory=4096 \   parallels Usage Set up the shell environment: eval $(docker-machine env parallels) Then use the cli as normal: docker ls docker-compose up -d To get the vm IP address: docker-machine ip parallels