Skip to content

Instantly share code, notes, and snippets.

@mlabouardy
mlabouardy / setup.sh
Created November 4, 2018 09:45
provision jenkins instance
#!/bin/bash
echo "Install Jenkins stable release"
yum remove -y java
yum install -y java-1.8.0-openjdk
wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat-stable/jenkins.repo
rpm --import https://jenkins-ci.org/redhat/jenkins-ci.org.key
yum install -y jenkins
chkconfig jenkins on
@GAS85
GAS85 / http2_apache2_ubuntu16.04.md
Last active February 7, 2023 16:17
How to Enable HTTP/2 in Apache 2.4 on Ubuntu 16.04

Requirements

  • A self-managed VPS or dedicated server with Ubuntu 16.04 running Apache 2.4.xx.
  • For Ubuntu 18.04 please read here --> https://gist.github.com/GAS85/8dadbcb3c9a7ecbcb6705530c1252831
  • A registered domain name with working HTTPS (TLS/SSL). HTTP/2 only works alongside HTTPS because most browsers, including Firefox and Chrome, don’t support HTTP/2 in cleartext (non-TLS) mode.
@jdesive
jdesive / setup.md
Created January 28, 2018 00:00
Mount NFS share from synology NAS to Ubuntu

Mount Synology NFS share to Ubuntu 16.04

I have all hardware virtualized in ESXi 6.5...
Synology DSM 5.2-5644
Ubuntu 16.04

Start

On your fresh install on Ubuntu 16.04:

  1. Click the Connections icon on the top bar
  2. Goto Edit Connections
@styblope
styblope / docker-api-port.md
Last active May 3, 2024 02:08
Enable TCP port 2375 for external connection to Docker

Enable TCP port 2375 for external connection to Docker

See this issue.
Docker best practise to Control and configure Docker with systemd.

  1. Create daemon.json file in /etc/docker:

     {"hosts": ["tcp://0.0.0.0:2375", "unix:///var/run/docker.sock"]}
    
@mofesolapaul
mofesolapaul / nigeria-states-and-local-govts.json
Last active April 10, 2024 05:11
Json array containing objects of each Nigerian state, and their local governments
[
{
"state": "Abia",
"lgas": [
"Aba North",
"Aba South",
"Arochukwu",
"Bende",
"Ikawuno",
"Ikwuano",
@mofesolapaul
mofesolapaul / nigeria-states.json
Last active April 13, 2024 19:25
List of all Nigerian states, alphabetically arranged in JSON array
[
"Abia",
"Adamawa",
"Akwa Ibom",
"Anambra",
"Bauchi",
"Bayelsa",
"Benue",
"Borno",
"Cross River",
@EHJ-52n
EHJ-52n / install_lets-encrypt_jenkins-jdks.sh
Last active January 22, 2023 18:29
Install Let's Encrypt Cross Signed Root Certificates in all Jenkins JDKs
#!/bin/bash
#
# Description
# This scripts downloads the latest certificates available and installs them
# to all keystores available
#
# Get all installed JDKs
#
PWD=$(pwd)
JDKS_HOME=/var/lib/jenkins/tools/hudson.model.JDK/
@patrocle
patrocle / Nginx + Apache reverse proxy REAL IP.md
Last active April 25, 2024 15:02
Real IP for Apache (Nginx reverse proxy)

NGINX 1.10 + APACHE 2.4 real IP for reverse proxy

Edit nginx conf

default.conf or what you want

vim /etc/nginx/conf.d/default.conf

add proxy_set_header for php files

@guilouro
guilouro / clone_bitbucket_docker.txt
Last active November 9, 2021 16:22
Clone bitbucket private repo in Dockerfile
FROM ubuntu
MAINTAINER Guilherme Louro "guipclouro@gmail.com"
# Update aptitude with new repo
RUN apt-get update
# Install software
RUN apt-get install -y git
# Make ssh dir
@barbietunnie
barbietunnie / udemy-courses-download-using-cookies.md
Last active April 7, 2024 22:24
Downloading Udemy videos with youtube-dl

How to download your Udemy course videos using youtube-dl

$ youtube-dl --list-extractors | grep udemy

Steps

  1. Get link to the course to download. e.g. https://www.udemy.com/course-name/
  2. Login into udemy website, save the cookie from chrome using Chrome (Cookie.txt)[1] export extension. Save it to file udemy-cookies.txt
  3. Get the link of the video that you want to download. usually in format. Use the command provided below where you have to replace the {course_link} and {path_to_cookies_file} with respective paths.
$ youtube-dl {course_link} --cookies {path_to_cookies_file}