Skip to content

Instantly share code, notes, and snippets.

View sah4ez's full-sized avatar
🐙
Eat, sleep, code, repeat.

Alexandr Kozlenkov sah4ez

🐙
Eat, sleep, code, repeat.
View GitHub Profile
@sah4ez
sah4ez / dec.sh
Last active September 9, 2023 00:14
Simple example of using openssl and X25519 (OpenSSL 1.1.1-pre9-dev)
see comments
@sah4ez
sah4ez / gist:3fea49b76193e9a15958df45980de2f0
Created November 3, 2017 11:15 — forked from mtigas/gist:952344
Mini tutorial for configuring client-side SSL certificates.

Client-side SSL

For excessively paranoid client authentication.

Using self-signed certificate.

Create a Certificate Authority root (which represents this server)

Organization & Common Name: Some human identifier for this server CA.

openssl genrsa -des3 -out ca.key 4096
openssl req -new -x509 -days 365 -key ca.key -out ca.crt
@sah4ez
sah4ez / agent.py
Created January 4, 2017 14:30
Manual algorithm
Calculate next action
def act(self, observation):
y = 0
for line in observation:
x = 0
for pixel in line:
color = RGB(pixel[0], pixel[1], pixel[2])