Skip to content

Instantly share code, notes, and snippets.

View nozzlegear's full-sized avatar
🌸
There is no theory, only the knowing.

Joshua Harms nozzlegear

🌸
There is no theory, only the knowing.
View GitHub Profile
@nozzlegear
nozzlegear / 2021-11-16T01_41_04_076Z-debug.log
Created November 16, 2021 01:48
Full log file for `npm install --save-dev esbuild` on Ubuntu 21.04 with Node v16
0 verbose cli [
0 verbose cli '/snap/node/5534/bin/node',
0 verbose cli '/snap/node/5534/bin/npm',
0 verbose cli 'install',
0 verbose cli '--save-dev',
0 verbose cli 'esbuild'
0 verbose cli ]
1 info using [email protected]
2 info using [email protected]
3 timing npm:load:whichnode Completed in 1ms
@nozzlegear
nozzlegear / Azure_Function_Logs.log
Created October 9, 2017 00:18
My Azure Function app is showing errors at startup when running an F# net461 function in Beta mode.
2017-10-09T00:15:45 Welcome, you are now connected to log-streaming service.
2017-10-09T00:16:45 No new trace in the past 1 min(s).
2017-10-09T00:16:56.056 Function started (Id=924e28d7-e342-41ad-a7ce-be2a6f6c6f8c)
2017-10-09T00:16:56.300 Exception during runtime resolution of assembly 'Hopac, Version=0.3.23.0, Culture=neutral, PublicKeyToken=null': 'System.InvalidCastException: [A]System.AppDomain cannot be cast to [B]System.AppDomain. Type A originates from 'System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' in the context 'Default' at location 'D:\Program Files (x86)\dotnet\shared\Microsoft.NETCore.App\2.0.0\System.Private.CoreLib.dll'. Type B originates from 'System.Runtime.Extensions, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' in the context 'Default' at location 'D:\Program Files (x86)\dotnet\shared\Microsoft.NETCore.App\2.0.0\System.Runtime.Extensions.dll'.
at Microsoft.Azure.WebJobs.Script.Description.FunctionAssemblyLoader.ResolveAs
@nozzlegear
nozzlegear / example.cs
Created July 21, 2017 15:39
Convert MVC5's QueryString to a List<KeyValuePair<string, StringValues>> needed by ShopifySharp's auth service.
namespace MyNamespace
{
public static class Extensions
{
public List<KeyValuePair<string, StringValues>> ToKvps(this System.Collections.Specialized.NameValueCollection qs)
{
Dictionary<string, string> parameters = qs.Keys.Cast<string>().ToDictionary(key => key, value => qs[value]);
var kvps = new List<KeyValuePair<string, StringValues>>();
parameters.ToList().ForEach(x =>
@nozzlegear
nozzlegear / boxstarter.ps1
Last active May 14, 2017 17:06
My Boxstarter script for new Windows installs.
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions
cinst fiddler4
cinst googlechrome
cinst docker-for-windows
cinst 7zip
cinst firefox
cinst nimbletext
cinst dotnetcore
cinst nodejs.install
@nozzlegear
nozzlegear / njsonschema-to-typescript-interface.Program.cs
Created May 5, 2017 20:50
This is a quick gist to document how I turned a few C# classes into TypeScript interfaces with NJSonSchema. I ended up replacing this program with Dogma (https://github.com/nozzlegear/dogma).
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text.RegularExpressions;
using KMSignalR.Schemas;
using Microsoft.Extensions.CommandLineUtils;
using NJsonSchema;
using NJsonSchema.CodeGeneration;
using NJsonSchema.CodeGeneration.TypeScript;
@nozzlegear
nozzlegear / my-domain.com.conf
Created May 3, 2017 19:17
Let's Encrypt domain configuration file.
# Just one single domain.
domains = my-domain.com
# Key size.
rsa-key-size = 4096 # Or 2048
# The current version of Let's Encrypt (as of May 3, 2017) is using this server.
server = https://acme-v01.api.letsencrypt.org/directory
# This email address will receive renewal reminders.
# setting a new alias
git config --global --add alias.lol "log --graph --decorate --pretty=oneline --abbrev-commit --all"
# using the new alias
git lol
@nozzlegear
nozzlegear / createswap.sh
Created December 19, 2016 16:00 — forked from rickyhewitt/createswap.sh
Quick and easy script to setup swap
#!/bin/sh
# createswap.sh
# creates swap file.
# Optionally specify size (e.g. 1024M)
#
# <[email protected]>
if [ $1 ]; then
SWAP_SIZE=$1
else
@nozzlegear
nozzlegear / shopify-limits.cs
Created July 20, 2016 18:38
A quick example for handling Shopify's API request limit with ShopifySharp.
public async Task MyMethod(List<ShopifyOrder> orders)
{
foreach (var order in listOfOrders)
{
var index = listOfOrders.IndexOf(order);
// If this order is not the first, wait for .5 seconds (an average of 2 calls per second).
if (index > 0)
{
await Task.Delay(500);

Keybase proof

I hereby claim:

  • I am nozzlegear on github.
  • I am nozzlegear (https://keybase.io/nozzlegear) on keybase.
  • I have a public key ASDJWgSJ7zYspTsNj4-ljHsPwDHnxReRLZ4COoeHR_CLEwo

To claim this, I am signing this object: