Skip to content

Instantly share code, notes, and snippets.

Last updated 2020/03/04

Some links from twitter on the topic of parsing PSD files (haven't looked into them in details). PSD include a flattened rasterized image so this is easy to load if that's the only thing you need. Most software / librairies have support for extracting this flattened data (e.g. stb_image.h does).

However if you want access to individual layers, render non-rasterized layers, emulate every photoshop features, extract or apply effects with more granularity, more code is needed. May range from easy to lots-of-work depending on what exactly you need.

As far as I know there isn't a trivial stb-like ready-to-use C++ library to do that sort of things. Posting all links here. Some are probably bloated or hard to use into your project, some lacking features.

TODO: Actually look into the pros/cons of all those.

@JustinBis
JustinBis / CS123-OpenGL-Guide.md
Last active January 16, 2019 00:50
The CS123 OpenGL Guide

The CS123 Guide to OpenGL

OpenGL, the best graphics library this side of the Mississippi (which actually means the whole world, if you’re hip to geometric topology). This guide will guide you through the guiding principles of OpenGl. That’s a lot of guide. It is organized by topic, and in each topic we order each subtopic by a plausible chronology of use. If you can’t find something, use control-F or command-F. If you still can’t find it, contact a TA and tell us what we missed.

Vertex Buffer Objects (VBOs)

Vertex Buffer Objects (VBOs) are OpenGL’s way of storing geometry data. VBOs are referenced by VBO IDs that can be generated using OpenGL. Every object that you wish to render will eventually have to have its geometry stored in a VBO, so you really should spend some time getting to know these objects well.

Create a VBO ID

@karpathy
karpathy / min-char-rnn.py
Last active November 12, 2025 07:00
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
"""
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD License
"""
import numpy as np
# data I/O
data = open('input.txt', 'r').read() # should be simple plain text file
chars = list(set(data))
data_size, vocab_size = len(data), len(chars)
@mandiwise
mandiwise / Update remote repo
Last active August 20, 2025 13:39
Transfer repo from Bitbucket to Github
// Reference: http://www.blackdogfoundry.com/blog/moving-repository-from-bitbucket-to-github/
// See also: http://www.paulund.co.uk/change-url-of-git-repository
$ cd $HOME/Code/repo-directory
$ git remote rename origin bitbucket
$ git remote add origin https://github.com/mandiwise/awesome-new-repo.git
$ git push origin master
$ git remote rm bitbucket
@31
31 / gist:3781b066e16bf538f170
Last active November 10, 2023 02:05
OpenGL functions by object
@Zearin
Zearin / python_decorator_guide.md
Last active November 6, 2025 16:16
The best explanation of Python decorators I’ve ever seen. (An archived answer from StackOverflow.)

NOTE: This is a question I found on StackOverflow which I’ve archived here, because the answer is so effing phenomenal.


Q: How can I make a chain of function decorators in Python?


If you are not into long explanations, see [Paolo Bergantino’s answer][2].

@staltz
staltz / introrx.md
Last active November 17, 2025 19:44
The introduction to Reactive Programming you've been missing
@subzey
subzey / readme.md
Last active September 1, 2018 06:08
Games with unusual spacetime

Games with unusual spacetime

2 Dimensions

Desktop puzzle game. Level design resembles Escher's "impossible" drawings and passable path varies depending on where player is located and in which direction he moves.

@stared
stared / software_for_scientists.md
Last active September 12, 2025 13:22
Software for scientists: community-edited list of general-purpose software for scientists.

Software for scientists

Some things takes much less time and stress once you know the right tool. Below, there is a community edited list of software for scientists.

Text editors

in General purpose text/code editors. It may be better to have a good editor for everything, than different ones for different languages, scripts, notes.

@maxwells
maxwells / linearColorInterpolator.js
Created January 4, 2014 03:34
Find the color between any two color points through linear interpolation. Pretty basic & straight forward. Progress bar demo at: http://jsfiddle.net/99ycK/1/
Color = function(hexOrObject) {
var obj;
if (hexOrObject instanceof Object) {
obj = hexOrObject;
} else {
obj = LinearColorInterpolator.convertHexToRgb(hexOrObject);
}
this.r = obj.r;
this.g = obj.g;
this.b = obj.b;