Skip to content

Instantly share code, notes, and snippets.

View Codehunter-py's full-sized avatar
🏠
Working from home

Ibrahim Musayev Codehunter-py

🏠
Working from home
View GitHub Profile
@bradtraversy
bradtraversy / docker_wordpress.md
Last active June 3, 2024 07:17
Docker Compose FIle For Wordpress, MySQL & phpmyadmin

Wordpress & Docker

This file will setup Wordpress, MySQL & PHPMyAdmin with a single command. Add the code below to a file called "docker-compose.yaml" and run the command

$ docker-compose up -d

# To Tear Down
$ docker-compose down --volumes
@IamAdiSri
IamAdiSri / Windows SSH Setup.md
Created January 3, 2019 09:50
Setup Windows to accept SSH connections and Tunneling

Windows SSH Setup

The steps to enable both SSH and tunneling/port forwarding are as follows:

  1. Open Settings > Update and Security > For Developers.
  2. Click on the radio button for Developer mode; this will open up your system's port 22 and allow the SSH broker to start listening for incoming connections.
  3. If you just switched to Developer mode, restart your computer, and then follow step 1 again.
  4. Under Device discovery turn on the option labeled Make your device visible to USB connections and your local network.
  5. Under Device discovery turn on the option labeled User OpenSSH (Beta) server for remote deployment.
@hughker
hughker / secure-ssh.yml
Created May 1, 2017 17:47 — forked from cmavr8/secure-ssh.yml
Secure SSH configuration ansible playbook
---
# SSH server settings, in line with https://stribika.github.io/2015/01/04/secure-secure-shell.html
# Before using, change myhosts to your hosts' nickname and myuser to your username (two instances! make sure you replace both or you'll be locked out of ssh!)
- hosts: myhosts
become: true
remote_user: myuser
tasks:
# Key exchange, ciphers and MACs
- lineinfile: dest=/etc/ssh/sshd_config regexp='^KexAlgorithms' line='KexAlgorithms curve25519-sha256@libssh.org,diffie-hellman-group-exchange-sha256'
@halberom
halberom / opt1_template.j2
Last active April 12, 2024 11:33
ansible - example of template if else
{# style 1 - long form #}
{% if filepath == '/var/opt/tomcat_1' %}
{% set tomcat_value = tomcat_1_value %}
{% else %}
{% set tomcat_value = tomcat_2_value %}
{% endif %}
{# style 2 - short form #}
{% set tomcat_value = tomcat_1_value if (filepath == '/var/opt/tomcat_1') else tomcat_2_value %}