Skip to content

Instantly share code, notes, and snippets.

View joelverhagen's full-sized avatar

Joel Verhagen joelverhagen

View GitHub Profile
dotnet run -- restore C:\Users\jver\Desktop\Test\dotnetnew5 --verbosity minimal
log : Restoring packages for C:\Users\jver\Desktop\Test\dotnetnew5\project.json...
log : Installing System.Text.Encoding 4.0.0.
log : Installing Microsoft.NETCore.Targets.DNXCore 5.0.0-rc2-23704.
log : Installing Microsoft.NETCore.Windows.ApiSets 1.0.1-rc2-23704.
log : Installing System.IO 4.0.0.
log : Installing System.Reflection.Primitives 4.0.0.
log : Installing Microsoft.NETCore.Targets 1.0.1-rc2-23704.
log : Installing Microsoft.NETCore.Runtime.CoreCLR 1.0.1-rc2-23704.
<script src="https://gist.github.com/joelverhagen/1850654.js"></script>
@joelverhagen
joelverhagen / screenshot.png
Last active February 12, 2016 22:05
Better NuGet GUI Error
screenshot.png
@joelverhagen
joelverhagen / oauth_quirks.md
Created September 16, 2012 04:47
Quirks with various common OAuth providers

OAuth Quirks:

People just can't agree on things. Google and Facebook are doing the best, with OAuth 2.0 (and following the standards pretty well). Here is a list of various common OAuth providers that I've worked with... and found some little problems with.

GitHub

  • user_denied instead of access_denied

This is an email I got concerning this issue.

Keybase proof

I hereby claim:

  • I am joelverhagen on github.
  • I am joelverhagen (https://keybase.io/joelverhagen) on keybase.
  • I have a public key whose fingerprint is 118C 6DDC 8F74 9972 8C1F 8C12 614B F64D 61B1 0094

To claim this, I am signing this object:

@joelverhagen
joelverhagen / flask_login_basic_auth.py
Created September 13, 2012 12:02
HTTP Basic Authorization with Flask and Flask-Login
# Flask, http://flask.pocoo.org/
# Flask-Login, https://github.com/maxcountryman/flask-login
@app.before_request
def basic_authorize():
auth = request.authorization
if not current_user.is_active() and auth and auth.type == 'basic':
# change to your specific call to get the user based off username and password
# you're hopefully bcrypting your password, so fetch by username then check password :)
user = User.get_login_user(unicode(auth.username), unicode(auth.password))
@joelverhagen
joelverhagen / Program.cs
Created October 27, 2017 20:23
Determine package size using NuGet V3 API
using System;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
using NuGet.Common;
using NuGet.Frameworks;
using NuGet.Packaging.Core;
using NuGet.Protocol;
using NuGet.Protocol.Core.Types;
using NuGet.Versioning;
@joelverhagen
joelverhagen / gist:fde5a70d672620128da07c4a963c8ad4
Created November 8, 2017 23:05
NuGet.org package IDs ending in digits
1.0 1.0.0
1.0.0 1.0.0
1.0.0.0 1.0.0
1.0.10 1.0.30
1.0.2.3 1.0.2.3
1.0.2.4 1.0.2.4
1.1 1.0.0
1.111 1.111.0
5.0.0.0 5.0.0
Aalmaram.4.0 2.0.0
@joelverhagen
joelverhagen / FindLatestNuGetVersion.ps1
Last active November 10, 2017 02:17
Latest version of a NuGet package in PowerShell
# See: https://docs.microsoft.com/en-us/nuget/api/service-index
$serviceIndex = Invoke-RestMethod "https://api.nuget.org/v3/index.json"
$searchUrl = $serviceIndex.resources `
| ? { ($_ | Select -ExpandProperty "@type") -eq "SearchQueryService" } `
| % { $_ | Select -ExpandProperty "@id" } `
| Select-Object -First 1
$packageId = "NuGet.Versioning"
$includePrerelease = $true
@joelverhagen
joelverhagen / Output.md
Last active November 23, 2017 06:38
Demonstrate the case sensitivity properties of different NuGet.org components
Area A ?? B Out A Out B
Azure Blob Storage I != i
Azure Blob Storage ı != i
Azure Blob Storage ı != I
Azure Blob Storage İ != i
Azure Blob Storage İ != I
Azure Blob Storage İ != ı
Lucene LowerCaseFilter I == i
Lucene LowerCaseFilter ı != i