Skip to content

Instantly share code, notes, and snippets.

View PolarbearDK's full-sized avatar
:octocat:
Working as freelance consultant.

Philip Hoppe PolarbearDK

:octocat:
Working as freelance consultant.
  • Independent consultant
  • Denmark
View GitHub Profile

Rebase! Not Merge

Git a-la Philip


Git er et værktøj i udvikler værktøjskassen på lige linie med IDE og compilers.

Det er noget man skal sætte sig ind i og blive god til.

@PolarbearDK
PolarbearDK / git flows
Last active January 21, 2022 07:22
Common patterns with git
-- Fetch and update master branch
$ git fetch
$ git checkout master
$ git pull
or
$ git checkout -B master origin/master
-- Create branch and checkout (usually from from develop or master)
git checkout -b FOO-XXX_SomeMessage
@PolarbearDK
PolarbearDK / GaragePortAutomationWithTimer.groovy
Created October 3, 2020 16:21
Garage port automation with close timer
/**
* Garage port automation with timer
*
* Copyright 2020 Philip Hoppe
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at:
*
* http://www.apache.org/licenses/LICENSE-2.0
*
$GitRoot = "c:\Development"
Write-Host "Hello master." -ForegroundColor Magenta
function cd-apex { set-location "$GitRoot\Schultz.Apex" }
function cd-apexsearch { set-location "$GitRoot\Schultz.Apex\src\fasit-search\Fasit.Search.FrontendService\ClientApp" }
function cd-apexui { set-location "$GitRoot\Schultz.Apex\src\fasit-ui\shared-components" }
function cd-fasit { set-location "$GitRoot\Schultz.Fasit" }
function cd-fasit-jobcenter { set-location "$GitRoot\Schultz.Apex\src\clients\jobcenter-desktop\jobcenter-desktop-frontend" }
@PolarbearDK
PolarbearDK / RemovePackageRestore.ps1
Last active August 2, 2016 13:57
Remove NuGet package restore from project files.
param(
[Parameter(Mandatory=$true)]
[string]$solutionDirectory
)
Set-StrictMode -Version latest
$ErrorActionPreference = "Stop"
function Load-File ([string]$FilePath){
Write-Verbose "Reading content of $FilePath"
@PolarbearDK
PolarbearDK / Sync-Folder.ps1
Last active December 16, 2015 09:58
Powershell function to syncronize a source forlder to a target folder with options for excluding specific files and/or folders.
<#
.SYNOPSIS
Syncronize source folder to target folder
.DESCRIPTION
Check source folder against target folder, and updates files and folders in target.
.PARAMETER SourceFolder
The source folder for the syncronization.
.PARAMETER TargetFolder
The target folder for the syncronization.
.PARAMETER ExcludeName
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text.RegularExpressions;
using System.Xml.Serialization;
using NUnit.Framework;
namespace UnitTests
{
using System;
using System.Collections.Concurrent;
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Threading.Tasks;
using log4net;
namespace MyNamespace
{
/// <summary>
@PolarbearDK
PolarbearDK / Convert-Excel-To-Csv.ps1
Created September 10, 2014 10:55
Convert XLS to CSV file without having Excel installed.
# Converter use https://code.google.com/p/excellibrary/ to read cells.
# Place .DLL in same folder as this script.
param (
[parameter(Mandatory=$false)]
[alias("source")]
[alias("src")]
[string]$ExcelFileName,
[parameter(Mandatory=$false)]
[alias("destination")]
USE TrioStaging
GO
DECLARE @HHTBatchQueueId INT = 576601;
SELECT *
FROM [HHTBatchQueue]
WHERE HHTBatchQueueId = @HHTBatchQueueId;
SELECT *