Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View uncelvel's full-sized avatar

Đặng Xuân Cảnh uncelvel

View GitHub Profile
@uncelvel
uncelvel / gist:b6b02956e9d6768954e47f027eb63da1
Created April 21, 2017 06:31 — forked from kewogc/gist:1d679c6c83977d69106f
HOW TO INSTALL KANNEL ON UBUNTU
~# uname -a
~# lsb_release -a
~# locale-gen en_US
~# locale-gen en_US.UTF-8
~# apt-get -y --force-yes remove ntpdate
~# apt-get -y --force-yes install ntp
~# /etc/init.d/ntp restart
~# dpkg-reconfigure tzdata

Modifying an Existing Docker Image

To install a custom package or modify an existing docker image we need to

  1. run a docker a container from the image we wish to modify
  2. modify the docker container
  3. commit the changes to the container as a docker image
  4. test changes made to image

1.) Running a docker container from an image

@uncelvel
uncelvel / redis-sentinel-failover.sh
Created July 12, 2022 03:00 — forked from holly/redis-sentinel-failover.sh
redis-sentinel client-reconfig-script
#!/bin/sh
# The following arguments are passed to the script:
#
# <master-name> <role> <state> <from-ip> <from-port> <to-ip> <to-port>
MASTER_IP=$6
VIP=172.17.0.101
NETMASK=16
IF=eth0
MY_IP=$(ip addr show dev $IF | grep "global $IF" | head -1 | sed -e "s/^.*inet \(.*\)\/$NETMASK .*$/\1/")