Skip to content

Instantly share code, notes, and snippets.

View ttofis's full-sized avatar
⛏️
Working on new things

Chris ttofis

⛏️
Working on new things
View GitHub Profile
from socket import *
import ipaddress
#ip = ((([ip for ip in gethostbyname_ex(gethostname())[2] if not ip.startswith("127.")] or [[(s.connect(("8.8.8.8", 53)), s.getsockname()[0], s.close()) for s in [socket(AF_INET, SOCK_DGRAM)]][0][1]]) + ["no IP found"])[0])
#ipad = ipaddress.ip_address(ip)
#print (ipad)
ip = "255.255.255.255"
UDP_PORT = 5005
MESSAGE = b'Hello, World!'
@ttofis
ttofis / syntax-highlighting.css
Last active May 3, 2018 17:24
A css version of jekyll minima's syntax highlighting Sass code
/**
* Syntax highlighting styles
*/
.highlight {
background: #fff;
}
.highlighter-rouge .highlight {
background: #eef;
}
.highlight .c {
ELChris414@ZENACHRIS:/mnt/c/Users/Chris/Desktop/sk/sk$ make clean all
rm main.o game.o generator.cp.o generator.hu.o ai.cp.o ai.hu.o evaluate.o hashtable.o sk
rm: cannot remove ‘sk’: No such file or directory
make: [clean] Error 1 (ignored)
gcc -std=c11 -D_POSIX_C_SOURCE=199309 -fPIC -DNDEBUG -O3 -c -o main.o main.c
main.c: In function ‘main’:
main.c:135:10: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result]
fgets(buf, sizeof(buf), stdin);
^
main.c:155:10: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result]
I am ELChris414#8900 on Discord.
@ttofis
ttofis / keybase.md
Created April 6, 2016 17:35
Keybase

Keybase proof

I hereby claim:

  • I am elchris414 on github.
  • I am elchris414 (https://keybase.io/elchris414) on keybase.
  • I have a public key whose fingerprint is F64A 71CA 6538 789D 3562 CC08 88FC 1F95 B371 6ACC

To claim this, I am signing this object: