Skip to content

Instantly share code, notes, and snippets.

View stevearagonsite's full-sized avatar
😎
I may be slow to respond.

Steve Aragón stevearagonsite

😎
I may be slow to respond.
View GitHub Profile
@riturajborpujari
riturajborpujari / ssh_tunnelling.md
Last active December 14, 2022 16:50
SSH tunnelling

SSH Tunnelling

Connect local port to server port

Introduction

An SSH tunnel creates a connection between a port on your local machine and a address + port on the server, and tunnels the data to the server over SSH on port 22 to the server address + port.

This is done so that it doesn't get blocked by any firewalls or security groups (assuming only SSH connections are allowed to the server). After the data reaches the SSH server it gets forwarded to the address + port you specified when you created the SSH tunnel.

An important detail here is that the destination address + port are accessed from the context of the server, so localhost or 127.0.0.1 refer to the server machine on the destination side of the tunnel, not your local machine.

@nandomoreirame
nandomoreirame / function.php
Last active January 1, 2023 04:47
WordPress REST API send email SMTP in with PHPMailer
<?php
function sendWithPhpMailer($subject, $body, $reply) {
require(ABSPATH . WPINC . '/class-phpmailer.php');
require(ABSPATH . WPINC . '/class-smtp.php');
// date_default_timezone_set( 'America/Sao_Paulo' );
$blogname = wp_strip_all_tags( trim( get_option( 'blogname' ) ) );
$smtpHost = wp_strip_all_tags( trim( get_option( 'smtp_host' ) ) );
@nitred
nitred / ssh_utils.md
Last active March 15, 2024 19:01
SSH Tunneling (port forwarding + reverse port forwarding + SOCK5)

About

SSH tunneling and port forwarding snippets and utils

Table of Contents

  • SOCK5 tunnel everything: Link
  • Local port forwarding: Link
  • Remote port forwarding: Link
@sgaulding
sgaulding / own.dg.theme
Last active October 6, 2023 11:09
SmartGit Dark Theme (SmartGit Version 17.1)
# This file lists the color values of the default dark theme.
# Each line starting with a # is a comment.
# To overwrite certain colors remove the leading # and change the color values.
# The "extends" line defines which color definitions to use if none is found here.
extends=deepgit-dark-theme.properties
# The "preferredEditorTheme" line determines what editor theme should be used by default ('light' or 'dark').
preferredEditorTheme=dark