Skip to content

Instantly share code, notes, and snippets.

View aburaihan-dev's full-sized avatar
🏠
Working from home

Md. Abu Raihan Srabon aburaihan-dev

🏠
Working from home
View GitHub Profile
@aburaihan-dev
aburaihan-dev / check_docker_volume_size.sh
Created December 19, 2023 08:53
This Bash script provides a quick overview of the sizes of Docker volumes using the du (disk usage) command. It iterates through all Docker volumes, retrieves their mountpoints, and calculates and prints their sizes in a human-readable format. Useful for monitoring and managing disk usage in Docker environments.
#!/bin/bash
# Get a list of all Docker volume names
volume_names=$(docker volume ls --quiet)
# Iterate through each volume and print its name and size
for volume_name in $volume_names; do
volume_path=$(docker volume inspect --format '{{ .Mountpoint }}' $volume_name)
volume_size=$(du -sh $volume_path | cut -f1)
echo "Volume: $volume_name, Size: $volume_size"
@aburaihan-dev
aburaihan-dev / daemon.json
Last active January 30, 2023 06:51
docker daemon config
{
"features": {
"buildkit": true
},
"live-restore": true,
"log-driver": "json-file",
"log-opts": {
"max-size": "100m",
"max-file": "3"
},
sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
sudo curl -L https://raw.githubusercontent.com/docker/compose/1.29.2/contrib/completion/bash/docker-compose -o /etc/bash_completion.d/docker-compose
@aburaihan-dev
aburaihan-dev / gist:5ebc0c65c71572bdf07738a5e30caee1
Last active June 2, 2022 13:43
View Docker container restart policy
# Topic: Is it possible to show the restart policy of a running Docker container
# Reference:
https://stackoverflow.com/questions/43108227/is-it-possible-to-show-the-restart-policy-of-a-running-docker-container
# Solution:
docker ps|grep -v CON|awk '{print $1}'|while read line; do docker inspect -f "{{ .HostConfig.RestartPolicy.Name }}" $line |xargs echo $line ;done
#EXTM3U
#EXTINF:-1 ,5aab TV
http://158.69.124.9:1935/5aabtv/5aabtv/playlist.m3u8
#EXTINF:-1 ,ABP Ananda
https://abp-i.akamaihd.net/hls/live/765530/abpananda/masterhls_1564.m3u8
#EXTINF:-1 ,ABP Asmita
https://abp-i.akamaihd.net/hls/live/765532/abpasmita/masterhls_1564.m3u8
#EXTINF:-1 ,ABP Asmita
http://abpasmita-lh.akamaihd.net/i/abpasmita_1@77821/master.m3u8
#EXTINF:-1 ,Asianet News
@aburaihan-dev
aburaihan-dev / Bootstrap Daterangepicker Angular install
Last active July 17, 2020 13:26
How to install & use Bootstrap DateRangePicker in Angular 7+ versions
Source Origin: https://github.com/dangrossman/daterangepicker/issues/1800#issuecomment-526058328
Special thanks to: https://github.com/ahmadmu
As of Angular 8: You need to install moment, jquery, daterangepicker, and @types/daterangepicker first, import them into your component and then write something similar to this:
<div>
<input #calender class="form-control col mr-2" id="duration" type="text" formControlName="duration"
placeholder="Select Time Range"/>
</div>
@aburaihan-dev
aburaihan-dev / ContextCmder-Disable.reg
Created January 31, 2020 17:29 — forked from jojobyte/ContextCmder-Disable.reg
Cmder Context (Right-Click) Menu for Windows 7, 8 & 10
Windows Registry Editor Version 5.00
[-HKEY_CLASSES_ROOT\Directory\Background\shell\Cmder]
[-HKEY_CLASSES_ROOT\Directory\shell\Cmder]
@aburaihan-dev
aburaihan-dev / PowerShell Customization.md
Created January 21, 2020 11:06 — forked from jchandra74/PowerShell Customization.md
PowerShell, Cmder / ConEmu, Posh-Git, Oh-My-Posh, Powerline Customization

Pimping Up Your PowerShell & Cmder with Posh-Git, Oh-My-Posh, & Powerline Fonts

Backstory (TLDR)

I work as a full-stack developer at work. We are a Windows & Azure shop, so we are using Windows as our development platform, hence this customization.

For my console needs, I am using Cmder which is based on ConEmu with PowerShell as my shell of choice.

Yes, yes, I know nowadays you can use the Linux subsystem on Windows 10 which allow you to run Ubuntu on Windows. If you are looking for customization of the Ubuntu bash shell, check out this article by Scott Hanselman.

@aburaihan-dev
aburaihan-dev / PowerShell Customization.md
Created January 21, 2020 11:05 — forked from ronokdev/PowerShell Customization.md
PowerShell, Cmder / ConEmu, Posh-Git, Oh-My-Posh, Powerline Customization

Pimping Up Your PowerShell & Cmder with Posh-Git, Oh-My-Posh, & Powerline Fonts

Backstory (TLDR)

I work as a full-stack developer at work. We are a Windows & Azure shop, so we are using Windows as our development platform, hence this customization.

For my console needs, I am using Cmder which is based on ConEmu with PowerShell as my shell of choice.

Yes, yes, I know nowadays you can use the Linux subsystem on Windows 10 which allow you to run Ubuntu on Windows. If you are looking for customization of the Ubuntu bash shell, check out this article by Scott Hanselman.