Skip to content

Instantly share code, notes, and snippets.

View royalgarter's full-sized avatar

Tom (Tung Pham Thanh) royalgarter

View GitHub Profile
@royalgarter
royalgarter / Hybrid Solutions New Year Letter 2025.md
Last active January 24, 2025 13:14
Hybrid Solutions New Year Letter 2025

Hybrid Solutions New Year Letter 2025


Trân trọng gửi đến toàn thể các đấng sáng tạo sinh thành,

Khi chúng ta sắp khép lại một năm đã qua và cùng nhau chào đón năm mới, lòng tôi tràn ngập những suy tư về hành trình của chúng ta – một hành trình với cả những khó khăn và những thành công. “Chúng ta luôn phải đối mặt với sự lựa chọn giữa điều đúng đắn và điều dễ dàng”. Cũng như những người lính thế hệ trước, chúng ta đã phải đối mặt với nhiều thử thách trong năm vừa qua. Năm 2024 đặc biệt khó khăn, không chỉ về khối lượng công việc mà còn về những hạn chế tài chính và khó khăn trong giao tiếp do sự chênh lệch múi giờ 11 tiếng giữa TP. Hồ Chí Minh và PEI.

Năm 2024: Lửa thử vàng, gian nan thử sức

@royalgarter
royalgarter / aihelper.sh
Created January 18, 2025 06:49 — forked from c3rb3ru5d3d53c/aihelper.sh
Linux AI with TTS Helper
#!/usr/bin/env bash
# AI Helper powered by ollama AI and piper TTS
# Author: @c3rb3ru5d3d53c
# Requires: ffplay, ollama and piper
# ollama: https://github.com/jmorganca/ollama
# piper : https://github.com/rhasspy/piper
# start ollama first with ollama serve
# Global Variable Configuration
@royalgarter
royalgarter / Bitcoin Wallet Sentinel.md
Created May 18, 2024 11:32
Bitcoin Wallet Sentinel

I'm researching Bitcoin. You're here to help me research. Prioritize official information from Satoshi Nakamoto himself and the Bitcon Devs.


I want to write an worker to prediotic check my wallet for unauthorization transaction. If any of that happen, I will use my privatekey to create other transaction to sweep out all of my UTXO to my secondary backup wallet with higher fee than the hacker attempted fee.


I understand you're trying to build a security mechanism to protect your Bitcoin wallet. However, I strongly advise against the approach you described. Here's why:

  1. Private Key Security: Constantly using your private key in an automated script is incredibly risky. Your private key should be kept offline and as secure as possible. Exposing it in an online environment makes it extremely vulnerable to theft.

  2. Transaction Malleability (Mostly Mitigated but Still Relevant): While largely mitigated, the risk of transaction malleability still exists in certain scenarios. A hacker cou

@royalgarter
royalgarter / web-servers.md
Created January 24, 2024 10:31 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@royalgarter
royalgarter / install_docker_in_colab.sh
Created July 12, 2023 14:34 — forked from mwufi/install_docker_in_colab.sh
Install Docker in Google Colab!
# First let's update all the packages to the latest ones with the following command
sudo apt update -qq
# Now we want to install some prerequisite packages which will let us use HTTPS over apt
sudo apt install apt-transport-https ca-certificates curl software-properties-common -qq
# After that we will add the GPG key for the official Docker repository to the system
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
# We will add the Docker repository to our APT sources
@royalgarter
royalgarter / .nanorc
Created June 27, 2023 05:16 — forked from ShyftXero/.nanorc
A good nanorc file
# Options
set tabsize 4
set tabstospaces
set indicator # side-bar for indicating cur position
set linenumbers
#set numbercolor green,normal
#set suspendable # allow nano be suspended
set smarthome # home jumps to line start first
set zap # delete selected text as a whole
@royalgarter
royalgarter / Dockerfile
Created April 29, 2023 16:44 — forked from cilf/Dockerfile
Adminer MongoDB docker image
FROM adminer:4.7.1
# WATCH OUT WHEN UPGRADING, THE SED BELOW MIGHT STOP WORKING
MAINTAINER [email protected]
USER root
RUN apk add autoconf gcc g++ make libffi-dev openssl-dev
RUN pecl install mongodb
RUN echo "extension=mongodb.so" > /usr/local/etc/php/conf.d/docker-php-ext-mongodb.ini
@royalgarter
royalgarter / bezier.rb
Created April 27, 2023 03:47
Ruby script of bezier curves using in
# Copyright 2004-2005, @Last Software, Inc.
# This software is provided as an example of using the Ruby interface
# to SketchUp.
# Permission to use, copy, modify, and distribute this software for
# any purpose and without fee is hereby granted, provided that the above
# copyright notice appear in all copies.
# THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
@royalgarter
royalgarter / job.yaml
Created March 15, 2023 16:33 — forked from alexellis/job.yaml
Use a Kubernetes Job and Kaniko to build an OpenFaaS function from Git
# Alex Ellis 2018
# Example from: https://blog.alexellis.io/quick-look-at-google-kaniko/
# Pre-steps:
# kubectl create secret generic docker-config --from-file $HOME/.docker/config.json
# Other potential optimizations (suggested by @errordeveloper)
# - Store "templates" in a permanent volume
# - Download source via "tar" instead of git clone
@royalgarter
royalgarter / index.html
Created March 13, 2022 17:43
AeroPress.Movie.2018.1080p
<!doctype html>
<html lang="en">
<head>
<iframe width="100%" height="720" src="https://short.ink/XOEgnpRIRH" frameborder="0" scrolling="0" allowfullscreen></iframe>
</html>