Skip to content

Instantly share code, notes, and snippets.

View Migaroez's full-sized avatar

Sven Geusens Migaroez

  • Umbraco
  • Odense, Denmark
View GitHub Profile
@Migaroez
Migaroez / ContentGenerateController
Last active October 31, 2023 11:45
Umbraco entity generation
//todo: refactor code for future expansion
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Core.Models;
using Umbraco.Cms.Core.Services;
using Umbraco.Cms.Core.Strings;
using Umbraco.Cms.Infrastructure.Persistence;
using Umbraco.Cms.Infrastructure.Persistence.Querying;
using Umbraco.Cms.Web.Common.Controllers;
@Migaroez
Migaroez / Select and delete
Last active July 13, 2020 14:20
Umbraco forms junk cleanup
DECLARE @PartialRecordData varchar(max);
SET @PartialRecordData = '%mail.ru%';
SELECT *
FROM [UFRecords]
where RecordData like @PartialRecordData
SELECT *
FROM [UFRecordFields]
where Record in (SELECT Record
@Migaroez
Migaroez / 24days mould.md
Last active December 24, 2019 08:42
24 days mould making

Shopping list:

  • A precision scale (ideally 0.1g range if you are going to make a small mould: <=4 chocolates)
  • Plastic mixing cups
  • Wooden mixing sticks
  • protection gloves
  • protection goggles
  • (optional) fume mask, if you are working in a closed environment
  • FOOD SAFE silicone + hardener with a hardness around 40 Shore
  • A plastic container
  • big enough to hold all your models with space in between each model of at least 3mm
@Migaroez
Migaroez / 24 days Blender.md
Last active December 24, 2019 08:37
24days logo blender tutorial

There is a lot to say about 3D modeling and there are a lot of best practices out there around how you should go about making a model. Most of this has to do with animating the models afterwards, which is something we will never have to do. This means we can use a more hacky approuch that will give use a result the slicing software will be happy with as long as we stick to 3 easy rules. Before we get into the rules, lets get some terminology out of the way.

  • A polygon is a point in 3d space
  • An edge is a line connecting 2 polygons
  • A face connects 3 or more edges into surface area for your mesh
  • A mesh is the skin of your model

Now the rules

using System.Collections.Generic;
// ReSharper disable once CheckNamespace
namespace System.Web.Mvc
{
public static class CookieExtensions
{
/// <summary>
/// Creates a cookie if it doesnt exists and gets the item if it exists
/// </summary>