Skip to content

Instantly share code, notes, and snippets.

View beatcracker's full-sized avatar
🚝
Blaine the Mono

beatcracker

🚝
Blaine the Mono
View GitHub Profile

5 Stages of Git

1. Denial

Using Mercurial/SVN/Fossil/etc...

2. Anger

Git is awful and hate it's guts:

@beatcracker
beatcracker / repro.cmd
Last active September 14, 2019 11:53
"paket remove" repro
@echo off
setlocal
set paket=.paket\paket.exe
set deps=paket.dependencies
set lock=paket.lock
set type=--type clitool
rem Uncomment this line to use nuget package type
rem set type=
@beatcracker
beatcracker / unlock-feedly-search.user.js
Created May 15, 2017 16:30
Usercript to unlock search in free Feedly version
// ==UserScript==
// @name Feedly: Unlock Search
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Unlock search in free Feedly version. Returns top 3 results.
// @author beatcracker
// @match http*://feedly.com/i/*
// @grant GM_addStyle
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js
// @require https://gist.github.com/raw/2625891/waitForKeyElements.js
@beatcracker
beatcracker / View-Pipeline.ps1
Created February 4, 2017 15:31
Visualizing PowerShell pipeline
<#
.Synopsis
Visualize pipeline lifecycle and Begin/Process/End execution order for chained cmdlets.
.Description
Provides grafical view of the Begin/Process/End blocks execution order for nested pipeline.
.Parameter Pipes
Number of nested pipeleine functions.
# Get-Inventory -Server -IPAddress 1.1.1.1 -Credential (Get-Credential)
# Get-Inventory -Storage -WebServiceEndpoint https://a.b.c -OAuthToken XXXXX
function Get-Inventory
{
[CmdletBinding()]
Param()
DynamicParam
{
@beatcracker
beatcracker / CompareFunctionInfo.ps1
Created February 8, 2016 14:06
Compare function's internal properties (Adv. function vs Adv. function w/ CmdletBinding attribute)
Add-Type -Path .\KellermanSoftware.Compare-NET-Objects.dll
$CompareLogic = New-Object -TypeName KellermanSoftware.CompareNetObjects.CompareLogic
$Config = @{
MaxStructDepth = 999
MaxDifferences = 999
MaxByteArrayDifferences = 999
}
$CompareLogic.Config = $Config
function Use-CmdletBindingWithAdvParam {[CmdletBinding()] Param([Parameter()]$Foo) @{MyInvocation = $MyInvocation ; PSCmdlet = $PSCmdlet}}
@beatcracker
beatcracker / ShlObj.h
Created December 22, 2015 16:28
ShlObj.h from Win10 SDK
/*===========================================================================
Copyright (c) Microsoft Corporation. All rights reserved.
File: shlobj.h
===========================================================================*/
#ifndef _SHLOBJ_H_
#define _SHLOBJ_H_
@beatcracker
beatcracker / Invoke-RawPipeline.ps1
Last active March 28, 2022 21:58
Pipe binary data between processes' Standard Output and Standard Ipput streams. Can read input stream from file and save resulting output stream to file.
<#
.Synopsis
Pipe binary data between processes' Standard Output and Standard Input streams.
Can read input stream from file and save resulting output stream to file.
.Description
Pipe binary data between processes' Standard Output and Standard Input streams.
Can read input stream from file/pipeline and save resulting output stream to file.
Requires PsAsync module: http://psasync.codeplex.com
@beatcracker
beatcracker / SymlinkDirContent.cmd
Last active August 29, 2015 14:20
Creates destination directory where all content is symlinked from the source directory. Uses https://github.com/JDeuce/symlink.bat
rem Wrapper for https://github.com/JDeuce/symlink.bat .
rem Creates destination directory where all content
rem is symlinked from the source directory.
rem Usage: SymlinkDirContent.cmd "x:\source" "x:\destination"
rem Originally created for Windows Authentication install
rem of the http://bonobogitserver.com to avoid creating two
rem identical directories, which differ only by one web.config file.