Skip to content

Instantly share code, notes, and snippets.

@LeCoupa
LeCoupa / cli.docker.sh
Last active November 21, 2023 07:33
Docker Cheatsheet + Tips & Tricks --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
docker build -t friendlyname . # Create image using this directory's Dockerfile
docker run -p 4000:80 friendlyname # Run "friendlyname" mapping port 4000 to 80
docker run -d -p 4000:80 friendlyname # Same thing, but in detached mode
docker exec -it [container-id] bash # Enter a running container
docker ps # See a list of all running containers
docker stop <hash> # Gracefully stop the specified container
docker ps -a # See a list of all containers, even the ones not running
docker kill <hash> # Force shutdown of the specified container
docker rm <hash> # Remove the specified container from this machine
docker rm $(docker ps -a -q) # Remove all containers from this machine
@jamiejackson
jamiejackson / mailcatcher.service
Created January 6, 2016 19:34
MailCatcher Systemd Service / Daemon
[Unit]
Description=MailCatcher Service
After=network.service vagrant.mount
[Service]
Type=simple
ExecStart=/usr/local/bin/mailcatcher --foreground --ip 10.0.2.15
[Install]
WantedBy=multi-user.target
mplayer rtmp://stream.smcloud.net/live2/vox/vox_360p #vox
mplayer http://usa.fankytv.com/live/espn.stream/playlist.m3u8 #espn
mplayer http://195.244.40.230:8001/1:0:1:274C:7FC:2:11A0000:0:0:0: #sky sports 5
mplayer http://202.75.23.37:1400/live/ch21/03.m3u8 ##Eurosport_HD_Eng
mplayer rtsp://a627.l2479952251.c24799.g.lm.akamaistream.net/D/627/24799/v0001/reflector:52251 #Bloomberg
@mundry
mundry / file_fingerprint.py
Last active January 23, 2019 21:37
Generate a file's fingerprint from its content.
#!/usr/bin/env python2.7
from os import rename
from hashlib import sha1
INPUT_PATH = 'data'
INPUT_FILES = ['all.min.css', 'all.css']
OUTPUT_PATH = 'output'