Skip to content

Instantly share code, notes, and snippets.

View mrsinguyen's full-sized avatar
🎯
Focusing

Si Nguyen mrsinguyen

🎯
Focusing
View GitHub Profile
@mrsinguyen
mrsinguyen / DP.md
Created October 31, 2019 11:53
Đức Phật có đi đái ko?

ĐỨC PHẬT ĐI ĐÁI

Thuở nhỏ, câu hỏi đầu tiên của tôi về Phật là liệu khi Đức Phật uống nhiều nước thì ngài có đi đái hay không. Lớn lên, rồi cuộc sống rồi cơm áo rồi ân oán tình thù cứ xoay vần làm cản trở nhiều lần định tiếp cận Phật của tôi. Tôi chỉ muốn tiếp cận để tìm hiểu xem thực sự nếu ngài uống nhiều nước, thì ngài có đi đái hay không.

Mới đầu tiếp cận, thì bạn cũng quá hiểu, Phật là một sự khủng khiếp, quyền năng vô thượng. Đến Tôn Ngộ Không là anh hùng trong mắt bọn chúng tôi, mà Phật lật tay phát úp gọn. Một mảnh bùa gán lên là năm trăm năm người anh hùng chỉ có nằm ăn viên sắt và uống nước rỉ đồng mà sống qua ngày. Rồi thiên hạ triệu triệu người triều bái, cúng hàng trăm vạn lượng hoàng kim để cầu khẩn Ngài. Ngài là thần trên muôn thần, đến Ngọc Hoàng thượng đế bá đạo anh hùng như vậy mà vẫn dưới quyền ngài bảo kê.

Nói chung, tiếp cận ngài chỉ thấy dân gian mô tả quyền năng vô hạn lượng, và lòng từ bi cũng lượng vô hạn. Tôi không cách nào hỏi được thế thực sự ngài có đi đái hay không.

Rồi đến nh

FWIW: I didn't produce the content presented here (the outline from Edmond Lau's book). I've just copy-pasted it from somewhere over the Internet, but I cannot remember what exactly the original source is. I was also not able to find the author's name, so I cannot give him/her the proper credits.


Effective Engineer - Notes

What's an Effective Engineer?

@mrsinguyen
mrsinguyen / UUID.php
Created August 18, 2019 06:31 — forked from dahnielson/UUID.php
Pure PHP UUID generator
<?php
/**
* UUID class
*
* The following class generates VALID RFC 4122 COMPLIANT
* Universally Unique IDentifiers (UUID) version 3, 4 and 5.
*
* UUIDs generated validates using OSSP UUID Tool, and output
* for named-based UUIDs are exactly the same. This is a pure
* PHP implementation.
@mrsinguyen
mrsinguyen / README.md
Last active April 7, 2020 05:50
Elasticsearch in local

Run elasticsearch 5.6 in local with docker

Change your ES data folder /Users/mrsinguyen/go1/incubator/trial/es/data

$ docker-compose up
$ ES_URL='http://elastic:[email protected]:9200' phpunit
@mrsinguyen
mrsinguyen / Fix.md
Last active March 3, 2019 04:30
Fix an error `Linking /usr/local/Cellar/python/3.7.2_2... Error: Permission denied @ dir_s_mkdir - /usr/local/Frameworks`
$ brew link python

Linking /usr/local/Cellar/python/3.7.2_2... Error: Permission denied @ dir_s_mkdir - /usr/local/Frameworks

$ sudo mkdir /usr/local/Frameworks
$ sudo chown $(whoami):admin /usr/local/Frameworks
$ brew link python
@mrsinguyen
mrsinguyen / gpp.md
Created January 2, 2019 08:07
Fix the error failed to sign the data
@mrsinguyen
mrsinguyen / gpg-import-and-export-instructions.md
Created January 2, 2019 03:24 — forked from chrisroos/gpg-import-and-export-instructions.md
Instructions for exporting/importing (backup/restore) GPG keys

Every so often I have to restore my gpg keys and I'm never sure how best to do it. So, I've spent some time playing around with the various ways to export/import (backup/restore) keys.

Method 1

Backup the public and secret keyrings and trust database

cp ~/.gnupg/pubring.gpg /path/to/backups/
cp ~/.gnupg/secring.gpg /path/to/backups/
cp ~/.gnupg/trustdb.gpg /path/to/backups/

or, instead of backing up trustdb...

@mrsinguyen
mrsinguyen / crash.txt
Created December 25, 2018 02:46
Macbook Crash Log
Anonymous UUID: 662B149F-8C52-ED71-0620-4D10BF3E04DE
Tue Dec 25 09:45:22 2018
*** Panic Report ***
panic(cpu 0 caller 0xffffff800f4da1ed): Kernel trap at 0xffffff800f4b9ada, type 14=page fault, registers:
CR0: 0x0000000080010033, CR2: 0x00000eba9af14b80, CR3: 0x000000015bba7146, CR4: 0x00000000003626e0
RAX: 0x0000000000000001, RBX: 0xfffffeb6d5eb9ff0, RCX: 0xfffffef680000000, RDX: 0xfffffeb680000000
RSP: 0xffffff923d923ab0, RBP: 0xffffff923d923bc0, RSI: 0x0000000053af5700, RDI: 0x0000000000000000
R8: 0x0000000053af5700, R9: 0x0000000000000000, R10: 0x0000000000000000, R11: 0x0000000000000000
Green*
tick -> Yellow
Yellow
tick -> Red
Red
tick -> Green