Skip to content

Instantly share code, notes, and snippets.

@minhanhhere
minhanhhere / clean_code.md
Created June 4, 2023 18:55 — 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

@minhanhhere
minhanhhere / howto.md
Created August 15, 2021 13:00
Two Truth & a Lie game

1. Collect the statements

Ask 10 - 15 colleagues for 3 statements including 2 truth and 1 lie. The lie should be very realistic. Refer to the following links for the idea of the statements:

2. Create the Kahoot-game

After getting all the statements, go to Kahoot and create a game. Each question will show the name of the colleagues and their statements. The correct answer is "the lie". The time can be limited to 30 seconds.

@minhanhhere
minhanhhere / gist:07ae46c4e77608416de0ab83c9a62e0d
Created July 30, 2021 18:26 — forked from insidegui/gist:a18124c0c573a4eb656f5c485ea7dae4
Unofficial documentation for the iCloud Apple device image URL format
https://statici.icloud.com/fmipmobile/deviceImages-9.0/iPhone/iPhone9,4-2-3-0/online-infobox__3x.png
A B C D E F G
A: deviceImages version seems to determine the format of the image specifier (C, D, E, F)
B: device marketing name
C: device model identifier
D: color cover glass (front color)
1 - Black
2 - White
E: device enclosure color (back color)
@minhanhhere
minhanhhere / Instruction.md
Last active November 1, 2024 21:46
Customise Your Terminal Using Zsh & powerlevel10k

What we will setup

1. ZSH

ZSH, also called the Z shell, is an extended version of the Bourne Shell (sh), with plenty of new features, and support for plugins and themes.

2. oh-my-zsh

This is a framework for zsh

3. Powerlevel 10k

Powerlevel10k is a theme for Zsh. It emphasizes speed, flexibility and out-of-the-box experience.

@minhanhhere
minhanhhere / ntfsmount
Created November 6, 2020 01:54 — forked from naingyeminn/ntfsmount
NTFS-3G Mount Script for MacOS
#!/bin/bash
#---- ---- ---- ----
# Copyright (C) Naing Ye Minn <[email protected]>
# This file is free software; as a special exception the author gives
# unlimited permission to copy and/or distribute it, with or without
# modifications, as long as this notice is preserved.
#---- ---- ---- ----
# Install osxfuse and ntfs-3g via brew
# $ brew cask install osxfuse
# $ brew install ntfs-3g
@minhanhhere
minhanhhere / script.sh
Last active August 25, 2018 05:14
Let's Encrypt create SSL Certificate wildcard
# Must use --server acme-v02
# Must install dns-cloudflare plugin
# Use config file cloudflare.ini
certbot certonly --server https://acme-v02.api.letsencrypt.org/directory --dns-cloudflare --dns-cloudflare-credentials /etc/letsencrypt/secret/cloudflare.ini -d chuongkhoidiem.com -d *.chuongkhoidiem.com
#
@minhanhhere
minhanhhere / common.css
Created August 18, 2017 08:22
My CSS Snippets
.text-2-lines {
word-wrap: break-word;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
line-height: 1.5em; //fallback
max-height: 3em; //fallback
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
@minhanhhere
minhanhhere / unity_ios_troubleshoot.md
Last active November 14, 2016 10:33
Unity Admob iOS Settings

#Build Settings:

- ENABLE_BITCODE : NO
- CLANG_ENABLE_MODULES: YES
- OTHER_LDFLAGS: -ObjC $(inherited)
- IPHONEOS_DEPLOYMENT_TARGET: 7.0

#Admob Mediation iOS: Download https://firebase.google.com/docs/admob/ios/download and copy Mediation Adapter to Plugins

@minhanhhere
minhanhhere / event.json
Last active April 2, 2016 10:49
XHunt New Data Structure
/**
Lưu ý:
- PATH CŨNG CÓ ID (CLIENT GEN RA) CỦA RIÊNG NÓ
- format datetime sử dụng theo dạng 24h
- requireChallenge(default = "") là id của challenge cần phải làm xong (nếu ko có thì gán rỗng).
VD:
+ challengeId2 cần điều kiện là challengeId1 phải làm xong thì requqireChallenge = "challengeId1"
+ challenge nào ko cần điều kiện gì hết thì requqireChallenge = ""
- chỗ isActive: default gán là false
**/