Nathaniel's blog
All tags

#DevOps

46 posts tagged with “DevOps

Turborepo: Scaling Your TypeScript Monorepo
TypeScriptDevOpsNext.js

Turborepo: Scaling Your TypeScript Monorepo

As your project grows from one app to multiple apps sharing packages, a monorepo becomes the natural architecture. Turborepo makes monorepos fast and manageable by orchestrating builds, caching result...

Mar 2, 20267 min read4
Drizzle ORM: Type-Safe Database Queries in TypeScript
TypeScriptDevOpsLLM

Drizzle ORM: Type-Safe Database Queries in TypeScript

Drizzle ORM is a TypeScriptfirst database toolkit that generates SQL you can actually read. Unlike Prisma (which has its own query engine) or TypeORM (which uses decorators), Drizzle maps directly to...

Feb 27, 20268 min read1
CI/CD Pipelines with GitHub Actions
DevOpsTypeScriptNode.js

CI/CD Pipelines with GitHub Actions

Continuous Integration and Continuous Deployment (CI/CD) automates the journey from code push to production. GitHub Actions makes this accessible with YAMLbased workflows that run on every commit, PR,...

Feb 24, 20267 min read2
Docker and Kubernetes for Frontend Developers
DevOpsTypeScriptNext.js

Docker and Kubernetes for Frontend Developers

If you're a frontend developer who's never touched Docker, you're not alone. But as fullstack development blurs the lines, understanding containers is becoming essential — not just for deployment, but...

Jan 31, 20268 min read0
Building a transparent LLM proxy with Cloudflare Workers and Hono
TypeScriptDevOpsLLM

Building a transparent LLM proxy with Cloudflare Workers and Hono

The core idea behind an LLM inference gateway is deceptively simple: intercept LLM API calls, forward them transparently, and capture data along the way. Implementing it cleanly took more thought than...

Jan 15, 20268 min read7
Six months with MCP: the good, the bad, the weird
TypeScriptDevOpsNode.js

Six months with MCP: the good, the bad, the weird

I've been building with Model Context Protocol since around early 2025, first integrating tools for an AI agent security platform, then building a multiMCP gateway. Here's where I actually stand after...

Aug 10, 20258 min read2
Cutting LLM costs by 20%: what actually moved the needle
TypeScriptNode.jsLLM

Cutting LLM costs by 20%: what actually moved the needle

We were burning through LLM API budget faster than expected. After a few weeks of profiling and experiments, we got costs down by about 20%. Here's what actually worked versus what sounded good in the...

Jul 15, 20246 min read5
Kafka at 200k DAU: what breaks and how to fix it
TypeScriptDevOpsNode.js

Kafka at 200k DAU: what breaks and how to fix it

We hit about 200k daily active users on our platform at peak. Most of the stack held up fine. Kafka was where we learned the most. Here's what I wish I'd known before we got there. Partition count mat...

Feb 10, 20247 min read3
Writing my first Solidity contract: lessons from the trenches
TypeScriptReactNode.js

Writing my first Solidity contract: lessons from the trenches

Before I joined my current company, I had exactly zero production Solidity experience. I'd read the docs, deployed a toy contract on a testnet years ago, and that was it. Three months in, I've shipped...

Aug 20, 20237 min read4
On leaving Microsoft after 18 months
TypeScriptReactDevOps

On leaving Microsoft after 18 months

Disclaimer: this is a reflection, not a complaint. A year and a half goes by faster than you'd think. When I joined, I was still fairly new to the kind of scale that a big tech company brings — hundre...

Mar 5, 20234 min read2
What I learned running 50 A/B tests in one year
TypeScriptReactDevOps

What I learned running 50 A/B tests in one year

Running A/B tests was never something I thought I'd be doing this much. But at my current gig, we ship new experiments almost every week. After doing this for about a year, I've picked up a few things...

Mar 15, 20227 min read2
From Jobless to FAANG - My three year journey
TypeScriptReactGraphQL

