Skip to content

Instantly share code, notes, and snippets.

View mcliment's full-sized avatar
⌨️

Marc Climent mcliment

⌨️
View GitHub Profile
@mcliment
mcliment / notes.md
Created February 7, 2020 09:04
VueJS Valencia 06/02/2020 Meetup Notes

Meetup notes

  • Held on Valencia on 06-02-2020
  • The speaker Debbie O'Brien is a developer and Nuxt evangelist, so to speak
  • She has a nice boilerplate in GH: https://github.com/debs-obrien/nuxt-boilerplate-project (reviewed by Nuxt experts)
  • As well, she has some courses in https://vueschool.io/ (alongside Alex and Sebastien, creators of Vuex). There are some interesing introductory free courses there as well.
  • Big performance improvements when using Nuxt+API vs traditional FE+BE mixed apps
  • As an example, Louis Vuitton uses Nuxt https://en.louisvuitton.com/eng-nl/homepage?dispatchCountry=NL
  • Most performant option: generate static page, but not suitable for all use cases
  • As well, using lazy component loading, components can be generated in separate bundles (pages are automatically). Good practice for components that are shown below the fold or on user actions.ç
@mcliment
mcliment / keybase.md
Created June 5, 2019 06:45
Keybase registration

Keybase proof

I hereby claim:

  • I am mcliment on github.
  • I am mcliment (https://keybase.io/mcliment) on keybase.
  • I have a public key whose fingerprint is 112B DC2C 1FC3 7413 972A F92E 2177 6BE5 B1E2 D4C4

To claim this, I am signing this object:

@mcliment
mcliment / WhatDoIHaveWithExplicitRegistration.txt
Created December 22, 2016 09:36
Diagnosing a problem with StructureMap
Nested Container: DEFAULT - Nested
==========================================================================================================================================================================================================================================================================================================================
PluginType Namespace Lifecycle Description Name
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
ActionConstraintCache
@mcliment
mcliment / AutomapperResolve.cs
Created July 5, 2016 15:10
Just showing an Automapper 5.0 inconsistency
using System;
using AutoMapper;
namespace SMBugSample
{
class Program
{
static void Main(string[] args)
{
var workingConfig = new MapperConfiguration(cfg =>
@mcliment
mcliment / rc2.js
Created February 18, 2016 12:33
Waiting for ASP.NET Core RC2
var http = require("https");
var openUrl = "/search/issues?q=user:aspnet+is:open+milestone:1.0.0-rc2";
var closedUrl = "/search/issues?q=user:aspnet+is:closed+milestone:1.0.0-rc2";
function getCount(url) {
return new Promise((resolve, reject) => {
var req = http.request({
hostname: "api.github.com",
path: url,
@mcliment
mcliment / NestedContainersAndSingletons.md
Last active August 29, 2015 14:16
Redefine singletons in StructureMap nested containers

This simple program just demonstrates that you can even redefine singletons in nested containers and they are destroyed when the nested container is disposed.

It just prints the HashCode of the instances twice -to ensure that they are defined as singletons-.

But this only works in StructureMap 2.6.x -actually because of a design flaw-, in 3.x branch throws a InvalidOperationException with the message:

Additional information: Only registrations of the default Transient, UniquePerRequest, and prebuilt objects are valid for nested containers. Remember that 'Transient' instances will be built once per nested container. If you need this functionality, try using a     Child/Profile container instead

NestedContainerSingletons.Singleton or plugin type NestedContainerSingletons.ISingleton has lifecycle Singleton
@mcliment
mcliment / FindUnused.ps1
Last active March 24, 2023 17:34
Powershell script to find unused files not referenced in solution
<#
.SYNOPSIS
Find and process files in a project folder that are not included in the project.
.DESCRIPTION
Find and process files in a project folder that are not included in the project.
Options to delete the files.
.PARAMETER Project
The path/name for the project file.
using System;
using System.Collections.Generic;
using System.Linq;
namespace KataGasolinera
{
public class Point
{
public Point(int x, int y)
{
#!/usr/bin/python
# -*- coding: utf-8-1 -*-
import random, math
size = 1000
numOfStations = 10
minStationDistance = 5
minPointDistance = 200
@mcliment
mcliment / Benchmark.cs
Last active December 17, 2023 11:18
Test to check the speed of List.ForEach vs List.AddRange
using System;
using System.Collections.Generic;
using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Attributes.Jobs;
namespace ForEachVsAddRange
{
[MemoryDiagnoser]
public class Benchmark
{