Configuring automatically generated release notes
To generate release note as seen in screenshot
# This code is licensed under the terms of the MIT license https://opensource.org/license/mit | |
# Copyright (c) 2021 Marat Reymers | |
## Golden config for golangci-lint v1.59.1 | |
# | |
# This is the best config for golangci-lint based on my experience and opinion. | |
# It is very strict, but not extremely strict. | |
# Feel free to adapt and change it for your needs. | |
run: |
Configuring automatically generated release notes
To generate release note as seen in screenshot
using ClosedXML.Excel; | |
public async Task<FileResult> ExportPeopleInExcel() | |
{ | |
var people = await context.People.ToListAsync(); | |
var fileName = "people.xlsx"; | |
return GenerateExcel(fileName, people); | |
} | |
private FileResult GenerateExcel(string fileName, IEnumerable<Person> people) |
import { exec as exec_child_process } from 'child_process'; | |
const exec = util.promisify(exec_child_process); | |
async function initGitRepo(dest: string) { | |
try { | |
const command = 'git init'; | |
const { stdout, stderr } = await exec(command, { | |
cwd: dest | |
}); | |
console.log(`stdout: ${stdout}`); |
import * as convert from 'xml-js'; | |
const xml = readFileSync(filePath, { | |
encoding: 'utf8' | |
}); | |
const result1 = convert.xml2json(xml, { compact: true, spaces: 4 }); | |
const data = JSON.parse(result1) as DataType; |
function getAllFiles(dirFullPath: string, arrayOfFiles: string[] = []) { | |
const files = readdirSync(dirFullPath); | |
arrayOfFiles = arrayOfFiles || []; | |
files.forEach(function (file) { | |
if (statSync(dirFullPath + '/' + file).isDirectory()) { | |
arrayOfFiles = getAllFiles(dirFullPath + '/' + file, arrayOfFiles); | |
} else { | |
arrayOfFiles.push(path.join(dirFullPath, '/', file)); |
/** | |
* Part of [Canivete](http://canivete.leofavre.com/#deepgroupby) | |
* | |
* Groups the contents of an array by one or more iteratees. | |
* Unlike Lodash [`groupBy()`](https://lodash.com/docs/4.17.4#groupBy), | |
* this function can create nested groups, but cannot receive | |
* strings for iteratees. | |
*/ | |
const deepGroupBy = (collection, ...iteratees) => { | |
let paths = collection.map(value => iteratees.map(iteratee => iteratee(value))), |
Paste the code in your Browser’s Console
var jqry = document.createElement('script');
jqry.src = "https://code.jquery.com/jquery-3.3.1.min.js";
document.getElementsByTagName('head')[0].appendChild(jqry);
jQuery.noConflict();
export GITHUB_USER=magickatt | |
export GITHUB_TOKEN=secret | |
export GITHUB_REPOSITORY=magickatt/ContainerisingLegacyApplicationsTalk | |
git clone https://${GITHUB_USER}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY} |
public class MyApplicationDataContext : DbContext | |
{ | |
public override int SaveChanges(bool acceptAllChangesOnSuccess) | |
{ | |
OnBeforeSaving(); | |
return base.SaveChanges(acceptAllChangesOnSuccess); | |
} | |
public override async Task<int> SaveChangesAsync( | |
bool acceptAllChangesOnSuccess, |