From Jobless to FAANG - My three year journey

Disclaimer: this post is all about my personal experience, only representing my point of view, take it with a grain of salt. About three years ago, I was graduating from college with a CS degree. Drea...

Oct 16, 20214 min read203
How I make memes inside code
TypeScriptDevOpsNode.js

How I make memes inside code

Just another day, I was making memes on reddit, and writing code in the interval. It suddenly struck me, why can't I do both at the same time? Making memes inside code is totally possible, just make a...

Jul 31, 20214 min read270
Building a high concurrency student course selection system
TypeScriptReactGraphQL

Building a high concurrency student course selection system

Intro Remember those days when your school system suck so much that you can never pick the course you want? Well, those days are no more. After learning how to design a high concurrency student course...

Jul 24, 202110 min read256
The making of a modern javascript library
TypeScriptDevOps

The making of a modern javascript library

Every 60 seconds passed in Africa, a new javascript library is created. There are a plethora of js libraries out there, and today I made another one. What Recently, I need to build some function revol...

Jun 21, 20213 min read90
How I build an app in 2 hours
TypeScriptDevOps

How I build an app in 2 hours

Yesterday I built an android app in 2 hours with without even knowing how to write in before starting to work on it. Granted, the app is really simple and I've written some demo app at around 2014 whe...

Feb 17, 20214 min read126
Migrate to typescript - the advance guide
TypeScriptReactDevOps

Migrate to typescript - the advance guide

About a year ago I wrote a guide on how to migrate to typescript from javascript on node.js and it got more than 7k views. I did not have much knowledge on javascript nor typescript at the time and mi...

Dec 7, 202011 min read125
Let's talk about design patterns
TypeScriptReactDevOps

Let's talk about design patterns

What is a design pattern Design pattern is a method of solving specific problems through definition, use, and testing. It is a universal and reusable solution proposed for the repetitive problems in s...

Jul 8, 20202 min read19
Speed up your build by putting node_modules in ram
TypeScriptDevOps

Speed up your build by putting node_modules in ram

After a day of diligently copying from Stackoverflow and Google searches, you finally ready to build that 10GB Frankenstein project. You type into the console then went home and enjoy the rest of your...

Apr 2, 20204 min read15
Getting Started with Tensorflow.js
DevOpsNode.js

Getting Started with Tensorflow.js

Computer science is no more about computers than astronomy is about telescopes. Edsger Dijkstra In order to have easy way of Machine learning in Javascript, you need , this guide will help you setup w...

Sep 2, 20192 min read9
Basis of computer networks
TypeScriptGraphQLDevOps

Basis of computer networks

By learning computer networks, I've gather some most useful knowledge and put them here. What is a threeway handshake? The first handshake: Client sets SYN to 1, randomly generates an initial sequence...

Jul 8, 201927 min read2
Solve PostgreSQL "duplicate key violates unique constraint" error
DevOps

Solve PostgreSQL "duplicate key violates unique constraint" error

今天VPS到期了,迁移到了香港的一个数据中心,速度飞快、延迟超低,但是数据迁移中总是出现 的错误。通过一番和的查询算是了解了原因并解决了问题。 原因 在创建了新表之后,数据的导入由于没有用语句而是直接插入,因此一些自增的的值对不上当前的最大,比如本来自增指向,而由于导入数据已经应该是了,这个时候就需要重新调整的指向位置,即: 常见问题 有时候可能已经有的被我们不小心给删了,那么需要创建新的,那就用...

Jun 15, 20191 min read11
Installing postgresql on Debian 9
DevOpsLLM

Installing postgresql on Debian 9

获取postgres 连接 查看连接信息 退出 创建用户 如果当前用户不是postgres,则 然后 远程访问 找到 ,一般在下 找到后用打开 其中找到 然后修改为 然后同一目录下找到 在其最后一行加上 完成之后重启服务

