Skip to content

Instantly share code, notes, and snippets.

@agladysh
agladysh / declarative.lua
Created December 6, 2009 01:39
Example to Article on Lua Declarative Programming
local function build_message_box_imperative(gui_builder)
local my_dialog = gui_builder:dialog()
my_dialog:set_title("Message Box")
local my_label = gui_builder:label()
my_label:set_font_size(20)
my_label:set_text("Hello, world!")
my_dialog:add(my_label)
local my_button = gui_builder:button()
@schacon
schacon / gist:942899
Created April 26, 2011 19:19
delete all remote branches that have already been merged into master
$ git branch -r --merged |
grep origin |
grep -v '>' |
grep -v master |
xargs -L1 |
awk '{split($0,a,"/"); print a[2]}' |
xargs git push origin --delete
@YclepticStudios
YclepticStudios / CanvasMesh.cs
Created January 26, 2017 00:25
Unity script for rendering a mesh inside the canvas UI.
/**
* ============================================================================
* MIT License
*
* Copyright (c) 2017 Eric Phillips
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,