Skip to content

Instantly share code, notes, and snippets.

View heberop's full-sized avatar

Heber Ortiz Pereira heberop

  • Dublin, Ireland
View GitHub Profile
@heberop
heberop / Dockerfile
Created August 26, 2021 11:51
Dockerfile sample copying first .sln and .csproj only and restore
FROM mcr.microsoft.com/dotnet/sdk:5.0-buster-slim AS builder
WORKDIR /build
COPY src/*.sln ./nuget.config ./
COPY src/*/*.csproj ./
RUN for from in ./*.csproj; do to=$(echo "$from" | sed 's/\/\([^/]*\)\.csproj$/\/\1&/') \
&& mkdir -p "$(dirname "$to")" && mv "$from" "$to"; done
RUN dotnet restore --configfile ./nuget.config
@heberop
heberop / ohmyposhv3.json
Last active August 5, 2021 17:00 — forked from shanselman/ohmyposhv3.json
My ohMyPoshv3 json
{
"final_space": true,
"osc99": false,
"console_title": false,
"console_title_style": "",
"console_title_template": "",
"terminal_background": "",
"blocks": [
{
"type": "prompt",

Keybase proof

I hereby claim:

  • I am heberop on github.

  • I am heberortiz (https://keybase.io/heberortiz) on keybase.

  • I have a public key ASCMIEeg_EqhK1X5barNzey5tgsb8HC8Mn5rjU1t33tpfQo

Git Scripts

Fetch/Pull over all subdirectories

Bash

find . -type d -name .git -exec git --git-dir={} --work-tree=$PWD/{}/.. fetch -p \;
<?xml version="1.0" encoding="utf-8"?>
<key name="Software">
<key name="ConEmu">
<key name=".Vanilla" modified="2019-01-31 13:00:47" build="190108">
<value name="Language" type="string" data="en"/>
<value name="StartType" type="hex" data="02"/>
<value name="CmdLine" type="string" data=""/>
<value name="StartTasksFile" type="string" data=""/>
<value name="StartTasksName" type="string" data="{Shells::PowerShell}"/>
<value name="StartFarFolders" type="hex" data="00"/>

Utilitários

Remover todos os containers Exited

Linux

sudo docker ps -a | grep Exit | cut -d ' ' -f 1 | xargs sudo docker rm

Windows

docker rm $(docker ps -a -q)

@powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
choco install -y nodejs.install
choco install -y visualstudiocode
choco install -y git
choco install -y conemu
git clone https://github.com/heberop/poshfiles.git %userprofile%\Documents\WindowsPowerShell
cd %userprofile%\Documents\WindowsPowerShell
git submodule update --init --recursive
# Load posh-git example profile
. 'C:\Users\heber.pereira\Documents\WindowsPowerShell\Modules\posh-git\profile.example.ps1'
function global:prompt {
$realLASTEXITCODE = $LASTEXITCODE
Write-Host("~/" + $pwd.ProviderPath.Split("\")[-1]) -nonewline
Write-VcsStatus
@heberop
heberop / .gitconfig
Last active September 12, 2016 15:13 — forked from giggio/_latest.md
My .gitconfig on Windows
[user]
name = Heber Ortiz Pereira
email = heber.pereira@lambda3.com.br
[credential]
modalprompt = true
helper = manager
[color]
diff = always
interactive = always
status = always