Skip to content

Instantly share code, notes, and snippets.

View peterbucher's full-sized avatar

Peter Bucher peterbucher

View GitHub Profile
@peterbucher
peterbucher / lightcoreExample.cs
Last active July 3, 2016 09:18
peterbucher.ch - lightCoreExample.cs
var builder = new ContainerBuilder();
builder.Register<IWebApp>(c => new WebApp(c.Resolve<IRequestHandler>()));
builder.Register<IRequestHandler>(c => new RequestHandler());
IContainer container = builder.Build();
var webApp = container.Resolve<IWebApp>();
webApp.Run();
@peterbucher
peterbucher / xmlrepositoryExample.cs
Created July 3, 2016 09:09
peterbucher.ch - xmlrepositoryExample
XmlRepository.DefaultQueryProperty = "Id";
XmlRepository.DataProvider = new XmlFileProvider("~/App_Data/");
using(var repository = XmlRepository.GetInstance<Foo>) {
var foos = repository.LoadAllBy(f => f.Id > 42);
repository.SaveOnSubmit(new Foo { Id = 27, ... });
repository.DeleteOnSubmit(f => f.Id == 23);
}
@peterbucher
peterbucher / ShowContentDimensions.css
Created September 7, 2016 16:44 — forked from jonnitto/Overwrite.fusion
Neos.io: Add a little hint if the shown content is from a different content dimension
.neos.content-dimensions-backend {
font-size: 10px;
background: rgba(0, 0, 0, 0.5);
display: inline-block;
padding: 5px 5px 8px;
}
.neos.content-dimensions-backend span {
display: inline-block;
padding: 0 10px;
}

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
World world = new World();
world.SayHello();
WorldBase world = new World();
world.SayHello();
public static WorldBase ConstructMyWorld()
{
return new World();
}
WorldBase world = ConstructMyWorld();
world.SayHello();
public class ConsoleApplication
{
public static void Main()
{
WorldBase world = ConstructMyWorld();
world.SayHello();
}
public static WorldBase ConstructMyWorld()
{