Skip to content

Instantly share code, notes, and snippets.

View mrtonyhuynh's full-sized avatar
😇
Nice & Professional

Tony Huỳnh mrtonyhuynh

😇
Nice & Professional
View GitHub Profile
@ardhptr21
ardhptr21 / README.md
Last active July 16, 2024 14:55
Customize Git Bash Terminal

Customize Git Bash Terminal 🐱‍💻

preview

Usefull Link:

@alexander-danilenko
alexander-danilenko / windows-11-cheatsheet.md
Last active July 18, 2024 08:45
Windows 11 Cheatsheet
@harrytran998
harrytran998 / react-rendering.md
Created March 23, 2021 13:33 — forked from tuhuynh27/react-rendering.md
A (Mostly) Complete Guide to React Rendering Behavior

Translated from https://blog.isquaredsoftware.com/2020/05/blogged-answers-a-mostly-complete-guide-to-react-rendering-behavior/, author: Mark Erikson (from Redux team)

A (Mostly) Complete Guide to React Rendering Behavior

Bài viết cung cấp chi tiết về cách mà React render hoạt động, và việc sử dụng Context và Redux ảnh hưởng thế nào tới quá trình render của React.

"Render" là gì

Rendering is the process of React asking your components to describe what they want their section of the UI to look like, now, based on the current combination of props and state.

@mrbar42
mrbar42 / README.md
Last active July 22, 2024 07:54
Secured HLS setup with Nginx as media server

Secured HLS setup with Nginx as media server

This example is part of this article.

This is an example for an HLS delivery with basic security. Nginx compiled with nginx-rtmp-module & secure-link is used as media server. Features:

  • Domain filtering
  • Referrer filtering
  • Embed buster
@irman
irman / _ec2-lightsail-amazon-linux-nginx-apache-proxy-php-7.md
Last active March 7, 2023 19:00
Setting up Nginx-Apache Reverse Proxy, PHP, & MariaDB with SSL on EC2/Lightsail with Amazon Linux

Setting up Nginx-Apache Reverse Proxy, PHP, & MariaDB with SSL on EC2/Lightsail with Amazon Linux

Final setup should consists of:

  1. NGINX (reverse proxy & static contents)
  2. Apache 2.4 (Dynamic content: PHP)
  3. PHP 7.1
  4. MariaDB 10.1
@anschaef
anschaef / bootstrap-4-sass-mixins-cheat-sheet.scss
Last active April 12, 2024 08:49
Bootstrap 4 Sass Mixins [Cheat sheet with examples]
/* -------------------------------------------------------------------------- */
// All Bootstrap 4 Sass Mixins [Cheat sheet]
// Updated to Bootstrap v4.5.x
// @author https://anschaef.de
// @see https://github.com/twbs/bootstrap/tree/master/scss/mixins
/* -------------------------------------------------------------------------- */
/*
// ########################################################################## */
// New cheat sheet for Bootstrap 5:
@alexandrevicenzi
alexandrevicenzi / tus-auth.go
Created July 28, 2017 12:33
Tus Server with Authentication
package main
import (
"net/http"
"github.com/tus/tusd"
"github.com/tus/tusd/filestore"
)
func UserIsAuthenticated(r *http.Request) {
@veny
veny / gist:6c72c7bf89fd464b28c7512d2c472a5e
Last active February 27, 2021 17:57
PHP, RSA, Encrypt/Decrypt
<?php
// generate private/public key as follows:
// > openssl genrsa -out private.pem 2048
// > openssl rsa -in private.pem -outform PEM -pubout -out public.pem
$data = "String to encrypt";
$privKey = openssl_pkey_get_private('file:///path/to/private.pem');
$encryptedData = "";
@MikeNGarrett
MikeNGarrett / wp-config.php
Last active July 17, 2024 18:02
All those damned wp-config constants you can never remember.
<?php
// PHP memory limit for this site
define( 'WP_MEMORY_LIMIT', '128M' );
define( 'WP_MAX_MEMORY_LIMIT', '256M' ); // Increase admin-side memory limit.
// Database
define( 'WP_ALLOW_REPAIR', true ); // Allow WordPress to automatically repair your database.
define( 'DO_NOT_UPGRADE_GLOBAL_TABLES', true ); // Don't make database upgrades on global tables (like users)
// Explicitely setting url
@abernardobr
abernardobr / Install Graphics Magick on CentOS 7
Last active December 21, 2021 22:43
Install Graphics Magick on CentOS 7
# Get Graphics Magick
> cd /
> mkdir /dowload
> cd /download
> wget ftp://ftp.graphicsmagick.org/pub/GraphicsMagick/GraphicsMagick-LATEST.tar.gz
> tar -xzvf GraphicsMagick-LATEST.tar.gz
> cd GraphicsMagick-1.3.21 (or the lastest graphics magick)
# Install Graphics Magick
## Get libs