Skip to content

Instantly share code, notes, and snippets.

View hugo53's full-sized avatar
🏆
On new thing

Hoang Nguyen hugo53

🏆
On new thing
View GitHub Profile
@hugo53
hugo53 / redis-delete-all-matching-keys
Created January 17, 2019 09:40
Delete all keys in redis matching a regular expression
# Deleting all keys in redis that match a regular expression
# General
redis-cli [options] KEYS "prefix:*" | xargs redis-cli [options] DEL
# If authorization is needed
redis-cli -a <AUTH> KEYS "prefix:*" | xargs redis-cli -a <AUTH> DEL
# If no authorization is needed
redis-cli KEYS "prefix:*" | xargs redis-cli DEL
@hugo53
hugo53 / haproxy-eventmq.cfg
Created March 4, 2019 08:06 — forked from sega-yarkin/haproxy-eventmq.cfg
HAProxy configuration for RabbitMQ (as STOMP over WS)
###
# HAProxy configuration for Eventmq Web-node.
# Configured to serve:
# - 100k websocket connections
# - 2k (2% of WS) streaming connections (5k fullconn)
# - 100 (0.1% of WS) xhr connections (5k fullconn)
###
global
log 127.0.0.1 local2 info
@hugo53
hugo53 / git_remember_password.md
Created February 18, 2020 09:35 — forked from ankurk91/git_remember_password.md
Git credential cache, why type password again and again

Tired of entering password again and again ?

Run this command to remember your password:

git config --global credential.helper 'cache --timeout 28800'

Above command will tell git to cache your password for 8 hours.

@hugo53
hugo53 / install-ffmpeg.sh
Created April 1, 2021 17:14 — forked from sparrc/install-ffmpeg.sh
Installs ffmpeg with libaom and libx265 enabled for av1 and hevc encoding (tested on Ubuntu 16.04)
#!/usr/bin/env bash
# Installs ffmpeg from source (HEAD) with libaom and libx265, as well as a few
# other common libraries
# binary will be at ~/bin/ffmpeg
sudo apt update && sudo apt upgrade -y
mkdir -p ~/ffmpeg_sources ~/bin
export PATH="$HOME/bin:$PATH"