Skip to content

Instantly share code, notes, and snippets.

@sjimenez44
sjimenez44 / TimeZone.md
Created September 8, 2021 19:19
Change time zone Docker container

Change TimeZone in Docker containers

With Docker Engine

The timezone of a container can be set using an environment variable in the docker container when it is created. For example:

$ docker run ubuntu:latest date
Sat Feb 27 15:58:32 UTC 2021
$ docker run -e TZ=America/Bogota ubuntu:latest date
Sat Feb 27 15:58:40 Asia 2021
@nickcernis
nickcernis / docker-cleanup.md
Last active May 1, 2024 13:25
Docker commands to remove all containers and images

docker kill $(docker ps -q) to kill all running containers
docker rm $(docker ps -a -q) to delete all stopped containers.
docker volume rm $(docker volume ls -q) to delete all volumes.
docker rmi $(docker images -q) to delete all images.

Run all commands:

docker kill $(docker ps -q) && docker rm $(docker ps -a -q) && docker volume rm $(docker volume ls -q) && docker rmi $(docker images -q)

For fish shell, remove the $:

@lovemyliwu
lovemyliwu / wifi_watch_dog.sh
Last active January 28, 2023 07:51
auto reconnect wifi after kick out by router on ubuntu
#!/bin/bash
check_internet_connection() {
return $(ping -c 1 www.baidu.com > /dev/null)
}
SSID=$1
PW=$2
while [ 1 ]; do
check_internet_connection
@justdoit0823
justdoit0823 / netcat_examples.md
Last active April 15, 2023 20:23
A collection of examples about using netcat.

Netcat Examples

Establish TCP Connection

  • Connect to network host over TCP connection
@nickkraakman
nickkraakman / ffmpeg-cheatsheet.md
Last active April 23, 2024 20:53
FFmpeg cheat sheet for 360 video

FFmpeg Cheat Sheet for 360º video

Brought to you by Headjack

 
FFmpeg is one of the most powerful tools for video transcoding and manipulation, but it's fairly complex and confusing to use. That's why I decided to create this cheat sheet which shows some of the most often used commands.

 
Let's start with some basics:

  • ffmpeg calls the FFmpeg application in the command line window, could also be the full path to the FFmpeg binary or .exe file
@beeman
beeman / remove-all-from-docker.sh
Created November 15, 2016 03:04
Remove all from Docker
# Stop all containers
docker stop `docker ps -qa`
# Remove all containers
docker rm `docker ps -qa`
# Remove all images
docker rmi -f `docker images -qa `
# Remove all volumes