Skip to content

Instantly share code, notes, and snippets.

View modrobert's full-sized avatar

modrobert

  • EurAsia Technology CO., LTD.
  • Bangkok
View GitHub Profile
@modrobert
modrobert / open_ai.c
Created June 21, 2024 08:30
C program calling OpenAI API
// by modrobert in 2024
#define _GNU_SOURCE
#include <curl/curl.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char *argv[])
{
@modrobert
modrobert / sha256.js
Created February 28, 2024 05:48
nodejs sha256 implementation
#!/usr/bin/env node
// sha256.js by modrobert in 2024
"use strict";
const fs = require("fs");
const crypto = require("crypto");
if (process.argv.length === 2 || process.argv[2] === "-h") {