Skip to content

Instantly share code, notes, and snippets.

View lowkeyboard's full-sized avatar
🧟‍♀️

cagla cpr lowkeyboard

🧟‍♀️
View GitHub Profile
@eaorak
eaorak / tictactoe.py
Created October 27, 2012 21:18
Python - TicTacToe Game
#!/usr/bin/python3
# Simple TicTacToe game in Python - EAO
import random
import sys
board=[i for i in range(0,9)]
player, computer = '',''
# Corners, Center and Others, respectively
moves=((1,7,3,9),(5,),(2,4,6,8))
@shreyakupadhyay
shreyakupadhyay / connect_mininet_hosts_Internet.txt
Last active May 29, 2024 17:54
Connecting mininet host with Internet.
<-- Commands below connects the mininet hosts to internet and also with other mininet hosts.-->
$ sudo mn --topo=single,2 (topology of consisting 1 switch and 2 hosts)
$ sudo ifconfig s1 up
$ sudo ovs-vsctl add-port s1 enp0s3(or your NAT interface of virtual machine)
$ ifconfig enp0s3 0
$ dhclient s1 (To get the IP address for s1. Till here VM will get the internet connectivity through OVS.)
mininet> xterm h1
h1> ifconfig h1-eth0 0