Skip to content

Instantly share code, notes, and snippets.

View DavidLudwig's full-sized avatar

David Ludwig DavidLudwig

View GitHub Profile
@stiano
stiano / Roslyn-CodeGeneration-WithDebugging-Tests.cs
Created August 21, 2018 19:29
Debugging Roslyn Generated Code
public class CodeGenTests
{
[NUnit.Framework.Test]
public void ShouldDebugSources()
{
var code =
@"namespace Debuggable
{
public class HelloWorld
{
@WangYihang
WangYihang / port-forwarding.py
Last active December 19, 2024 02:20
port forwarding via python socket
#!/usr/bin/env python3
# Tcp Port Forwarding (Reverse Proxy)
# Author : WangYihang <[email protected]>
'''
+-----------------------------+ +---------------------------------------------+ +--------------------------------+
| My Laptop (Alice) | | Intermediary Server (Bob) | | Internal Server (Carol) |
+-----------------------------+ +----------------------+----------------------+ +--------------------------------+
| $ ssh -p 1022 [email protected] |<------->| IF 1: 1.2.3.4 | IF 2: 192.168.1.1 |<------->| IF 1: 192.168.1.2 |
| [email protected]'s password: | +----------------------+----------------------+ +--------------------------------+