Skip to content

Instantly share code, notes, and snippets.

@jrotello
jrotello / AddResharperToggle.ps1
Last active June 22, 2022 11:45
Script to add a toolbar and button for toggling the suspended state of ReSharper.
$cmdbar_name = 'ReSharper (Custom)'
$ctrl_caption = 'Toggle ReSharper'
$cmdbar = $DTE.CommandBars[$cmdbar_name]
if (-not $cmdbar) {
Write-Host "Creating '$cmdbar_name' toolbar..."
$cmdbar = $DTE.Commands.AddCommandBar($cmdbar_name, [EnvDTE.vsCommandBarType]::vsCommandBarTypeToolbar)
}
if (-not ($cmdbar.Controls | Where-Object Caption -eq $ctrl_caption)) {
@jrotello
jrotello / README.md
Last active January 5, 2021 13:07
Scripts for automating a Let's Encrypt certificate on a Ubiquiti CloudKey

Usage

@jessfraz
jessfraz / boxstarter.ps1
Last active April 11, 2024 16:02
Boxstarter Commands for a new Windows box.
# Description: Boxstarter Script
# Author: Jess Frazelle <jess@linux.com>
# 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:
@ageis
ageis / YubiKey-GPG-SSH-guide.md
Last active May 20, 2024 09:52
Technical guide for using YubiKey series 4 for GPG and SSH

YubiKey 4 series GPG and SSH setup guide

Written for fairly adept technical users, preferably of Debian GNU/Linux, not for absolute beginners.

You'll probably be working with a single smartcard, so you'll want only one primary key (1. Sign & Certify) and two associated subkeys (2. Encrypt, 3. Authenticate). I've published a Bash function which automates this slightly special key generation process.

@jrotello
jrotello / .gitignore
Last active September 25, 2019 09:18
Side load Team Foundation Server Power Tools 2015 without the need to have Visual Studio 2015 installed
work/
InstallUtil.InstallLog
@jrotello
jrotello / SetOfficeSigningTimestampServer.reg
Created July 23, 2017 06:05
Registry settings to enable timestamps for document signatures in Office 2016
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\Common\Signatures]
"XAdESLevel"=dword:00000002
"MinXAdESLevel"=dword:00000002
"TSALocation"="http://timestamp.comodoca.com"
@jrotello
jrotello / deploy-unifi-cert.sh
Created March 14, 2017 03:30
Deploy dehydrated generated certificate to Unifi controller
#!/bin/bash
# Setup your Domain
DOMAIN="<domain_name_here>"
DEHYDRATED_CERTS="/home/dehydrated/certs/$DOMAIN"
# Stop the services
echo "Stopping services..."
service nginx stop
service unifi stop
@bluedoors
bluedoors / ACMESharpAzureDNS.ps1
Last active January 6, 2017 05:21 — forked from animetauren/ACMESharpAzureDNS.ps1
ACMESharp DNS Challenge with Azure DNS
#Deal with the challenge for each SAN
$i=0
foreach ($subDomain in $domains) {
$i++
$alias = 'dns' + $i
New-ACMEIdentifier -Dns $subDomain -Alias $alias
$completedChallenge = Complete-ACMEChallenge $alias -ChallengeType dns-01 -Handler manual
$dnsRRName = ($completedChallenge.Challenges | Where-Object {$_.Type -eq "dns-01"}).Challenge.RecordName
$dnsRRName = $dnsRRName.TrimEnd(".example.com")
$dnsRRValue = ($completedChallenge.Challenges | Where-Object {$_.Type -eq "dns-01"}).Challenge.RecordValue
@davidfowl
davidfowl / Example1.cs
Last active March 28, 2024 20:36
How .NET Standard relates to .NET Platforms
namespace Analogy
{
/// <summary>
/// This example shows that a library that needs access to target .NET Standard 1.3
/// can only access APIs available in that .NET Standard. Even though similar the APIs exist on .NET
/// Framework 4.5, it implements a version of .NET Standard that isn't compatible with the library.
/// </summary>INetCoreApp10
class Example1
{
public void Net45Application(INetFramework45 platform)
@a-dma
a-dma / yubitouch.sh
Last active March 10, 2022 14:43
Bash script for setting or clearing touch requirements for cryptographic operations in the OpenPGP application on a YubiKey 4.
#!/bin/bash
# Bash script for setting or clearing touch requirements for
# cryptographic operations the OpenPGP application on a YubiKey 4.
#
# Author: Alessio Di Mauro <alessio@yubico.com>
GCA=$(which gpg-connect-agent)
DO=0
UIF=0