Skip to content

Instantly share code, notes, and snippets.

View minhphong306's full-sized avatar
😄
Don't watch the clock. Do what it does! Keep going!

Phong Do minhphong306

😄
Don't watch the clock. Do what it does! Keep going!
View GitHub Profile
@minhphong306
minhphong306 / install_postaman.sh
Created March 19, 2024 07:13 — forked from lucasalvessouza/install_postaman.sh
Install postman fedora
#!/bin/bash
wget https://dl.pstmn.io/download/latest/linux64 -O postman-linux-x64.tar.gz
sudo tar xvzf postman-linux-x64.tar.gz -C /opt
sudo ln -s /opt/Postman/Postman /usr/bin/postman
cat << EOF > ~/.local/share/applications/postman2.desktop
[Desktop Entry]
Name=Postman
GenericName=API Client
@minhphong306
minhphong306 / redis_cheatsheet_vietnamese.bash
Last active February 13, 2021 03:29 — forked from LeCoupa/redis_cheatsheet.bash
Redis Cheatsheet phiên bản tiếng Việt
# Redis Cheatsheet
# Bản này mình fork về và dịch sang tiếng Việt cho dễ đọc
redis-server /path/redis.conf # khởi động redis-server từ file config
redis-cli # Mở redis-cli
# Strings.
@minhphong306
minhphong306 / util.php
Created July 24, 2018 09:09 — forked from aeurielesn/util.php
Decode Unicode strings in PHP
<?php
#source: http://stackoverflow.com/questions/2934563/how-to-decode-unicode-escape-sequences-like-u00ed-to-proper-utf-8-encoded-char
function replace_unicode_escape_sequence($match) {
return mb_convert_encoding(pack('H*', $match[1]), 'UTF-8', 'UCS-2BE');
}
function unicode_decode($str) {
return preg_replace_callback('/\\\\u([0-9a-f]{4})/i', 'replace_unicode_escape_sequence', $str);
}