Skip to content

Instantly share code, notes, and snippets.

Overview

  1. Sticky sessions are provided in two ways, cookies and stick-tables
  2. Routes that run with an http mode backend (unsecure, edge, and reencrypt) utilize cookies
  3. Routes that run with a tcp mode backend utilize stick-tables
  4. Sticky sessions are implementation specific to a router. We have implemented them in the HAProxy template router.

Testing Cookie Based Sticky Sessions

Oh my zsh.

Oh My Zsh

Install ZSH.

sudo apt install zsh-autosuggestions zsh-syntax-highlighting zsh

Install Oh my ZSH.

#!/usr/bin/env bash
function show_usage()
{
echo
echo "USAGE"
echo "-----"
echo
echo " SERVER_URL=https://my.mediasoup-demo.org:4443 ROOM_ID=test MEDIA_FILE=./test.mp4 ./gstreamer.sh"
echo
@fingul
fingul / grub-use-saved.sh
Created February 15, 2024 22:23 — forked from mmdemirbas/grub-use-saved.sh
Configures grub to set last used entry as default automatically in each boot
# @author: [email protected]
filename=/etc/default/grub
# Replace GRUB_DEFAULT value to 'saved'
echo :: Setting GRUB_DEFAULT=saved
sudo sed -i 's/GRUB_DEFAULT=.*/GRUB_DEFAULT=saved/g' $filename
# Append GRUB_SAVEDEFAULT=true after deleting old GRUB_SAVEDEFAULT's
echo :: Setting GRUB_SAVEDEFAULT=true
@fingul
fingul / docker
Last active January 26, 2022 18:37 — forked from yjcrocks/docker
다음 카카오 미러 사용하기 | Using daum kakao mirror for Ubuntu / Docker / PyPI
RUN sed -i 's/archive.ubuntu.com/mirror.kakao.com/g' /etc/apt/sources.list \
&& apt-get update && apt-get install -y \
...packages-you-want-to-install... \
&& rm -rf /var/lib/apt/lists/*
@fingul
fingul / install-nginx-rtmp-module.sh
Last active January 13, 2020 22:18 — forked from afriza/install-nginx-rtmp-module.sh
Install NGINX RTMP module with HLS support on Ubuntu 18.04
sudo apt install curl gnupg2 ca-certificates lsb-release
echo "deb http://nginx.org/packages/ubuntu `lsb_release -cs` nginx" | sudo tee /etc/apt/sources.list.d/nginx.list
curl -fsSL https://nginx.org/keys/nginx_signing.key | sudo apt-key add -
sudo apt update
NGINX_VERSION=$(apt show nginx | grep "^Version" | cut -d " " -f 2 | cut -d "-" -f 1)
# take note of the nginx version in the "stable" release. e.g. 1.14.2
echo NGINX version $NGINX_VERSION
wget https://hg.nginx.org/pkg-oss/raw-file/default/build_module.sh
chmod a+x build_module.sh
@fingul
fingul / Windows10-Setup.ps1
Created August 27, 2018 15:17 — forked from NickCraver/Windows10-Setup.ps1
(In Progress) PowerShell Script I use to customize my machines in the same way for privacy, search, UI, etc.
##################
# Privacy Settings
##################
# Privacy: Let apps use my advertising ID: Disable
Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo -Name Enabled -Type DWord -Value 0
# To Restore:
#Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo -Name Enabled -Type DWord -Value 1
# Privacy: SmartScreen Filter for Store Apps: Disable
Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AppHost -Name EnableWebContentEvaluation -Type DWord -Value 0
@fingul
fingul / mongo_redhat_cent_7_install.sh
Last active March 1, 2018 21:06 — forked from kennwhite/mongo_redhat_cent_7_install.sh
Install latest MongoDB on RedHat/CentOS 7
#!/bin/bash
# Simple install script for stock RedHat/CentOS 7.x
# Allows yum update to pull security & other fixes automatically from MongoDB.com's repos
# (versus ancient packages in Red Hat/Cent repos)
# To completely purge all remnants of Mongo (repo conf, rpms, yum cache, DB files, kernel tweaks:
# sudo service mongod stop ; sudo rm -rf /etc/yum.repos.d/mongo* ; sudo rm -rf /var/lib/mongo/* ; sudo sed -i.`date +%Y-%m-%d_%H-%M-%S`.bak '/^#.*$/!d' /etc/rc.d/rc.local ; sudo rm -rf /var/cach/yum ; sudo yum -y clean all ; sudo yum -y remove mongodb*
# Sanity check - are we on a RH family distro?
[ -f "/etc/redhat-release" ] || { echo -e "This script requires RedHat or CentOS. Quitting. \n"; exit 1 ;}
@fingul
fingul / dash-avc264 command lines
Created May 31, 2017 15:41 — forked from ddennedy/dash-avc264 command lines
Use ffmpeg and mp4box to prepare DASH-AVC/264 v1.0 VoD
See my DASH-IF presentation from October, 2014:
https://s3.amazonaws.com/misc.meltymedia/dash-if-reveal/index.html#/
1. encode multiple bitrates with keyframe alignment:
ffmpeg -i ~/Movies/5D2_Portrait.MOV -s 1280x720 -c:v libx264 -b:v 1450k -bf 2 \
-g 90 -sc_threshold 0 -c:a aac -strict experimental -b:a 96k -ar 32000 out.mp4
My input was 30 fps = 3000 ms. If it were 29.97, then a GOP size of 90 frames will yield a base segment
size of 3003 milliseconds. You can make the segment size some multiple of this, e.g.: 6006, 9009, 12012.