Skip to content

Instantly share code, notes, and snippets.

View ohsqueezy's full-sized avatar

Frank DeMarco ohsqueezy

View GitHub Profile
@jazzido
jazzido / index.html
Last active November 8, 2024 00:42
Webcam barcode reading (zbar, emscripten)
<!DOCTYPE html>
<html>
<head>
<title>JS in-browser barcode reader</title>
<style type="text/css">
body > div {
position: relative;
width: 320px; height: 240px;
}
video { position: absolute; top: 0; left: 0; width: 320px; height: 240px; }
from pygame.locals import KEYDOWN, K_ESCAPE, K_q
import pygame
import cv2
import sys
camera = cv2.VideoCapture(1)
pygame.init()
pygame.display.set_caption("OpenCV camera stream on Pygame")
screen = pygame.display.set_mode([1280, 720])
@hydren
hydren / sound_pitching_example.cpp
Last active October 5, 2023 15:56
SDL_Mixer chunk pitching
/*
* sound_pitching_example.cpp
*
* Created on: 27 de dez de 2017
* Author: Carlos Faruolo
*/
#include <SDL2/SDL.h>
#include <SDL2/SDL_mixer.h>
#include <iostream>
@YukiSnowy
YukiSnowy / main.cpp
Last active October 19, 2024 01:28
example SDL2 Vulkan application
// Windows
// g++ *.cpp -o vulkan -lSDL2main -lSDL2 -lvulkan-1
// Linux
// g++ *.cpp -o vulkan -lSDL2main -lSDL2 -lvulkan
// https://vulkan-tutorial.com/
#include <iostream>
using namespace std;
#include <SDL2/SDL.h>