Skip to content

Instantly share code, notes, and snippets.

View aurora's full-sized avatar
🤔
...

Harald Lapp aurora

🤔
...
View GitHub Profile
@aurora
aurora / gist:793108
Created January 24, 2011 11:29
applescript: rename selected itunes tracks
--
-- renames selected tracks
--
-- from:
-- artist: "Various Artists"
-- name: "name-of-artist - name-of-track"
--
-- to:
-- artist: "name-of-artist"
-- album artist: "Various Artists"
@aurora
aurora / gist:750698
Created December 21, 2010 22:02
mysql backup/restore using CSV files
mysql backup/restore using CSV files
====================================
backup
------
#!/usr/bin/env bash
mysqldump -u root -p... database --no-data > /tmp/backup/database-schema.sql
mysqldump -u root -p... -t -T/tmp/backup database --fields-enclosed-by=\" --fields-terminated-by=,
@aurora
aurora / gist:733990
Created December 8, 2010 21:57
Compiling apg on OSX
Compiling apg on OSX
====================
Version: 2.2.3
http://www.adel.nursat.kz/apg/
Makefile
--------
@aurora
aurora / gist:672346
Created November 11, 2010 10:59
inheritance -- Lua style
-- number
number = {}
function number:new(o)
o = o or {}
setmetatable(o, self)
self.__index = self
self.__add = function(self, op)
return self:new{value=(self:cast(self) + self:cast(op))}
end
@aurora
aurora / class.lua
Created November 11, 2010 10:51
class implementation for lua
function clone(object)
local dict = {}
local function clone(object)
if (type(object) ~= "table") then
return object
elseif (dict[object]) then
return dict[object]
end