Skip to content

Instantly share code, notes, and snippets.

@minhanhhere
minhanhhere / DeviceUuidFactory.java
Created February 21, 2016 18:00
Android Device Id
import android.content.Context;
import android.content.SharedPreferences;
import android.provider.Settings.Secure;
import android.telephony.TelephonyManager;
import java.io.UnsupportedEncodingException;
import java.util.UUID;
public class DeviceUuidFactory {
@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
**/
@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 / 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 / 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 / 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 / Instruction.md
Last active November 3, 2025 06:35
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 / 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 / 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.