Skip to content

Instantly share code, notes, and snippets.

View perky's full-sized avatar

Luke perky

View GitHub Profile
@perky
perky / BTF Winner
Created September 1, 2014 17:05
Beat the Frog Emails.
<p>
Hi <%= @user.stage_name %>,
</p>
<p>
Congratulations, you beat the frog on <%= @event_date %> at Frog and Bucket <%= @event_city %>. So what's next? You can now book a couple of 8 minute spots, that's 8 uninterrupted minutes on stage at the start of the show. To book simply login to the Beat The Frog website and you'll see a new button appear to book an 8 spot. <%= link_to "Book now", root_url %>.
</p>
<p>
<a href="<%= @event_url %>">Link to event.</a>
</p>
<p>
///====== Copyright © 1996-2005, Valve Corporation, All rights reserved. =======
//
// Purpose: Portal 2 game definition file (.fgd)
// Created by DeanWinchester & Randdalf
//
///=============================================================================
@include "halflife2.fgd"
@SolidClass base(Targetname, worldbase, ResponseContext) = worldspawn :
public interface ICraftingDescription {
public String getDescription(int damageValue);
}
@perky
perky / ProFiReportExample.txt
Created May 30, 2012 20:38
An example of a report generated by ProFi.lua
Total Time: 0.417766
| FILE : FUNCTION : LINE : TIME : RELATIVE : CALLED |
| ./FEZ/src/ControllerManager.lua : update : 0172 : 0.418 : 99.99% : 0000001 |
| ./FEZ/src/ControllerManager.lua : updateEntities : 0176 : 0.418 : 99.98% : 0000001 |
| controllers/FogOfWarController.lua : updateEntity : 0039 : 0.400 : 95.85% : 0001044 |
| ./FEZ/src/ComponentCache.lua : _fogOfWar : 0010 : 0.228 : 54.62% : 0001284 |
| controllers/FogOfWarController.lua : updateEntityFogPARTIAL : 0056 : 0.153 : 36.67% : 0001044 |
| ./FEZ/src/EntityManager.lua
@perky
perky / ShapeHexagon.lua
Created June 8, 2012 16:03
ShapeHexagon
ShapeHexagon = Attribute('ShapeHexagon')
local _sin60 = math.sin( math.rad( 60 ) )
local _sin30 = math.sin( math.rad( 30 ) )
local _cos30 = math.cos( math.rad( 30 ) )
function ShapeHexagon:onInit( sideLength )
self:build( sideLength or 1 )
end
@perky
perky / main.lua
Created June 18, 2012 22:31
Blocking threads
---------------------
-- main.lua
---------------------
local printerThread
local time
local function printTextFromPrinterThread()
local printText = printerThread:get('print')
if printText then
@perky
perky / gist:4338631
Created December 19, 2012 17:39 — forked from anonymous/gist:4338626
The renderWarpedTextureOverlay method is being called correctly when inside a 'gas' block, but no overlay is shown.
package ljdp.minechem.client;
import java.util.EnumSet;
import org.lwjgl.opengl.GL11;
import ljdp.minechem.common.MinechemBlocks;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.Tessellator;
package ljdp.minechem.client;
import org.lwjgl.opengl.GL11;
import ljdp.minechem.common.ModMinechem;
import ljdp.minechem.common.tileentity.TileEntityMicroscope;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.client.ForgeHooksClient;
package ljdp.minechem.client;
import cpw.mods.fml.client.FMLClientHandler;
import cpw.mods.fml.client.registry.ClientRegistry;
import cpw.mods.fml.client.registry.RenderingRegistry;
import cpw.mods.fml.common.Side;
import cpw.mods.fml.common.registry.TickRegistry;
import net.minecraft.world.World;
import net.minecraftforge.client.ForgeHooksClient;
import net.minecraftforge.client.MinecraftForgeClient;
package ljdp.minechem.client;
import ljdp.minechem.common.ModMinechem;
import org.lwjgl.opengl.GL11;
import cpw.mods.fml.client.FMLClientHandler;
import net.minecraft.client.renderer.entity.RenderItem;
import net.minecraft.item.ItemStack;