Jun 15, 20191 min read2
SSH troubleshooting
DevOps

SSH troubleshooting

装了个,然后给我神神秘秘、鬼鬼祟祟地跑了些流程,然后我再用ssh连我的server就连不上了?出现以下提示: 我就纳闷了 ,装一个 哪来的这么多的事,直接重新生成一个ssh key得了。 要用ssh key就得用安全的,4096位走起,暴力搞肯定搞不出来了。 然后就是用扔服务器上了。 然后一试,哟~还是登不上去,熟悉的错误,熟悉的味道。。 ssh登不上去,只有服务商vnc连着改了,把里面 和都改成...

May 1, 20191 min read6
Ways to create Systemd service
DevOps

Ways to create Systemd service

创建一个文件 ,内容如下 1. 扔进 ` 2. 权限不足的话记得改权限 3. 启动服务 4. 开机时运行 5. 停止服务

Mar 16, 20191 min read4
Let's talk about Operating system
TypeScriptGraphQLDevOps

Let's talk about Operating system

What is the difference between a process and a thread? Process (Process) is the basic unit of system resource allocation and scheduling, and thread (Thread) is the basic unit of CPU scheduling and dis...

Dec 8, 201833 min read4
Use Telegram to send and receive qq messages
DevOps

Use Telegram to send and receive qq messages

跟上一篇内容类似,这里不多废话了。 首先安装docker 然后安装CoolQ客户端 (施工中...)

Sep 21, 20181 min read5
Use Telegram to send and receive WeChat messages
DevOps

Use Telegram to send and receive WeChat messages

Why Telegram? 封闭而落后的微信已经逐渐无法跟上时代的发展脚步,中立而现代的Telegram在Whatsapp被Facebook收购后,逐渐成为了广大Geek的首选,它不仅功能强大,支持10万人群组,支持各种机器人,消息全平台同步,而且也完全免费且开源。由于其GPL License以及开放API,第三方Telegram客户端在市场上百花齐放。其安全性尚有争议,在这里本文提示,尽量不要使...

Sep 9, 20182 min read13
Android 8.0 deodex
DevOps

Android 8.0 deodex

本文目标在于为广大Android开发者,ROM制作爱好者,喜欢瞎折腾的刷机爱好者提供一份简明而全面的deodex方法。注意,由于机器版本、硬件设施以及软件版本等变化万千,本人不对以下方法执行后造成的任何手机问题负责。 什么是deodex? 如果你连deodex是什么都不清楚的话,那么下面我推荐你仅以知识获取的心理状态来阅读本文余下的部分,而不要实际去尝试。 Android5.0以前 这个时候的An...

Aug 28, 20181 min read14
All things Database
TypeScriptGraphQLDevOps

All things Database

What are the concepts and characteristics of transactions? Concept: Transaction is a sequence of operations, an indivisible unit of work, starting with BEGIN TRANSACTION and ending with ROLLBACK/COMMI...

Jul 8, 201823 min read4
All things Git
TypeScriptDevOps

All things Git

Git Common Commands Push to the dev branch of the remote warehouse: After commit, a small bug was changed, but you don't want to add a commit, you can use: git pushgit pulltouch .gitignoregit tag v1.0...

Nov 8, 20176 min read3
Ways to change Fedora25 Shell
DevOps

Ways to change Fedora25 Shell

Bash固然经典,但Zsh更佳,那么怎么把root用户的Shell切换为Zsh呢?自己总是忘记,那就写一篇文章辅助记忆一下吧。 Fedora的事情总是比其他linux多一些,网上提供的给其他linux发行版的指令在Fedora下并不存在,所以首先得安装一个 然后应该就可以用来进行Shell的更换工作了 输入: 然后会提示你输入新的Shell所处的位置,输入即可更换。 But,Nathaniel,我...

Oct 15, 20171 min read5
Configure shadowsocks on fedora 26
DevOps

Configure shadowsocks on fedora 26

最近VPS打算从centos迁移到Fedora,这么一来就需要重新搭建Shadowsocks了,这里记录一下搭建的过程。 首先自然是安装 Shadowsocks了,由于Shadowsocks是用写的,自然就用下面的安装方式了 然后创建shadowsocks的配置文件(路径可根据自己喜好放置) 配置文件内容如下: 下面解释一下配置文件内容以及其意义: 项是你的server监听地址,是ipv4的默认地...

Sep 24, 20171 min read3
APUE reading notes-3
DevOps

APUE reading notes-3

第三章 本章主要讲了文件的I/O操作 Unix下主要有五个系统API接口用于操控文件,分别是、 、 、、 ,顾名思义,分别是用于打开、读取、写入、内部定位、关闭文件。 文件描述符 File Descriptors通常为一个非负整数,可以用于表示任何类型的文件(文件夹也是一种特殊的文件),操作系统的文件操作API通常以文件描述符作为参数。 参数选项 头文件`openopenat打开文件open打开文...

