Skip to content

Instantly share code, notes, and snippets.

@jayrgee
jayrgee / running-process-as-a-different-user-on-windows.md
Last active July 17, 2021 03:18
Running Process As A Different User On Windows

Running Process As A Different User On Windows

https://blog.simontimms.com/2015/09/02/running-process-as-a-different-user-on-windows/

As part of a build pipeline I’m working on the octopus deploy process needs to talk to the database using roundhouse as a different user from the one running the deployment. This is done because the database uses integrated AD authentication, which I quite like. If this build were running on Linux then it would be as simple as editing the sudoers file and calling the command using sudo. Unfortunatly this is Windows and the command line has long been a secondary concern.

I started by asking on the western devs slack channel to see if anybody else had done this and how. Dave Paquette suggested using psexec. This is a tool designed for running commands on a remote computer but if you leave the computer name off it will run on the local machine. This sounded perfect.

However I had a great deal of trouble gettin

@-moz-document url-prefix("https://www.websynths.com/grooves") {
:root {
--my-color: red;
}
.padName {
font-size: larger;
overflow-wrap: break-word;
}
@jayrgee
jayrgee / funklet.html
Last active June 15, 2021 00:19
funklet
<p>funklet 1</p>
<input id="params_1" style="width:100%;" type="text" value="vals=10011001100110011001100110011001;00000000000000000000000000000000;00000000000000000000000000000000&mods=&b=60&s=3&jd=0,0,0&r=1,1,1&a=000" >
<iframe id="funklet_1" style="height:250px; width:100%" src="https://machine.funklet.com/funklet.html?vals=10011001100110011001100110011001;00000000000000000000000000000000;00000000000000000000000000000000&mods=&b=60&s=3&jd=0,0,0&r=1,1,1&a=000"></iframe>
<p>funklet 2</p>
<input id="params_2" style="width:100%;" type="text" >
<iframe id="funklet_2" style="height:250px; width:100%" src="https://machine.funklet.com/funklet.html"></iframe>
@jayrgee
jayrgee / c6-lap-steel-tuning.md
Created February 6, 2020 08:37
C6 lap steel tuning

https://www.youtube.com/watch?v=W3t_4lzj-ao&lc=UgyYozpg5aG28nRHQ9h4AaABAg.8aCaq8PRnwo8aGHw33PzTJ

The Steel Guitar Forum 2 years ago (edited) I don't do videos, Joe, so I'll describe the method in text.

First, measure the distance from the nut to the 12th fret. DOUBLE IT. That's your scale length - the correct distance from nut to bridge. Set ALL of your adjustable saddles to be that far from the nut.

Now, get a C note from somewhere. Tune your 6th string up to it. Then turn the tuner just a little bit more, so that it almost sounds sharp of your reference note. If you're using a clip-on tuner, tune that C note one notch sharp. Put the tuner away now.

@jayrgee
jayrgee / User.cs
Created October 5, 2019 01:26
C# UserBase class
using System.ComponentModel.DataAnnotations;
namespace Mvc4DotNet4.Models
{
public abstract class UserBase
{
[Display(Name = "User Name")]
public string Name { get; set; }
public abstract string Team { get; set; }
}
@jayrgee
jayrgee / modRegexReplace.bas
Last active September 26, 2019 15:15
Excel modRegexReplace
Attribute VB_Name = "modRegexReplace"
Option Explicit
Function RemoveEmails(ByVal ref As String)
'declare variable to hold cell value
Dim cellValue As Variant
'get cell value with Range.Value property and assign it to variable
cellValue = ThisWorkbook.Sheets(ActiveSheet.Name).range(ref).Value
@jayrgee
jayrgee / parcel-jest.md
Last active June 30, 2019 21:54
parcel with jest