Skip to content

Instantly share code, notes, and snippets.

View ngocvantran's full-sized avatar

Ngoc Van Tran ngocvantran

  • Berlin, Germany
View GitHub Profile
"use strict";
const fs = require('fs');
const _ = require('lodash');
const path = require('path');
const readdirp = require('readdirp');
const Parser = require('i18next-scanner').Parser;
const WebpackPreBuildPlugin = require('pre-build-webpack');
const {i18nextToPo, i18nextToPot} = require('i18next-conv');
@ngocvantran
ngocvantran / translate.js
Created July 10, 2016 10:58
Extract translation texts from aurelia-i18n
"use strict";
const fs = require('fs');
const path = require('path');
const readdirp = require('readdirp');
const Parser = require('i18next-scanner').Parser;
const WebpackPreBuildPlugin = require('pre-build-webpack');
const {i18nextToPo, i18nextToPot} = require('i18next-conv');
@ngocvantran
ngocvantran / MoqExtensions.cs
Last active November 13, 2021 17:46
Extension methods to quickly ignore arguments without repeating It.IsAny<>()
using System;
using System.Linq.Expressions;
using Moq.Language.Flow;
namespace Moq
{
public static class MoqExtensions
{
public static ISetup<T, TResult> SetupIgnoreArgs<T, TResult>(this Mock<T> mock,
Expression<Func<T, TResult>> expression)