Skip to content

Instantly share code, notes, and snippets.

@shakesoda
shakesoda / fix-ratings.py
Last active March 6, 2016 22:58
A quick script to fix DDRX ratings in .sm files (difficulty / 1.5). It saves backup files in case something really goes wrong. Place this in the song group you want fixed and run the script, or pass it the folder you want fixed on the command line (i.e. $ fix-ratings.py ~/Songs/Bleh)
#!/usr/bin/env python2
"""
.SM rating fixer thingy!
========================
Usage:
Just put the file in the folder with the things you need fixed and run it!
You can also give it an argument on the command line to specify the path.
@soheilhy
soheilhy / nginxproxy.md
Last active July 5, 2025 15:29
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers

@henkboom
henkboom / gist:7212b480d344f34dd3e6
Last active August 29, 2015 14:02
two squares in a circle
// uses love2d 'effect' entry point
uniform float time = 0.0f;
float pi = 3.14159;
float intersect(float value1, float value2)
{
return value1 * value2;
}
@shakesoda
shakesoda / save-the-world.diff
Last active August 29, 2015 14:08
add line drawing mode (really useful for debugging) and fix crash on non-OS X in love-experiments vertex buffer branch
diff -r 125cff058bd5 src/modules/graphics/opengl/Mesh.cpp
--- a/src/modules/graphics/opengl/Mesh.cpp Mon Jun 02 00:22:41 2014 -0300
+++ b/src/modules/graphics/opengl/Mesh.cpp Sat Oct 25 10:12:35 2014 -0700
@@ -581,6 +581,8 @@
{
case DRAW_MODE_FAN:
return GL_TRIANGLE_FAN;
+ case DRAW_MODE_LINES:
+ return GL_LINES;
case DRAW_MODE_STRIP: