Skip to content

Instantly share code, notes, and snippets.

View tuphamphuong's full-sized avatar
🎯
Focusing

Tu Pham (Tony) tuphamphuong

🎯
Focusing
View GitHub Profile
@tuphamphuong
tuphamphuong / gist:3bc792eef7ab02ccdd2c470400e2b9dd
Created September 19, 2021 04:28 — forked from rsms/gist:3564654
Life is purposeless. And it is beautiful that it is purposeless

Life is purposeless. And it is beautiful that it is purposeless

It is very difficult, particularly for the Western mind, to understand that life is purposeless. And it is beautiful that it is purposeless. If it is purposeful then the whole thing becomes absurd – then who will decide the purpose? Then some God has to be conceived who decides the purpose, and then human beings become just puppets; then no freedom is possible. And if there is some purpose then life becomes businesslike, it cannot be ecstatic.

The West has been thinking in terms of purpose, but the East has been thinking in terms of purposelessness. The East says life is not a business, it is a play. And a play has no purpose really, it is nonpurposeful. Or you can say play is its own purpose, to play is enough. Life is not reaching towards some goal, life itself is the goal. It is not evolving towards some ultimate; this very moment, here and now, life is ultimate.

Life as it is, is accepted in the East. It is not moving towards some end, b

@tuphamphuong
tuphamphuong / RUNBOOK.md
Created October 7, 2019 03:34 — forked from voxxit/RUNBOOK.md
Example of a solid run book/operations manual

Run Book / Operations Manual

  1. Table of Contents
  2. System Overview
    • Service Overview
    • Contributing Applications, Daemons, and Windows Services
    • Hours of Operation
    • Execution Design
    • Infrastructure and Network Design
    • Resilience, Fault Tolerance and High-Availability
@tuphamphuong
tuphamphuong / README-Template.md
Created July 18, 2018 03:50 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@tuphamphuong
tuphamphuong / clean_code.md
Created July 13, 2018 07:41 — forked from wojteklu/clean_code.md
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

╔════════════════╦═════╦═════╦══════╦═════╗
║ DDBS ║ P+A ║ P+C ║ E+L ║ E+C ║
╠════════════════╬═════╬═════╬══════╬═════╣
║ DynamoDB ║ Yes ║ ║ Yes ║ ║
║ Cassandra ║ Yes ║ ║ Yes ║ ║
║ Riak ║ Yes ║ ║ Yes ║ ║
║ VoltDB/H-Store ║ Yes ║ ║ Yes ║ ║
║ Elasticsearch ║ Yes ║ ║ Yes ║ ║
║ Bigtable/HBase ║ ║ Yes ║ ║ Yes ║
║ MongoDB ║ ║ Yes ║ ║ Yes ║
@tuphamphuong
tuphamphuong / gist:46ef8b77ed13bbacf7797b38ad149650
Created June 15, 2018 12:36 — forked from digitaljhelms/gist:4287848
Git/GitHub branching standards & conventions

Branching

Quick Legend

Description, Instructions, Notes
Instance Branch
@tuphamphuong
tuphamphuong / change_encode.py
Created December 16, 2016 07:45
Python 2.x change default encoding to utf-8
import sys
reload(sys)
sys.setdefaultencoding("utf-8")
@tuphamphuong
tuphamphuong / CurrentWorkingDir.java
Created November 21, 2016 07:54
Get current working dir in Java 7+ one line
import java.nio.file.Paths;
Paths.get(".").toAbsolutePath().normalize().toString();
@tuphamphuong
tuphamphuong / facebook-login.sh
Created November 3, 2016 09:11
Login to Facebook via curl
#!/bin/sh
# Authenticate an facebook application directly from shell.
# Make sure to modify the EMAIL and PASS below and just run it as:
# sh facebook-login.sh "<your facebook url>"
#
# It's possible to script and run the script in a while loop (In my case this is necessary hence
# the facebook-sdk api for php causes random crashes and my script needs to run for a loooong time.
#
# for a in a b c d e f g i j k l m n o p; do while (true); do START=`date +%s`; sh facebook-login.sh "<your app url>"; expr `date +%s` \< \( $START + 20 \) > /dev/null && break; done; sleep 30; done
@tuphamphuong
tuphamphuong / Fix bug ssh etc agent stop
Created October 22, 2016 07:50
Fix bug ssh agent stop
$ git fetch
Connection to bitbucket.org closed by remote host.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
$ ssh-add -l
The agent has no identities.
$ ssh-add ~/.ssh/id_rsa