This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// g++ -O2 -s -o pview main.cc -lfltk -lfltk_images -lmpv | |
#include <stdio.h> | |
#include <FL/Enumerations.H> | |
#include <FL/Fl.H> | |
#include <FL/Fl_Double_Window.H> | |
#include <FL/Fl_PNG_Image.H> | |
#include <FL/x.H> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdint.h> | |
#include <stdio.h> | |
#include <fcntl.h> | |
#include <sys/stat.h> | |
#include <unistd.h> | |
int main(int argc, char **argv) { | |
if (argc != 2) { | |
printf("Usage: binc [input]\n"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
// SAMPLE | |
int main(void) { | |
SocketInit(); | |
struct sockaddr_in addr; | |
SocketResolve(&addr, "localhost", 5432); | |
Socket sock = SocketUDP(false); | |
// connected udp can use send/recv instead of sendto/recvfrom | |
connect(sock, (const struct sockaddr *) &addr, sizeof(addr)); | |
const char *data = "hello world"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// g++ -s -O2 -o co2monitor main.cc -lfltk -lhidapi | |
#include <FL/Fl.H> | |
#include <FL/Fl_Box.H> | |
#include <FL/Fl_Double_Window.H> | |
#include <FL/Fl_Tile.H> | |
#include <hidapi/hidapi.h> | |
#include <stdbool.h> | |
#include <stdint.h> | |
#include <stdio.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// gcc -o imgslide.exe imgslide.c -lraylib -Lraylib -lgdi32 -lwinmm -lgif -Lgiflib | |
#include <stdint.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include "giflib/gif_lib.h" | |
#include "raylib/raylib.h" | |
static size_t nextPowerOfTwo(size_t v) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module gojwtkeycloak | |
go 1.20 | |
require ( | |
github.com/coreos/go-oidc/v3 v3.6.0 | |
github.com/gofiber/fiber/v2 v2.48.0 | |
github.com/golang-jwt/jwt/v4 v4.5.0 | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
typedef struct { | |
unsigned char *mem; | |
size_t bytes; | |
} BS; | |
static void BSInit(BS *bs, size_t bits) { | |
size_t bytes = bits / 8; | |
if (bits % 8) | |
bytes++; | |
bs->bytes = bytes; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"bytes" | |
"encoding/binary" | |
"fmt" | |
"os" | |
) | |
func main() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"bufio" | |
"fmt" | |
"image" | |
"image/draw" | |
"image/gif" | |
"image/png" | |
"io" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"sort" | |
"fmt" | |
"constraints" | |
) | |
type Vec2[T constraints.Ordered] struct { | |
X, Y T |
NewerOlder