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
@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 = {
@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'
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,
@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

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

@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
@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;
}
@LPGhatguy
LPGhatguy / demo.lua
Last active August 29, 2015 14:02
OpenGL function loader for LuaJIT. This is a fixed up version of slime73's original code. See demo.lua for usage.
local glfw = require("glfw3") --Let's say we have a magic GLFW3 binding there!
local openGL = require("opengl")
openGL.loader = glfw.GetProcAddress
openGL:import()
--and somewhere else
local vbo = ffi.new("GLuint[1]")
gl.GenBuffers(1, vbo)
gl.BindBuffer(GL.ARRAY_BUFFER, vbo[0])
gl.BufferData(GL.ARRAY_BUFFER, ffi.sizeof(vertices), vertices, GL.STATIC_DRAW)
@patriciogonzalezvivo
patriciogonzalezvivo / GLSL-Noise.md
Last active May 9, 2025 20:46
GLSL Noise Algorithms

Please consider using http://lygia.xyz instead of copy/pasting this functions. It expand suport for voronoi, voronoise, fbm, noise, worley, noise, derivatives and much more, through simple file dependencies. Take a look to https://github.com/patriciogonzalezvivo/lygia/tree/main/generative

Generic 1,2,3 Noise

float rand(float n){return fract(sin(n) * 43758.5453123);}

float noise(float p){
	float fl = floor(p);
  float fc = fract(p);
@alexeisavca
alexeisavca / ReactIgnore
Last active March 12, 2023 12:24
A simple component to make ReactJs ignore subtrees
var React = require('react/addons');
var ReactIgnore = {
displayName: 'ReactIgnore',
shouldComponentUpdate (){
return false;
},
render (){
return React.Children.only(this.props.children);
}