Skip to content

Instantly share code, notes, and snippets.

View TheFakeMontyOnTheRun's full-sized avatar
😇

Daniel Monteiro TheFakeMontyOnTheRun

😇
View GitHub Profile
@depp
depp / MacReader.c
Created April 10, 2022 15:23
Classic Mac file reading
// Location of the application: volume & directory, or 0 if unknown.
static short gAppVolRefNum;
static long gAppParID;
// Get an FSSpec pointing to a file with the given name.
static OSErr GetDataFile(FSSpec *spec, const char *filename) {
ProcessSerialNumber psn = {0, kCurrentProcess};
ProcessInfoRec info = {0};
FSSpec app_spec;
Str255 pname;
@bkaradzic
bkaradzic / orthodoxc++.md
Last active April 23, 2024 13:59
Orthodox C++

Orthodox C++

What is Orthodox C++?

Orthodox C++ (sometimes referred as C+) is minimal subset of C++ that improves C, but avoids all unnecessary things from so called Modern C++. It's exactly opposite of what Modern C++ suppose to be.

Why not Modern C++?

@gre
gre / generatevideo.sh
Created April 30, 2014 12:34
script to create movie from images. Design to go with the timelapse script: https://gist.github.com/gre/11219793
#!/bin/bash
#
# script to create movie from images. Design to go with the timelapse script: https://gist.github.com/gre/11219793
#
# Usage: ./generatevideo.sh dirWhereImagesAre/
# Usage: ./generatevideo.sh # default is './timelapse' directory
#
# will generates movie.mp4
dir=${1-"timelapse"}
@gre
gre / timelapse
Last active August 17, 2017 10:55
[MacOSX] Minimal script for timelapse capturing your screen
#!/bin/bash
# Minimal script for timelapse capturing your screen in MacOSX.
# You must run the script, from an empty directory where the images will be stored.
# Usage: ./timelapse
# or
# Usage: ./timelapse <seconds>