Skip to content

Instantly share code, notes, and snippets.

View menincode's full-sized avatar
🏠
Working from home

menincode

🏠
Working from home
View GitHub Profile
@menincode
menincode / init-letsencrypt.sh
Created March 27, 2022 04:25 — forked from nionoku/init-letsencrypt.sh
Nginx with certbot for docker
#!/bin/bash
domains=(domain.com www.domain.com) # REPLACE REQUIRED
email="nionoku@gmail.com" # REPLACE REQUIRED
staging=0 # Set to 1 if you're testing your setup to avoid hitting request limits
# data_path="./data/certbot"
data_path="./certbot"
rsa_key_size=4096
regex="([^www.].+)"
@menincode
menincode / docker-compose.yml
Created August 1, 2021 06:13 — forked from twang2218/docker-compose.yml
HAProxy + Nginx + PHP with client IP attached (don't forget docker daemon option `--userland-proxy=false`)
version: '2'
services:
haproxy:
image: haproxy:alpine
volumes:
- ./haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg
ports:
- "80:80"
depends_on:
- nginx
@menincode
menincode / portainer.md
Created July 7, 2021 15:29 — forked from SeanSobey/portainer.md
Portainer Setup on Windows 10

Portainer on Windows 10

Here I have 2 methods for running portainer on windows, a quick, preferred method only requiring a fairly recent version of docker, or a more complicated method to try if that does not work.

Using host.docker.internal

This setup will let you run Portainer on windows by using the host.docker.internal endpoint (docker.for.win.localhost is depricated since docker version 3.2.1, but older versions may use this instead).

Please note:

package com.rajkrrsingh.zk;
import java.io.IOException;
import java.util.List;
import java.util.concurrent.CountDownLatch;
import org.apache.zookeeper.CreateMode;
import org.apache.zookeeper.KeeperException;
import org.apache.zookeeper.WatchedEvent;
import org.apache.zookeeper.Watcher;
@menincode
menincode / node_nginx_ssl.md
Created February 1, 2020 01:25 — forked from bradtraversy/node_nginx_ssl.md
Node app deploy with nginx & SSL

Node.js Deployment

Steps to deploy a Node.js app to DigitalOcean using PM2, NGINX as a reverse proxy and an SSL from LetsEncrypt

1. Sign up for Digital Ocean

If you use the referal link below, you get $10 free (1 or 2 months) https://m.do.co/c/5424d440c63a

2. Create a droplet and log in via ssh

I will be using the root user, but would suggest creating a new user

@menincode
menincode / ffmpeg-watermark.md
Created November 4, 2019 10:47 — forked from bennylope/ffmpeg-watermark.md
FFmpeg add a watermark to video

How to Add a Watermark to Video

FFMPEG filters provide a powerful way to programmatically enhance or alter videos, and it’s fairly simple to add a watermark to a video using the overlay filter. The easiest way to install ffmpeg is to download a pre-built binary for your specific platform. Then you don’t have to worry about including and installing all the right dependencies and codecs you will be using.

Once you have ffmpeg installed, adding a watermark is as easy as passing your existing source through an overlay filter like so:

ffmpeg -i test.mp4 -i watermark.png -filter_complex "overlay=10:10" test1.mp4

Basically, we’re passing in the original video, and an overlay image as inputs, then passing it through the filter, and saving the output as test1.mp4.

Install on Docker and expose port on Host
$ docker run -d -p 5672:5672--hostname my-rabbit --name some-rabbit -p 15672:15672 rabbitmq:3-management
Install on Windows
https://www.rabbitmq.com/install-windows.html
Installaing with Default Settings and Location
# Check RabbitMQ status
@menincode
menincode / readme.md
Created October 23, 2019 07:23 — forked from mfarazaly/readme.md
Web Development Resources Links

Install RabbitMQ on CentOS 7

sudo yum -y install epel-release
sudo yum -y update

Install Erlang

Download repository