Skip to content

Instantly share code, notes, and snippets.

View jrkd's full-sized avatar
🌈
sleepin'

Jono jrkd

🌈
sleepin'
View GitHub Profile
@TheCakeIsNaOH
TheCakeIsNaOH / override-installdir.ps1
Created June 24, 2020 22:08
Use a packages.config with the chocolatey global directory override.
param(
[parameter(Mandatory=$false, Position=1)][string]$installDir = 'C:\',
[parameter(Mandatory=$false, Position=0)][string]$pkgConfigPath = (Join-Path "$(Split-Path -parent $MyInvocation.MyCommand.Definition)" 'install.config')
)
if (!(Test-Path $installDir)) {
Throw 'did not find override directory'
}
if (!(Test-Path $pkgConfigPath)) {
@JonCole
JonCole / Redis-BestPractices-General.md
Last active April 27, 2024 12:50
Redis Best Practices

Some of the Redis best practices content has moved

This content from this markdown file has moved a new, happier home where it can serve more people. Please check it out : https://docs.microsoft.com/azure/azure-cache-for-redis/cache-best-practices.

NOTE: Client specific guidance listed below is still valid and should still be considered. I will update this document once all content has been moved.

@CDillinger
CDillinger / FuzzyMatch.cs
Last active July 25, 2023 09:17
C# Implementation of Fuzzy Match
// LICENSE
//
// This software is dual-licensed to the public domain and under the following
// license: you are granted a perpetual, irrevocable license to copy, modify,
// publish, and distribute this file as you see fit.
using System;
using System.Collections.Generic;
public static class FuzzyMatcher
@RopoMen
RopoMen / facebook_page_plugin.html
Created July 21, 2015 18:15
Simple way to resize Facebook's new Page plugin
<!--
Width 10000px is quite wide, but it has room for new "max", also because Facebook's "adaptation" means only shrinking
the Page plugin to fit smaller container. To use Page plugin with larger container than 500px (current max.) you could try
to add example Bootstrap class '.center-block' which would center the Page plugin inside larger container.
-->
<div class="row">
<div class="column-xs-6">
<div class="fb-page center-block" data-width="10000" data-adapt-container-width="true" data-href="https://www.facebook.com/facebook"></div>
</div>
</div>
@ChaseFlorell
ChaseFlorell / Deploy-TeamCityBuildToOctopus.ps1
Last active September 5, 2020 08:48
a script for TeamCity to get git commits and pass them along to Octopus Deploy
# credit for getting me going in the right direction
# http://blogs.lessthandot.com/index.php/uncategorized/access-git-commits-during-a-teamcity-build-using-powershell/
# these properties should be entered into your configuration parameters section
$project = "%Octopus.Project%"
$deployTo = "%Octopus.DefaultEnvironment%"
$buildVersion = "%BuildVersion%"
$octopusApiKey = "%Octopus.BuildDeployBot.APIKey%"
$octopusServer = "%Octopus.Server.Url%"
## --------------------------------------------------------------------------------------
## Configuration
## --------------------------------------------------------------------------------------
$ConfirmPreference = "None"
$isEnabled = $OctopusParameters["Octopus.Action.IISWebSite.CreateOrUpdateWebSite"]
if (!$isEnabled -or ![Bool]::Parse($isEnabled))
{
exit 0