Skip to content

Instantly share code, notes, and snippets.

#### Are there other single-file public-domain libraries out there?
Yes. Here are some:
- [jo_gif.cpp](http://www.jonolick.com/home/gif-writer): tiny GIF writer (public domain)
- [gif.h](https://github.com/ginsweater/gif-h): animated GIF writer (public domain)
- [tiny_jpeg.h](https://github.com/serge-rgb/TinyJPEG/blob/master/tiny_jpeg.h): JPEG encoder (public domain)
- [lodepng](http://lodev.org/lodepng/): PNG encoder/decoder (zlib license)
- [nanoSVG](https://github.com/memononen/nanosvg): 1-file SVG parser; 1-file SVG rasterizer (zlib license)

Are there other single-file public-domain libraries out there?

Yes. Here are some:

  • jo_gif.cpp: tiny GIF writer (public domain)
  • gif.h: animated GIF writer (public domain)
  • tiny_jpeg.h: JPEG encoder (public domain)
  • lodepng: PNG encoder/decoder (zlib license)
  • nanoSVG: 1-file SVG parser; 1-file SVG rasterizer (zlib license)
  • tinyobjloader: wavefront OBJ file loader (BSD license)

I have an unreleased platformer protoype with platforms that move both horizontally and vertically. The logic I have is pretty hacky and doesn't handle some situations, but I should just be able to put a few more cases in and it'll be ok.

I forbid the player ever being inside a wall/platform (simulation is required to always keep them out). However, I have made the game design decision that if a player gets crushed by platforms, it's ok to kill them, rather than fully resolve the physics and prevent that (e.g. player crushed between platform and terrain).

Also, all of this stuff is designed so that I can get high performance, as, for reasons,

@nothings
nothings / warnings.md
Last active October 27, 2015 18:07
Warnings without warnings-as-errors are worthless.

Warnings without warnings-as-errors are worthless.

"Worthless" is hyperbole, but what I really mean is "not functioning as intended", unless you do clean builds with high frequency. (There have been periods in my life where I never did clean builds at all, although creeping compiler malfeasance has led to an increase in full rebuilds.)

Here's a scenario: you have a policy of fixing certain warnings ("objectionable"), but not others ("ignorable"), so you don't have warnings-as-errors enabled because of the ignorable warnings.

Patreon Vulnerability

Until 2015-10-13, Patreon had a flaw which allowed public access on their website patreon.com to certain information which was supposed to be private.

The following things were exposed:

  • Existence of users with "unlisted" profiles
  • Dollar amount given by every user to every campaign
@1
TOP:
SUB 64
JGZ TOP
ADD 64
ADD ACC
ADD ACC
ADD ACC
ADD UP
MOV ACC,RIGHT
@nothings
nothings / foo.txt
Last active March 8, 2016 00:27
Twitter Link Etiquette
Twitter Link Etiquette (IMO):
1. Give some indication of what's behind the link (e.g. what
it's about), so people don't click through to the same
article multiple times (especially important if the URL is
being shortened and they can't even tell it's the same
oddball site they've already visited twice today). Don't just
post "Awesome" and a link; different people follow you for
different reasons and some of them don't care about Ancient
Greek, Rare Violins, or Deep Space Anomolies, and it doesn't
@nothings
nothings / foo.c
Last active April 14, 2016 18:51
stbwingraph_MenuBegin(NULL); // top-level menu needs no name
stbwingraph_MenuBegin("&File");
stbwingraph_MenuItem(0 , "&New" , MENU_new);
stbwingraph_MenuItem('O', "&Open" , MENU_open);
stbwingraph_MenuItem('S', "&Save" , MENU_save);
stbwingraph_MenuItem(0 , "Save &As...", MENU_save_as);
stbwingraph_MenuItem(0,0,0);
stbwingraph_MenuItem(0 , "&Export", MENU_export);
stbwingraph_MenuItem(0,0,0);
stbwingraph_MenuItemExit("E&xit", MENU_exit);
Loaded 'C:\Windows\SysWOW64\clbcatq.dll', no matching symbolic information found.
Loaded 'C:\Windows\SysWOW64\comdlg32.dll', no matching symbolic information found.
Loaded 'C:\Windows\SysWOW64\uxtheme.dll', no matching symbolic information found.
Loaded 'C:\Windows\winsxs\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.7601.18837_none_41e855142bd5705d\comctl32.dll', no matching symbolic information found.
Loaded 'C:\Windows\SysWOW64\shell32.dll', no matching symbolic information found.
Loaded 'C:\Program Files (x86)\Common Files\microsoft shared\ink\tiptsf.dll', no matching symbolic information found.
Loaded 'C:\Windows\SysWOW64\ExplorerFrame.dll', no matching symbolic information found.
Loaded 'C:\Windows\SysWOW64\duser.dll', no matching symbolic information found.
Loaded 'C:\Windows\SysWOW64\dui70.dll', no matching symbolic information found.
Loaded 'C:\Windows\SysWOW64\WindowsCodecs.dll', no matching symbolic information found.
#include <windows.h>
#define STB_DEFINE
#include "stb.h"
#define STB_IMAGE_IMPLEMENTATION
#include "stb_image.h"
#define STB_IMAGE_WRITE_IMPLEMENTATION
#include "stb_image_write.h"