Skip to content

Instantly share code, notes, and snippets.

View funlw65's full-sized avatar
💤
... learning freeGLUT and xcb ... zzz!

Vasile Guta-Ciucur funlw65

💤
... learning freeGLUT and xcb ... zzz!
View GitHub Profile
@ganbatte8
ganbatte8 / xcb_demo.c
Last active June 10, 2023 16:31
Simple game loop in Linux/XCB, writing pixels with CPU, enforcing a framerate, reading joystick, keyboard and mouse input.
// Linking: -lxcb -lxcb-image
//#include <xcb/xcb.h>
#include <xcb/xcb_image.h>
#include <malloc.h>
#include <unistd.h>
#include <fcntl.h>
#include <linux/joystick.h>
//#include <time.h>
#include <sys/stat.h>
@marcan
marcan / canon-ef-protocol-notes.md
Last active April 10, 2024 14:18
Canon EF protocol notes

Testing done using a Canon EOS 600D and a Canon EF-S18-55mm f/3.5-5.6 IS II.

Pinout

  1. VBAT
  2. DET (common with P-GND on lens side)
  3. P-GND
  4. VDD
  5. DCL
  6. DLC
@gustavolsson
gustavolsson / isometricscrewthread.js
Last active March 17, 2021 18:45
This code generates an ISO metric screw thread given a set of parameters. The code is intended for Tinkercad Shape Scripts but it should be straightforward to port it to other platforms.
/*
Copyright (c) 2012 Gustav Olsson
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR