Skip to content

Instantly share code, notes, and snippets.

View claudiosteuernagel's full-sized avatar

Cláudio Steuernagel claudiosteuernagel

View GitHub Profile
@claudiosteuernagel
claudiosteuernagel / feedly.opml
Created April 13, 2021 15:51
My feedly opml file
<?xml version="1.0" encoding="UTF-8"?>
<opml version="1.0">
<head>
<title>Claudio subscriptions in feedly Cloud</title>
</head>
<body>
<outline text="Tiras" title="Tiras">
<outline type="rss" text="Um Sábado Qualquer" title="Um Sábado Qualquer" xmlUrl="http://www.umsabadoqualquer.com/feed/" htmlUrl="https://www.umsabadoqualquer.com"/>
<outline type="rss" text="Dilbert Daily Strip" title="Dilbert Daily Strip" xmlUrl="http://feeds.dilbert.com/DilbertDailyStrip" htmlUrl="http://dilbert.com"/>
@claudiosteuernagel
claudiosteuernagel / nexus_upload_raw_repo.sh
Created December 18, 2020 06:30
Nexus Raw Artifact upload using cURL
#Nexus Raw Artifact upload using cURL
curl --fail -u user:password --upload-file file.zip 'https:/nexus-repository.claudiosteuernagel.com/repository/my-raw-repo/my-directory/file.zip'
@claudiosteuernagel
claudiosteuernagel / settings.json
Created May 28, 2020 17:45
My Windows Terminal settings.json
// This file was initially generated by Windows Terminal 1.0.1401.0
// It should still be usable in newer versions, but newer versions might have additional
// settings, help text, or changes that you will not see unless you clear this file
// and let us generate a new one for you.
// To view the default settings, hold "alt" while clicking on the "Settings" button.
// For documentation on these settings, see: https://aka.ms/terminal-documentation
{
"$schema": "https://aka.ms/terminal-profiles-schema",
"launchMode": "maximized",
kubectl get pods --all-namespaces | grep Evicted | awk '{print $2 " --namespace=" $1}' | xargs kubectl delete pod
@claudiosteuernagel
claudiosteuernagel / README.md
Created July 30, 2018 21:22 — forked from toymachiner62/README.md
Git hook which prevents a commit without a having a link to a TFS work item

Usage - This hook prevents a dev from committing code without having a reference to a tfs work item

Installation. Create a folder in your project root called githooks and save the commit-msg file in there.

The githook can then be installed by symlinking them to your .git/hooks dir.

Run these commands from the project root

$ ln -s ../../githooks/pre-commit .git/hooks/
$ ln -s ../../githooks/commit-msg .git/hooks/
@claudiosteuernagel
claudiosteuernagel / combining-git-repositories.md
Created July 20, 2018 17:54 — forked from msrose/combining-git-repositories.md
How to combine two git repositories.

Combining two git repositories

Use case: You have repository A with remote location rA, and repository B (which may or may not have remote location rB). You want to do one of two things:

  • preserve all commits of both repositories, but replace everything from A with the contents of B, and use rA as your remote location
  • actually combine the two repositories, as if they are two branches that you want to merge, using rA as the remote location

NB: Check out git subtree/git submodule and this Stack Overflow question before going through the steps below. This gist is just a record of how I solved this problem on my own one day.

Before starting, make sure your local and remote repositories are up-to-date with all changes you need. The following steps use the general idea of changing the remote origin and renaming the local master branch of one of the repos in order to combine the two master branches.

@claudiosteuernagel
claudiosteuernagel / IncrementAssemblyVersion.ps1
Created April 10, 2018 19:36 — forked from rosberglinhares/IncrementAssemblyVersion.ps1
Powershell script to increment assembly version
Param (
[Parameter(Mandatory=$true)]
[string] $AssemblyInfoPath
)
$ErrorActionPreference = 'Stop' # Stops executing on error instead of silent continue.
Set-StrictMode -Version Latest # Enforces coding rules in expressions, scripts, and script blocks. Uninitialized variables are not permitted.
$fileContent = Get-Content $AssemblyInfoPath | Out-String
$assemblyVersionCapturePattern = 'AssemblyVersion\("\d+\.\d+\.\d+\.(\d+)"\)'
@claudiosteuernagel
claudiosteuernagel / GetNextAssemblyVersion.ps1
Created April 10, 2018 19:36 — forked from rosberglinhares/GetNextAssemblyVersion.ps1
Powershell script to increment and get the assembly version to be used with the EnvInject Jenkins plugin
Param (
[Parameter(Mandatory=$true)]
[string] $AssemblyInfoPath,
[string] $PropertiesFilePath = 'EnvInjectProperties.txt',
[string] $PropertyName = 'NEXT_VERSION'
)
$ErrorActionPreference = 'Stop' # Stops executing on error instead of silent continue.
Set-StrictMode -Version Latest # Enforces coding rules in expressions, scripts, and script blocks. Uninitialized variables are not permitted.
@claudiosteuernagel
claudiosteuernagel / ChangeAssemblyVersion.ps1
Created April 10, 2018 19:34 — forked from rosberglinhares/ChangeAssemblyVersion.ps1
Powershell script to change assembly and file version
Param (
[Parameter(Mandatory=$true)]
[string[]] $AssemblyInfoFilesPath,
[Parameter(Mandatory=$true)]
[Version] $Version
)
$ErrorActionPreference = 'Stop' # Stops executing on error instead of silent continue.
Set-StrictMode -Version Latest # Enforces coding rules in expressions, scripts, and script blocks. Uninitialized variables are not permitted.
@claudiosteuernagel
claudiosteuernagel / git-update-fork.sh
Created October 25, 2016 16:22 — forked from rdeavila/git-update-fork.sh
Git: como atualizar um fork com as mudanças do original?
#!/bin/bash
# Adicione um novo remote; pode chamá-lo de "upstream":
git remote add upstream https://github.com/usuario/projeto.git
# Obtenha todos os branches deste novo remote,
# como o upstream/master por exemplo:
git fetch upstream