Skip to content

Instantly share code, notes, and snippets.

@aidansmyth
aidansmyth / Copy table functions
Created July 4, 2013 14:01
Lua functions to copy a table not just reference the original table and it's data
-- From: lua-users.org
-- http://lua-users.org/wiki/CopyTable
--[[
Shallow Copy
This a simple, naive implementation. It only copies the top level value and its direct children; there is no handling of deeper children, metatables or special types such as userdata or coroutines. It is also susceptible to influence by the __pairs metamethod.
]]--
function shallowcopy(orig)
##############################################################################
# gitignore template
#
# Based on article: https://help.github.com/articles/ignoring-files
##############################################################################
# Project specific files #
##########################
@aidansmyth
aidansmyth / httpd-vhosts.conf
Created March 21, 2013 20:36
Virtual hosts configuration on localhost
# Default wamp vhost
#<VirtualHost *:80>
# ServerAdmin webmaster@dummy-host2.example.com
# DocumentRoot "c:/Apache2/docs/dummy-host2.example.com"
# ServerName dummy-host2.example.com
# ErrorLog "logs/dummy-host2.example.com-error.log"
# CustomLog "logs/dummy-host2.example.com-access.log" common
#</VirtualHost>
<VirtualHost *:80>
# ==============================================================================
# REQUIRED 3RD PARTY COMPASS EXTENSIONS
# ==============================================================================
# require ''
# ==============================================================================
# COMPASS PROJECT CONFIGURATION
# ==============================================================================
# Can be `:stand_alone` or `:rails`. Defaults to `:stand_alone`.