Skip to content

Instantly share code, notes, and snippets.

View nimatrueway's full-sized avatar
🤩

Naeim Taheri nimatrueway

🤩
View GitHub Profile
@Yanrishatum
Yanrishatum / hlc.md
Last active May 5, 2025 12:37
How to compile HL/C

How to compile HL/C

Prepwork/terms

Because I have no trust in people.

  • <hashlink> points to your installation of Hashlink, e.g. folder in which hl.exe (or Unix executable) is, alongside with library binaries (.hdll files), and include folder.
  • <src> points to the folder containing generated HL/C sources. One that contains hlc.json file.
  • <app> refers to your output executable name, including extension.
  • <main> refers to your entry-point file name, including extension (see below).
  • I provide example of doing it on Windows via MSVC cl.exe, but Unix should be more or less same with replacement of argument flags and compiler.
  • I expect that you DO have a compiler installed and can call cl.exe or other compiler from command-line.
#!/bin/bash
# Write given argument into current iterm session. (useful if running commands from another application).
osascript - "$@" <<EOF
on run argv
tell application "iTerm2"
tell current session of current window
repeat with arg in argv
write text arg
end repeat
end tell
from PIL import Image, ImageSequence
def webp2gif(data):
img = Image.open(io.BytesIO(data))
frames = []
for frame in ImageSequence.Iterator(img):
im2 = Image.new("RGB", frame.size, (255, 255, 255))
im2.paste(frame, mask=frame.split()[3])
frames.append(im2.convert('RGB').convert(
@marcogrcr
marcogrcr / AwsSdkV2AndVirtualThreads.java
Last active October 25, 2024 01:01
Java AWS SDK v2 and virtual threads
import com.sun.net.httpserver.HttpServer;
import java.io.IOException;
import java.net.InetSocketAddress;
import java.net.URI;
import java.net.URISyntaxException;
import java.nio.charset.StandardCharsets;
import java.time.Duration;
import java.util.Map;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ExecutionException;