Skip to content

Instantly share code, notes, and snippets.

View MarcosMeli's full-sized avatar
🏠
Working from home

Marcos Meli MarcosMeli

🏠
Working from home
View GitHub Profile
@LucGranato
LucGranato / index.html
Last active November 1, 2023 00:39
Monaco Editor Liquid Language
<div id="container" style="height:100%;"></div>
@OliverJAsh
OliverJAsh / foo.ts
Last active July 29, 2023 18:16
Records and dictionaries in TypeScript
/*
In JavaScript, objects can be used to serve various purposes.
To maximise our usage of the type system, we should assign different types to our objects depending
on the desired purpose.
In this blog post I will clarify two common purposes for objects known as records and dictionaries
(aka maps), and how they can both be used with regards to the type system.
@flesler
flesler / post-checkout
Created April 19, 2017 14:02 — forked from betorobson/post-checkout
git hook to run a command after `git pull` and `git checkout` if a specified file was change for example, package.json or bower.json
#!/usr/bin/env bash
# fork from https://gist.github.com/jakemhiller/d342ad51505addf78ec628a16fd3280f
changed_files="$(git diff-tree -r --name-only --no-commit-id $1 $2)"
check_run() {
echo "$changed_files" | grep --quiet "$1" && eval "$2"
}
check_run package.json "npm prune && npm install"
@maslevx
maslevx / CustomFormatConverter.cs
Created June 21, 2015 04:21
filehelpers field converter
public sealed class CustomFormatConverter<T> : ConverterBase where T : IFormattable
{
private string _formatString;
private IFormatProvider _formatProvider;
private Type _objType;
#region constructors
public CustomFormatConverter(string Format)
: this(Format, null)
{ }
@kristianmandrup
kristianmandrup / aurelia-started.md
Last active February 22, 2017 16:15
Aurelia Getting started - walk through

Aurelia

Recipe

  • Install NVM
  • Install IO.js
  • Install global Node.js utility modules (gulp, jspm, yo)
  • Install RethinkDB
  • Install Koa.js
  • Install Aurelia generator
  • Create Aurelia app via generator
@rdingwall
rdingwall / FileHelpersTypeExtensions.cs
Created November 24, 2011 14:07
Set FileHelper's FileHelperEngine.HeaderText via reflection
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
// see http://stackoverflow.com/questions/3975741/column-headers-in-csv-using-filehelpers-library/8258420#8258420
// ReSharper disable CheckNamespace
namespace FileHelpers
// ReSharper restore CheckNamespace
@underwhelmed
underwhelmed / RecordStringConverter.cs
Created January 26, 2011 16:41
How I would implement storing the record line with the storage object using FileHelpers
using System;
using FileHelpers;
using NUnit.Framework;
namespace FileHelpers.Tests.Converters
{
[TestFixture]
public class RecordStringConverter.cs
{
FileHelperEngine<UserRecord> engine = new FileHelperEngine<UserRecord>();