Skip to content

Instantly share code, notes, and snippets.

View Gameye98's full-sized avatar
:octocat:
Code for Life

DedSecTL Gameye98

:octocat:
Code for Life
View GitHub Profile
@Gameye98
Gameye98 / bind_socket.py
Created July 5, 2020 03:13 — forked from tuxfight3r/bind_socket.py
python tcp socket client / server examples
#!/usr/bin/python
import socket #for sockets
import sys #for exit
try:
#create an AF_INET, STREAM socket (TCP)
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
except socket.error, msg:
print 'Failed to create socket. Error code: ' + str(msg[0]) + ' , Error message : ' + msg[1]

Vim Cheatsheet

Generally helpful stuff

Open a file for editing             :e path/to/file.txt
Return to Normal mode               ESC   or <CTRL>+C

Navigating around text