Aug 18, 20171 min read0
APUE reading notes-2
TypeScriptDevOps

APUE reading notes-2

第二章 1. 2.1 We mentioned in Section 2.8 that some of the primitive system data types are defined in more than one header. For example, in FreeBSD 8.0, sizet is defined in 29 different headers. Because...

Aug 15, 20173 min read6
APUE reading notes-1
TypeScriptDevOps

APUE reading notes-1

闲来无聊,想学习一个,提高一下自身的知识水平,据说Unix方面的神书主要有两本,分别为 Advanced Programming in the Unix Environment 和 Unix network programming 均为W. Richard Stevens所著,那么,闲话不多说,开始读书吧。 第一章 被誉为神书总是有道理的,从第一章就可以看出来,本书的作者显然不像贝尔实验室中的大触...

Aug 12, 20171 min read3
Explore git
DevOps

Explore git

用了这么多年的github,如今才发现,我对git的实际功能知之甚少,因此,今日就来研究研究git的用法,记录于此,方便我自己日后查阅,同时也方便其他打算了解git的朋友们。 Git是什么 Git是现今最常用的版本控制工具,“版本控制工具是什么?…”,什么?好吧,更新软件这件事大家应该都做过吧?软件大都有一个版本号,这个版本号就代表了软件的演进历程。每个版本的软件的代码都有不同,显然由人工来管理的...

Jul 15, 20171 min read5
Redhat interview reflection
DevOps

Redhat interview reflection

反思与总结 开端 今天去参加了RedHat的面试——人生第一场面试,结果不必多想,自然不会很好,我自己要是面试官都不会要现在这样的我。这也引发了我的种种反思。 沧海一粟、冰山一角 如果说,在之前,我自认为我对Linux的了解算是沧海一粟、冰山一角的话,现在,我发现我算是连Linux的皮毛的不了解,更不用说Linux内核的核心内容了。学习Linux好比盲人摸象,而现在的我算是连盲人都不如,象都没碰到...

Jul 12, 20171 min read12
Linux kernel compilation
DevOps

Linux kernel compilation

缘由 最近在学操作系统,(名为操作系统实为Linux内核)。都说程序员的学习、提高在于实践,实践才能出真知。所以,不来实际操作一下,感受一下Linux内核的魅力,怎么好意思说自己了解Linux操作系统。 准备工作 当然我们不能凭空地就开始编译Linux内核,巧妇难为无米之炊,以下是进行Linux内核编译前需要的准备工作: 搭建一个Linux运行环境 当然我们也可以从基于BSD的macOS、甚至是W...

Mar 23, 20172 min read3
StarCraft AI environment building tutorial
DevOps

StarCraft AI environment building tutorial

