Skip to content

Instantly share code, notes, and snippets.

View Sija's full-sized avatar

Sijawusz Pur Rahnama Sija

View GitHub Profile
@Sija
Sija / merge.coffee
Created May 1, 2011 09:30
Object.merge
merge = (target, objects...) ->
deep = yes
if typeof target is 'boolean'
[deep, target] = [target, objects.shift()]
if not objects.length
[target, objects] = [this, [target]]
isExtendable = (object) ->
typeof object is 'object' and object isnt null or
@Sija
Sija / Benchmark.h
Created February 7, 2011 22:01
Objective-C benchmark utility class used in some of my projects
//
// Benchmark.h
// Opskrifter
//
// Created by Sijawusz Pur Rahnama on 03/02/09.
// Copyleft 2009. Some rights reserved.
//
#import <Foundation/Foundation.h>
@Sija
Sija / svn-index.xsl
Created January 19, 2011 09:11
XSLT file for SVN web indexes
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet
version="1.0"
xmlns:msxsl="urn:schemas-microsoft-com:xslt"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html"/>
<xsl:template match="*"/>
<xsl:template match="svn">
<html>
@Sija
Sija / EasyXML.class.php
Created January 19, 2011 09:07
XML manipulation class found in dark corners of my hdd
<?php
/**
*
* @mainpage
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
@Sija
Sija / NSArray-Blocks.h
Created November 15, 2009 05:22
Making NSArray more ruby-ish
//
// NSArray-Blocks.h
// Handy codebits
//
// If you want to keep block definitions terse, simple and dynamic, have no
// problems with the incompatible block pointer types and you don't mind
// compiler warnings about sending a message without matching signature,
// DO NOT IMPORT THIS FILE, seriously.
//
// Created by Sijawusz Pur Rahnama on 15/11/09.