Skip to content

Instantly share code, notes, and snippets.

View jpsullivan's full-sized avatar

Josh Sullivan jpsullivan

  • Microsoft
  • Virginia
View GitHub Profile
@Ivanca
Ivanca / userscript-rewind-commands-for-ultimate-guitar-web-player.js
Last active January 9, 2023 15:22
Userscript: Rewind Commands For Ultimate-guitar Web Player
// ==UserScript==
// @name Rewind Commands For Ultimate-guitar Web Player
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Use Enter Key to Rewind, twice for current section, great to use with a USB Pedal
// @author Ivan Castellanos
// @match https://tabs.ultimate-guitar.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=ultimate-guitar.com
// @grant none
// ==/UserScript==
@ziadoz
ziadoz / extract-vmdk.sh
Last active January 12, 2024 11:20
Extract VMDK Disk Image on macOS
#!/usr/bin/env bash
# Unzip Vagrant .box file:
tar -xf <box> -C <destination>
# Install 7 Zip:
brew install p7zip
# Extract VMDK:
7z x -y -o<destination> <vmdk>

Various search databases and backends as alternatives to Elasticsearch.

Rust

@kidchenko
kidchenko / 201704121800_CreateAspNetCoreIdentity.cs
Created April 24, 2017 23:10
ASP .NET Identity Core + FluentMigrator
Create.Table("AspNetRoles")
.WithColumn("Id").AsString().PrimaryKey("PK_AspNetRoles").NotNullable()
.WithColumn("ConcurrencyStamp").AsString().Nullable()
.WithColumn("Name").AsString(256).NotNullable()
.WithColumn("NormalizedName").AsString(256).Nullable()
.Indexed("RoleNameIndex");
Create.Table("AspNetUserTokens")
.WithColumn("UserId").AsString().PrimaryKey("PK_AspNetUserTokens").NotNullable()
@maartenba
maartenba / DomainTemplateRoute - GetVirtualPath
Last active May 15, 2023 07:30
ASP.NET MVC 6 / ASP.NET 5 Domain Routing + Tenant Middleware
public string GetVirtualPath(VirtualPathContext context)
{
foreach (var matcherParameter in _matcher.Template.Parameters)
{
context.Values.Remove(matcherParameter.Name); // make sure none of the domain-placeholders are appended as query string parameters
}
return _innerRoute.GetVirtualPath(context);
}
@davidfowl
davidfowl / dotnetlayout.md
Last active July 22, 2024 09:49
.NET project structure
$/
  artifacts/
  build/
  docs/
  lib/
  packages/
  samples/
  src/
 tests/
@Chaser324
Chaser324 / GitHub-Forking.md
Last active July 22, 2024 14:45
GitHub Standard Fork & Pull Request Workflow

Whether you're trying to give back to the open source community or collaborating on your own projects, knowing how to properly fork and generate pull requests is essential. Unfortunately, it's quite easy to make mistakes or not know what you should do when you're initially learning the process. I know that I certainly had considerable initial trouble with it, and I found a lot of the information on GitHub and around the internet to be rather piecemeal and incomplete - part of the process described here, another there, common hangups in a different place, and so on.

In an attempt to coallate this information for myself and others, this short tutorial is what I've found to be fairly standard procedure for creating a fork, doing your work, issuing a pull request, and merging that pull request back into the original project.

Creating a Fork

Just head over to the GitHub page and click the "Fork" button. It's just that simple. Once you've done that, you can use your favorite git client to clone your repo or j

anonymous
anonymous / gist:11201010
Created April 23, 2014 02:32
using Microsoft.Xna.Framework;
using Monocle;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace TowerFall
{
public class PlayerHair : Component
@droyad
droyad / gist:8292852
Created January 7, 2014 00:54
Add to Glimpse Timeline
using (Timeline.Capture("FormulaEvaluator.Evalauate"))
{
// Code to time
}
public static class Timeline
{
public static IDisposable Capture(string eventName)
{
#pragma warning disable 618
@jongalloway
jongalloway / PcRepave.cmd
Last active February 23, 2023 18:02
Chocolatey list generated using: choco list --localonly --idonly
@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
choco feature enable -n allowGlobalConfirmation
choco install 7zip /y
choco install 7zip.install /y
choco install ARMClient /y
choco install audacity /y
choco install audacity-lame /y
choco install autohotkey /y
choco install autohotkey.install /y