Power Overwhelming 星际争霸是什么? 星际争霸是暴雪公司旗下的一款即时策略类游戏(RTS),游戏中,玩家可选择 人类、星灵、异虫 三个种族,进行资源采集和因资源的争夺而引起的战斗。战役部分在此不予详述,自定义战斗的终极目标就是消灭敌人的所有建筑物。 为什么选择星际争霸1? 答案当然是库的支持,星际争霸2尚未有相关支持代码操纵游戏的库,同时通过对屏幕分析从而获取游戏内信息的方式也显...

Jan 26, 20171 min read1
Transact-SQL Development Experiment
GraphQLDevOps

Transact-SQL Development Experiment

实验基础信息 开发环境: 操作系统 Microsoft Windows 7 数据库管理系统 Microsoft SQL Server 2012 编程工具 Microsoft VisualStudio 2013 编程语言 C 界面演示 部分全局变量: 查询功能: (见下页) 可见,程序开启时默认显示所有订单及第一个订单的详情 单击某一行,显示对应行的订单详情 删除功能: 选取订单明细中的一行,点击删...

Sep 17, 20164 min read2
PHP learning
TypeScriptDevOps

PHP learning

环境搭建 鉴于我使用的是OSX系统,那么只需要把下的这一行取消注释,即可使用PHP了 可以在自己的下放一个这样的PHP页面检测是否成功, 如果成功出现PHP相关的信息,则说明PHP启用成功 基础语法 本文建立在你已有 等传统语言基础,并且知道数据库是什么的前提之下 与完全相同的部分被省去,仅讨论不同部分。 首先 PHP 是服务端语言,和系的 系的 对应 主要用作动态页面显示,服务端操作等,由于其完...

Jul 10, 20163 min read2
SQL basics practice
TypeScriptDevOps

SQL basics practice

实验环境 硬件环境 处理器: i55257U 2.72.9GHz 内存: 8 GB 1867MHz DDR3 硬盘: APPLE SSD SM0 256G 软件环境 操作系统: OSX 10.11.4 DBMS版本: MySQL 5.7.12 Community Server (GPL) DBMS图形界面: MySQL Workbench 6.3 实验内容 基本表 基本表的定义 语法 定义基本表的...

May 24, 20165 min read3
Concurrency control of the database
DevOps

Concurrency control of the database

并发控制的主要技术 1. 封锁(Locking) 2. 时间戳(Timestamp) 3. 乐观控制法 锁的类型 排他锁 X锁 写锁 共享锁S锁读锁 并发事务运行存在的异常问题 并发操作带来的数据不一致性 丢失更新 两个事务同时读写一个数据 事务2的写影响(覆盖)了事务1的写 导致事务1的结果失效 不可重复读 三类不可重复读 1. T1读两次数据得到不同的值,因为T2修改了该数据 2. T1再读的...

May 13, 20163 min read5
Use AirCrack-ng to crack WEP encryption under OSX
DevOps

Use AirCrack-ng to crack WEP encryption under OSX

10分钟,我便可以获取你的WEP加密的密钥 开端 凡事都有个开端,此事的开端呢,来自于网络互联课上的女同学的委托,美人有难,英雄岂能不相助?抱歉又中二了,废话不多说,先来了解问题: 问题定位 问题源自一个奇怪的路由器,此路由器品牌特殊,功能也特殊,复位后还有密码,而且密码居然和配套说明书上的不一致(大多数路由器复位后应该是没有密码的),于是这路由器就用不了了,好在机智的我敏锐地发现了该路由器是用W...

Apr 28, 20161 min read5
Why write a blog
DevOpsNode.js

Why write a blog

Yeah,it's on 开端 一直想要一个自己搭建的Blog,今天下午,说干就干,花了23小时的时间,成功的把博客搭了起来,也算是了却了我长久以来的一个心愿。 我一直想要的是自己搭建的博客,而不是去Cnblogs,博客园等地方凑合凑合。 一方面,那些博客站广告和限制一样多,过时的Web设计,天朝特色的气息铺面而来(不好的那种),而自己搭建的Blog,没有广告,控制权在握,而且只要主题选的好,可以...

Apr 27, 20161 min read42