Skip to content

Instantly share code, notes, and snippets.

View ashes999's full-sized avatar

ashes999 ashes999

View GitHub Profile
@ravage
ravage / server.rb
Created February 18, 2013 11:24
Ruby Rack/Thin serve static files
#!/usr/bin/env ruby
require 'rack'
require 'rack-rewrite'
include Rack
app = Builder.new do
use Rewrite do
rewrite '/', '/index.html'
@mattdesl
mattdesl / ShaderLesson6.java
Last active May 24, 2022 13:43
LibGDX Port of ShaderLesson6, dealing with normal mapping in 2D games
import org.lwjgl.input.Mouse;
import org.lwjgl.opengl.Display;
import com.badlogic.gdx.ApplicationListener;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.InputAdapter;
import com.badlogic.gdx.backends.lwjgl.LwjglApplication;
import com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration;
import com.badlogic.gdx.graphics.GL10;
import com.badlogic.gdx.graphics.OrthographicCamera;
@treygriffith
treygriffith / gist:4599048
Created January 22, 2013 22:12
Demonstrate behavior of MongoDB $in on primitive properties
toy1 = {
color: 'red'
};
toy2 = {
color: 'pink'
}
Toys.find({color: { $in: ['red', 'green', 'blue'] }}, cb);
// finds toy1, but not toy2