Skip to content

Instantly share code, notes, and snippets.

@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.

@staltz
staltz / introrx.md
Last active November 17, 2025 19:44
The introduction to Reactive Programming you've been missing
@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].

@31
31 / gist:3781b066e16bf538f170
Last active November 10, 2023 02:05
OpenGL functions by object
@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
@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)
@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

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.

@ankurk91
ankurk91 / install-node-js.sh
Last active November 4, 2024 05:29
Install node-js, npm and yarn on Ubuntu/Mac using nvm
#!/bin/sh
# Install node and npm via nvm - https://github.com/nvm-sh/nvm
# Run this script like - bash script-name.sh
# Define versions
INSTALL_NODE_VER=22
INSTALL_NVM_VER=0.40.1
@Kronopath
Kronopath / converter.py
Last active January 30, 2025 14:05
WeChat audio converter script. See http://kronopath.net/blog/extracting-audio-messages-from-wechat/ for more details.
# WeChat aud file converter to wav files
# Dependencies:
# SILK audio codec decoder (available at https://github.com/gaozehua/SILKCodec)
# ffmpeg
#
# By Gabriel B. Nunes (gabriel@kronopath.net)
# Adapted from another script by Nicodemo Gawronski (nico@deftlinux.net)
#
import os, argparse, subprocess