Skip to content

Instantly share code, notes, and snippets.

View gep13's full-sized avatar

Gary Ewan Park gep13

View GitHub Profile
@nguerrera
nguerrera / gitconfig.ini
Created March 6, 2018 18:46
Git config to prevent pushing to unwanted places
; safety net to enforce fork -> upstream flow
[url "Don't push here. Fork and send PR."]
pushinsteadof = https://github.com/dotnet/
pushinsteadof = https://github.com/microsoft/
@patriksvensson
patriksvensson / version.cake
Created February 13, 2018 08:40
Poor man's alternative to GitVersion
public static class CakeVersion
{
public static string Calculate(ICakeContext context)
{
var branch = GetBranch(context);
if(string.IsNullOrWhiteSpace(branch)) {
throw new InvalidOperationException("Could not retrieve branch from Git.");
}
var tag = GetTag(context);
@flcdrg
flcdrg / moderation.md
Last active March 22, 2025 11:03
Chocolatey Moderation

Please resolve these to allow this package to be approved:

  • tools\VERIFICATION.txt should contain instructions on how the user can independently verify that the embedded file is the same as available for download from the original site.
  • tools\LICENSE.txt should contain the text of the software license. This must also permit redistribution for the software to be embedded in the package.
  • Remove tools\chocolateybeforemodify.ps1 as it isn't being used
  • Remove tools\LICENSE.txt and tools\VERIFICATION.txt as they are only required when embedding files in the package
  • If you are the software author, please confirm that via a comment here. Alternatively, if you are not the software author, put your own name in the owners field.
  • Remove the file ReadMe.md
  • Remove the file update.ps1
  • Add minimum version numbers for package dependencies
@jrgcubano
jrgcubano / build.cake
Last active December 23, 2017 20:20
build.cake ASCII Colored Logo
/// Start Colors.Net
/// paste code to because the original libray is using NetStandard 2.0
/// https://github.com/ahmelsayed/Colors.Net
public static class StringStaticMethods
{
public static string Black(string value)
{
var color = Data.ConsoleColorToUnicode[ConsoleColor.Black];
return $"{color}{value}{color}";
}
@adamralph
adamralph / search-package-usage.linq
Last active November 10, 2017 10:03
A LINQPad script to search GitHub repos for package usage (and potentially other things)
<Query Kind="Statements">
<NuGetReference>Humanizer</NuGetReference>
<NuGetReference>Octokit</NuGetReference>
<Namespace>Humanizer</Namespace>
<Namespace>Octokit</Namespace>
<Namespace>Octokit.Internal</Namespace>
<Namespace>System.Threading.Tasks</Namespace>
</Query>
// I wrote this script to help me find out where my NuGet packages are being used.
@ian-noble
ian-noble / boxstarter-full-win10.ps1
Last active October 23, 2022 16:31
Boxstarter - Full - Windows 10
<#
.SYNOPSIS
BoxStarter script to configure Windows 10 development PC.
.DESCRIPTION
Install BoxStarter:
. { Invoke-WebRequest -useb http://boxstarter.org/bootstrapper.ps1 } | Invoke-Expression; get-boxstarter -Force
Run by calling the following from an **elevated** command-prompt.
Remove -DisableReboots parameter to allow the script to reboot as required.
@jessfraz
jessfraz / boxstarter.ps1
Last active March 4, 2025 09:17
Boxstarter Commands for a new Windows box.
# Description: Boxstarter Script
# Author: Jess Frazelle <[email protected]>
# Last Updated: 2017-09-11
#
# Install boxstarter:
# . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force
#
# You might need to set: Set-ExecutionPolicy RemoteSigned
#
# Run this boxstarter by calling the following from an **elevated** command-prompt:
@bjorkstromm
bjorkstromm / Cake-omnisharp-bakery.md
Last active October 17, 2017 19:30
Setting up Cake OmniSharp Bakery
  1. Clone Omnisharp Roslyn and build that
git clone https://github.com/cake-build/omnisharp-roslyn

cd omnisharp-roslyn

git checkout feature/cake

.\build.ps1 -Target Quick
@AdmiringWorm
AdmiringWorm / chocolateyEnvironmentVars.md
Last active April 3, 2022 18:46
Environment variables set when powershell script is running through choco

Environment variables set when powershell script is running through choco

NOTE: All of the following variables need to be prefixed with $env:

  • CHOCOLATEY_VERSION: 0.10.3.0
  • CHOCOLATEY_VERSION_PRODUCT: 0.10.3 (EXPERIMENTAL)
  • ChocolateyForce - $true if the user passed --force when installing, otherwise not set
  • ChocolateyInstall - Set to the path where choco is installed.
  • chocolateyInstallArguments - The extra arguments the user have passed to the installer (EXPERIMENTAL)
  • chocolateyInstallOverride - $true if the user passed --notsilent (EXPERIMENTAL)
  • ChocolateyPackageFolder - The path to where the package content is cached
@rahilwazir
rahilwazir / vmdk_vhdx.md
Last active April 16, 2025 07:49
Convert VMWare to Hyper-V (vmdk to vhdx)