Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
I may be slow to respond.

Nate McMaster natemcmaster

💭
I may be slow to respond.
View GitHub Profile
@blowdart
blowdart / UpdateIISExpressSSLForChome.ps1
Last active Sep 21, 2019
IIS Express certs (for now) don't contain SAN strings. This makes Chrome unhappy. Make Chrome happy again with a new organic, artisanal, gluten free HTTPS certificate.
View UpdateIISExpressSSLForChome.ps1
# Create a new self signed HTTPS Certificate for IIS Express
# Crafted with all organic, GMO, gluten free ingreditations
# with an artisinal SAN to make Chrome 58 onwards happy.
#
# See https://bugs.chromium.org/p/chromium/issues/detail?id=308330
#
# Run this at an administrative PowerShell prompt.
#
# You will be prompted to trust a new certificate via a windows dialog.
# Click yes otherwise Visual Studio will not be able to determine your
@davidfowl
davidfowl / Example1.cs
Last active Oct 12, 2020
How .NET Standard relates to .NET Platforms
View Example1.cs
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)
@skratchdot
skratchdot / hash_dir.sh
Created Dec 9, 2015
Get the shasum hash of an entire directory (recursively)
View hash_dir.sh
#!/bin/sh
find ./src -type f -print0 | sort -z | xargs -0 shasum | shasum
@dgoguerra
dgoguerra / p4merge-git-tool.md
Last active Nov 4, 2020
Setup p4merge as difftool and mergetool on Windows
View p4merge-git-tool.md

Setting up p4merge as diff and merge tool on Windows. Tried for Git version 1.8.4.msysgit.0.

Two alternatives are explained: using the command line, and directly editing the config file.

Setting up from the command line

Being the installation path "C:Program Files\Perforce\p4merge.exe", just run:

$ git config --global diff.tool p4merge
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active Nov 24, 2020
A badass list of frontend development resources I collected over time.
View frontendDevlopmentBookmarks.md
@micahasmith
micahasmith / process-async-await.cs
Created Mar 4, 2013
.NET Process via Async/Await
View process-async-await.cs
public class Runner
{
public async Task<RunResults> Run(ProcessStartInfo info)
{
var process = new Process();
var runResults = new RunResults();
//some defaults that HAVE to be in place
info.RedirectStandardOutput = true;
info.RedirectStandardError = true;
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active Nov 23, 2020
OS X Screencast to animated GIF
View GIF-Screencast-OSX.md

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@michaelcox
michaelcox / xdr.js
Created May 10, 2012
Adds XDomainRequest IE CORS support to jQuery
View xdr.js
// Based on https://github.com/jaubourg/ajaxHooks/blob/master/src/ajax/xdr.js
(function( jQuery ) {
if ( window.XDomainRequest && !jQuery.support.cors ) {
jQuery.ajaxTransport(function( s ) {
if ( s.crossDomain && s.async ) {
if ( s.timeout ) {
s.xdrTimeout = s.timeout;
delete s.timeout;
@henrik242
henrik242 / p4merge
Last active Sep 28, 2020
Helper script for p4merge and Git on MacOSX
View p4merge
#!/bin/bash
for arg; do [[ $arg = /* ]] || arg=$PWD/$arg; absargs+=("$arg"); done;
/Applications/P4Merge.app/Contents/Resources/launchp4merge "${absargs[@]}"
You can’t perform that action at this time.