Skip to content

Instantly share code, notes, and snippets.

View hguitar's full-sized avatar
🎯
Focusing

Mason hguitar

🎯
Focusing
View GitHub Profile
@hguitar
hguitar / index.html
Created October 21, 2022 02:56
Traveling through Space
<canvas id="canvas"></canvas>
@hguitar
hguitar / send_socket_binary_data.py
Last active October 12, 2021 03:40
Sending random length binary data through socket using python struct pack and unpack
import random
import socket
import struct
import sys
from multiprocessing import Process
HOST = "127.0.0.1"
PORT = 7899
def random_character() -> str:
@hguitar
hguitar / async_timer.py
Last active March 24, 2021 08:33
Time your async function to evaluate its performance
import asyncio
import time
async def timer(func):
async def wrapper():
print(f"Task started at {time.strftime('%X')}")
await func()
print(f"Task finished at {time.strftime('%X')}")
return await wrapper()

Set the base image to Ubuntu must be first instruction - use docker search to find images

FROM ubuntu # <image>
FROM ubuntu:latest # - <image>:<tag>
FROM ubuntu:precise (LTS)

Set the maintainer info