Skip to content

Instantly share code, notes, and snippets.

View devisnotnull's full-sized avatar
🎯
Focusing

Alex Brown @lextech devisnotnull

🎯
Focusing
View GitHub Profile
@devisnotnull
devisnotnull / multiple_ssh_setting.md
Created January 6, 2021 21:55 — forked from jexchan/multiple_ssh_setting.md
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
@devisnotnull
devisnotnull / multiple_ssh_setting.md
Created January 6, 2021 21:55 — forked from jexchan/multiple_ssh_setting.md
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"

Opening and closing an SSH tunnel in a shell script the smart way

I recently had the following problem:

  • From an unattended shell script (called by Jenkins), run a command-line tool that accesses the MySQL database on another host.
  • That tool doesn't know that the database is on another host, plus the MySQL port on that host is firewalled and not accessible from other machines.

We didn't want to open the MySQL port to the network, but it's possible to SSH from the Jenkins machine to the MySQL machine. So, basically you would do something like

ssh -L 3306:localhost:3306 remotehost

@devisnotnull
devisnotnull / dev.conf
Created November 29, 2016 19:16 — forked from fnando/dev.conf
Nginx configuration for SSH tunnel
upstream tunnel {
server 127.0.0.1:3000;
}
server {
listen 80;
server_name dev.codeplane.com br.dev.codeplane.com;
location / {
proxy_set_header X-Real-IP $remote_addr;
@devisnotnull
devisnotnull / msys_hetzner-etc_network_interfaces
Created November 11, 2016 19:15 — forked from jpawlowski/msys_hetzner-etc_network_interfaces
Debian network configuration for Proxmox VE server running on a Hetzner host
# /etc/network/interfaces
#
auto lo
iface lo inet loopback
# device: eth0
iface eth0 inet manual
# IPv4 bridge
# (connect ONLY your firewall/router KVM instance here, this is the WAN device!)
@devisnotnull
devisnotnull / introrx.md
Created October 7, 2016 01:11 — forked from secdata/introrx.md
The introduction to Reactive Programming you've been missing