Skip to content

Instantly share code, notes, and snippets.

View reense's full-sized avatar
🎯
Focusing

Reénse reense

🎯
Focusing
  • Tickles Digital Agency
  • Netherlands
View GitHub Profile
@zezba9000
zezba9000 / HTTPServer.cs
Last active March 13, 2023 11:52
HTTP C# server
// Modified from: https://gist.github.com/aksakalli/9191056
using System;
using System.Collections.Generic;
using System.Net;
using System.IO;
using System.Threading;
namespace MyNamespace
{
@simonhamp
simonhamp / AppServiceProvider.php
Last active March 26, 2024 15:56
A pageable Collection implementation for Laravel
<?php
namespace App\Providers;
use Illuminate\Support\Collection;
use Illuminate\Pagination\LengthAwarePaginator;
class AppServiceProvider extends ServiceProvider
{
public function boot()
@jbreuer
jbreuer / gist:956aeb77c0c679f44cc0
Last active November 12, 2018 14:51
Get current domain root node in Umbraco content finder
public class NewsContentFinder : IContentFinder
{
public bool TryFindContent(PublishedContentRequest contentRequest)
{
if (contentRequest != null && contentRequest.HasDomain)
{
var rootDomainNode = contentRequest.RoutingContext.UmbracoContext.ContentCache.GetById(contentRequest.Domain.RootNodeId);
}
}
}