Skip to content

Instantly share code, notes, and snippets.

/* Javascript patterns - Stoyan Stefanov - Classical Pattern #2 - Rent-a-Constructor
- This patterns solves the problem of passing arguments from the child to the parent. It borrows the parent constructor, passing the child object to be bound to 'this' and also fowarding any arguments
*/
/* Sample */
// a parent constructor
function Article(){
@diegocaxito
diegocaxito / Log4Net.app.config
Created August 27, 2013 01:25
Teste simples de geração de logs com log4net (http://logging.apache.org/log4net/)
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<section name="log4net"
type="log4net.Config.Log4NetConfigurationSectionHandler, log4net"/>
</configSections>
<log4net>
<appender name="ExceptionLogFileAppender" type="log4net.Appender.RollingFileAppender">
<file type="log4net.Util.PatternString">
<conversionPattern value="teste.error.log" />