Skip to content

Instantly share code, notes, and snippets.

View royto's full-sized avatar

Julien Roy royto

View GitHub Profile
royto / light-strategy.js
Last active October 10, 2021 19:20
Lovelace Light View Strategy
Light strategy that shows your light entities.
To use:
- store this file in `<config>/www/light-strategy.js`
- Add lovelace resource: `/local/light-strategy.js`, type JavaScript Module
- Create a new Lovelace dashboard and set as content:
- title: Lights
type: 'custom:light-strategy'
royto /
Last active December 28, 2018 08:28
Git Tips and tricks

Git CheatSheet

Usefull commands

Amend a commit with changing message

git commit --amend ----no-edit

Fixup using rebase

royto /
Last active March 13, 2019 17:21


  • Clean Code: A Handbook of Agile Software Craftsmanship by Robert Martin aka Uncle Bob
  • Analysis Patterns by Martin Fowler
  • Blue Book by Eric Evans
  • The pragmatic programmer by Andrew Hunt & David Thomas
  • The Software Craftsman: Professionalism, Pragmatism, Pride by Sandro Mancuso
  • Patterns of Enterprise Application Architecture by Martin Fowler
  • Refactoring by Martin Fowler
  • Working Effectively with Legacy Code by Michael Feathers
royto / DomainServiceService.cs
Created January 22, 2018 10:29
Unity - DI - Inject Multiple interface implementations
namespace Demo.Service
public class DomainServiceService
public DomainServiceService(IDomainService[] domainServices)
foreach (var service in domainServices)
var name = service.GetName();
royto / ES6 Angular Directive with injection
Last active October 25, 2017 18:01
Example of Angular Directive as ES6 class with injection
class myDirective {
constructor(userService) {
this.template = `<div>{{fullName}}</div>`;
this.restrict = 'E';
this.scope = {
user: '='
}; = function(scope, element) {
scope.fullName = userService.getFullName(scope.user);
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Fdc.Web.Controllers.WebApi;
using Microsoft.Win32.SafeHandles;
using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;