#hello world
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
! | |
! | |
interface FastEthernet0/0 | |
ip address 192.168.1.1 255.255.255.0 | |
ip nat inside | |
duplex auto | |
speed auto | |
! | |
interface FastEthernet0/1 | |
ip address 172.35.10.2 255.255.255.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
! | |
! | |
interface FastEthernet0/0 | |
ip address 1.1.1.2 255.255.255.0 | |
duplex auto | |
speed auto | |
! | |
interface FastEthernet0/1 | |
ip address 192.168.20.20 255.255.255.0 | |
duplex auto |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
! | |
interface FastEthernet0/0 | |
ip address 1.1.1.1 255.255.255.0 | |
duplex auto | |
speed auto | |
! | |
interface FastEthernet0/1 | |
ip address 192.168.10.10 255.255.255.0 | |
duplex auto | |
speed auto |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<h1 id="welcome-to-stackedit">Welcome to StackEdit!</h1> | |
<p>Hey! I’m your first Markdown document in <strong>StackEdit</strong><a href="#fn:stackedit" id="fnref:stackedit" title="See footnote" class="footnote">1</a>. Don’t delete me, I’m very helpful! I can be recovered anyway in the <strong>Utils</strong> tab of the <i class="icon-cog"></i> <strong>Settings</strong> dialog.</p> | |
<hr> | |
<h2 id="documents">Documents</h2> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Now that you are able to create various forward or reverse SSH tunnels with lots of options and even simplify your live with ~/.ssh/config you probably also want to know how make a tunnel persistent. By persistent I mean, that it is made sure the tunnel will always run. For example, once your ssh connection times out (By server-side timeout), your tunnel should be re-established automatically. | |
I know there are plenty of scripts out there which try to do that somehow. Some scripts use a while loop, others encourage you to run a remote command (such as tail) to make sure you don’t run into timeout and various others. But actually, you don’t want to re-invent the wheel and stick to bullet-proof already existing solutions. So the game-changer here is AutoSSH. | |
TL;DR | |
autossh -M 0 -o "ServerAliveInterval 30" -o "ServerAliveCountMax 3" -L 5000:localhost:3306 [email protected] | |
or fully configured (via ~/.ssh/config) for background usage | |
autossh -M 0 -f -T -N cli-mysql-tunnel |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner; | |
/* | |
* To change this license header, choose License Headers in Project Properties. | |
* To change this template file, choose Tools | Templates | |
* and open the template in the editor. | |
*/ | |
/** |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner; | |
/* | |
* To change this license header, choose License Headers in Project Properties. | |
* To change this template file, choose Tools | Templates | |
* and open the template in the editor. | |
*/ | |
/** |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import serial | |
import time | |
import msvcrt | |
from msvcrt import getch | |
byte1 = 50 | |
byte2 = 51 | |
print "***********************************" | |
print "********Opening Serial Port********" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
#Requires ffmpeg, audio not working at the moment: silageman | |
import gtk.gdk | |
import time | |
import os | |
print '\033[1;33m ________ _______ _____ \033[1;m' | |
print '\033[1;33m / ____/ | \__ \ / \ \033[1;m' | |
print '\033[1;33m< <_| | | // __ \| Y Y \ \033[1;m' | |
print '\033[1;33m \__ |____/(____ /__|_| / \033[1;m' |