Skip to content

Instantly share code, notes, and snippets.

View TannerRogalsky's full-sized avatar
💯
P I X E L S

Tanner Rogalsky TannerRogalsky

💯
P I X E L S
View GitHub Profile
@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;
}
@josefnpat
josefnpat / conf.lua
Last active January 11, 2016 15:42
LÖVE-PIXLR
function love.conf(t)
t.window.title = "LovePixlr Demo"
t.window.resizable = true
end
@namuol
namuol / INSTALL.md
Last active December 11, 2024 12:21
rage-quit support for bash

rage-quit support for bash

HOW TO INSTALL

Put flip somewhere in your $PATH and chmod a+x it.

Copy fuck into ~/.bashrc.

@bcatcho
bcatcho / ScriptableObj2Asset Readme.md
Created January 26, 2014 20:18
This utility script will give you an option in the Assets/Create menu that will allow one to instantiate a selected scriptable object script and save it as an asset. It also works by right clicking on the file in the project window and selecting

What it does

This script provides a context menu item in the Project window (as well as an extra option in the Assets>Create menu) that will instantiate the selected Scriptable object and save it as an asset to a folder of your choosing.

How to install

Throw this script in any folder called Editor in your assets folder.

How to use

settings_table = {
{
-- Edit this table to customise your rings.
-- You can create more rings simply by adding more elements to settings_table.
-- "name" is the type of stat to display; you can choose from 'cpu', 'memperc', 'fs_used_perc', 'battery_used_perc'.
name='time',
-- "arg" is the argument to the stat type, e.g. if in Conky you would write ${cpu cpu0}, 'cpu0' would be the argument. If you would not use an argument in the Conky variable, use ''.
arg='%I.%M',
-- "max" is the maximum value of the ring. If the Conky variable outputs a percentage, use 100.
max=12,
@chesterbr
chesterbr / lolcommitify.rb
Created February 28, 2013 20:29
Quick, hack-y script to add lolcommits hooks to all repos in a dir.
#!/usr/bin/env ruby
#
# lolcommitify.rb - adds the post-commit hook of https://github.com/mroth/lolcommits
# to every single git repository on a directory, recursively
#
# Copyright 2013 Chester ([email protected]), BSD-style copyright and disclaimer apply
# (http://opensource.org/licenses/bsd-license.php)
require 'fileutils'
@TomK32
TomK32 / control_maps.lua
Created November 12, 2012 16:56
control maps in LÖVE2D
-- small improvement from http://tannerrogalsky.com/blog/2012/04/06/control-maps-in-love2d/
-- this version has a cleaner control_map by calling m
class "GameController" {
moveUp = function(self)
end,
control_map = {
keyboard = {
on_press = {
@progschj
progschj / vorbisplay.c
Created October 13, 2012 19:54
A Simple Ogg Vorbis Player using libvorbisplay and OpenAL
#include <stdlib.h>
#include <stdio.h>
#include <AL/alut.h>
#include <vorbis/codec.h>
#include <vorbis/vorbisfile.h>
char pcmout[16*1024];
void check_error()
{
@daurnimator
daurnimator / app.lua
Created September 14, 2012 10:11
Sinatra like clone for lua
if not sinatra.incoming ( ngx.req.get_method() , ngx.var.uri ) then
return ngx.exit ( 404 )
end
@TannerRogalsky
TannerRogalsky / gist:3170712
Created July 24, 2012 15:36
Auto-memoizing Fibonacci sequence in lua metatables
fib = setmetatable({1, 1},
{__index = function(t,n)
t[n] = t[n-1] + t[n-2]
return t[n]
end})