Skip to content

Instantly share code, notes, and snippets.

View luis-fss's full-sized avatar
:octocat:
Hey

Luis Fernando de Souza Santos luis-fss

:octocat:
Hey
View GitHub Profile
@luis-fss
luis-fss / index.cs
Created January 11, 2023 16:06
RavenDB: move all documents from one database to another
using System.Threading.Tasks;
using Raven.Client.Documents;
using Raven.Client.ServerWide.Operations;
public class RavenDBMerger
{
readonly IDocumentStore _store;
public RavenDBMerger(IDocumentStore store)
{
@luis-fss
luis-fss / index.md
Last active January 15, 2022 15:07
Digital certificate import errors in Chrome and Firefox on Linux.

I wasn't able to install FILENAME.pfx under Ubuntu on Chrome or Firefox altough I had no problems installing the very same file on IE under Windows. What I did to solve the issue:

openssl pkcs12 -in FILENAME.pfx -clcerts -nokeys -out FILENAMEcert.pem
openssl pkcs12 -in FILENAME.pfx -nocerts -out FILENAMEkey.pem
openssl pkcs12 -export -in FILENAMEcert.pem -inkey FILENAMEkey.pem -out FILENAME.p12

Then install FILENAME.p12 on Chrome or Firefox under Ubuntu should work like a charm :)

@luis-fss
luis-fss / ohmyposhv3-v2.json
Created November 25, 2021 16:21 — forked from shanselman/ohmyposhv3-v2.json
ohmyposhv3-v2
{
"final_space": true,
"console_title": true,
"console_title_style": "folder",
"blocks": [
{
"type": "prompt",
"alignment": "left",
"horizontal_offset": 0,
"vertical_offset": 0,
using namespace System.Management.Automation
using namespace System.Management.Automation.Language
if ($host.Name -eq 'ConsoleHost')
{
Import-Module PSReadLine
}
#Import-Module PSColors
#Import-Module posh-git
Import-Module -Name Terminal-Icons
@luis-fss
luis-fss / index.md
Last active November 9, 2021 19:02
Set dotnet cli language
[System.Environment]::SetEnvironmentVariable('DOTNET_CLI_UI_LANGUAGE','en-US')
$env:DOTNET_CLI_UI_LANGUAGE
en-US

or

  1. Go to location where dotnet is installed
  2. Go to "dotnet-install-directory\sdk\sdk-version"
@luis-fss
luis-fss / gulpfile.js
Created April 28, 2020 14:03
NPM and Gulp for Asp.Net Core 3 config sample
/// <binding AfterBuild='default' Clean='clean' />
/*
This file is the main entry point for defining Gulp tasks and using Gulp plugins.
Click here to learn more. http://go.microsoft.com/fwlink/?LinkId=518007
*/
var gulp = require('gulp');
var del = require('del');
var plumber = require('gulp-plumber');
var concat = require('gulp-concat');
@luis-fss
luis-fss / SetAssemblyInfoVersion.ps1
Created January 28, 2019 13:27
PowerShell script to set the version in all the AssemblyInfo.cs or AssemblyInfo.vb files in any subdirectory
# SetAssemblyInfoVersion.ps1
#
# Set the version in all the AssemblyInfo.cs or AssemblyInfo.vb files in any subdirectory.
#
# usage:
# from cmd.exe:
# powershell.exe .\SetAssemblyInfoVersion.ps1 2.8.3.0
#
# from powershell.exe prompt:
# .\SetAssemblyInfoVersion.ps1 2.8.3.0
@luis-fss
luis-fss / build.cake
Created January 28, 2019 13:25
Aquivo build.cake (ainda em desenvolvimento) preparado para gerar pacotes ClickOnce e controle de versão
#tool nuget:?package=NUnit.ConsoleRunner&version=3.4.0
//#addin nuget:?package=Cake.ClickTwice
#addin nuget:?package=Cake.Powershell&version=0.4.7
#r "C:\Users\lukia\source\repos\Cake\ClickTwice\src\Cake.ClickTwice\bin\Debug\Cake.ClickTwice.dll"
#r "C:\Users\lukia\source\repos\Cake\ClickTwice\src\Cake.ClickTwice\bin\Debug\ClickTwice.Handlers.AppDetailsPage.dll"
//////////////////////////////////////////////////////////////////////
// ARGUMENTS
//////////////////////////////////////////////////////////////////////
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
# User-specific files
*.rsuser
*.suo
*.user
*.userosscache
@luis-fss
luis-fss / git --allow-unrelated-histories
Created January 21, 2019 12:59
How to resolve github refusing to merge unrelated histories
C:\[path]\git.exe merge origin/master --allow-unrelated-histories