Skip to content

Instantly share code, notes, and snippets.

View asbjornu's full-sized avatar
💭
He's a loathsome offensive brute, yet I can't look away.

Asbjørn Ulsberg asbjornu

💭
He's a loathsome offensive brute, yet I can't look away.
View GitHub Profile
@asbjornu
asbjornu / problematic-liquid-markdown.md
Created June 12, 2020 12:19
Problematic Liquid-Markdown file that causes mrmlnc.vscode-remark to crash

Payment Orders

In order to initialize the Payment Menu, you need to create a Payment Order. The paymentorders resource and how you interact with it is described below.

{% include payment-order-get.md show_status_operations=true %}

Creating a payment order

To create a payment order, you perform a POST request towards the

@asbjornu
asbjornu / unlist-nuget-package.ps1
Last active June 10, 2020 23:26 — forked from dazinator/unlist-packages.ps1
Unlist all versions of a NuGet package
$PackageId = "xxx"
$ApiKey = "yyy"
$json = Invoke-WebRequest -Uri "https://api.nuget.org/v3-flatcontainer/$PackageId/index.json" | ConvertFrom-Json
foreach ($version in $json.versions)
{
Write-Host "Unlisting $PackageId, Ver $version"
Invoke-Expression "dotnet nuget delete $PackageId $version --non-interactive --api-key $ApiKey --source https://api.nuget.org/v3/index.json"
}
@asbjornu
asbjornu / other-features.md
Created May 12, 2020 13:51
Markdown document causing yzhang-gh/vscode-markdown to fail

title: Gift Cards – Other Features sidebar: navigation:

  • title: Gift Cards items:
    • url: /gift-cards/ title: Introduction
    • url: /gift-cards/operations title: Operations
@asbjornu
asbjornu / jekyll_nokogiri_segfault.rb
Created March 18, 2020 23:13
Jekyll Nokogiri segmentation fault
/usr/local/bundle/gems/nokogiri-1.10.9/lib/nokogiri/html/document_fragment.rb:7: [BUG] Segmentation fault at 0x00000000000076c6
ruby 2.6.5p114 (2019-10-01 revision 67812) [x86_64-linux-musl]
jekyll |
-- Control frame information -----------------------------------------------
c:0041 p:---- s:0223 e:000222 CFUNC :new
c:0040 p:0015 s:0219 e:000218 METHOD /usr/local/bundle/gems/nokogiri-1.10.9/lib/nokogiri/html/document_fragment.rb:7
c:0039 p:0038 s:0212 e:000211 METHOD /usr/local/bundle/gems/html-pipeline-2.12.3/lib/html/pipeline.rb:65
c:0038 p:0014 s:0207 e:000206 METHOD /usr/local/bundle/gems/html-pipeline-2.12.3/lib/html/pipeline/filter.rb:108
c:0037 p:0022 s:0202 e:000201 METHOD /usr/local/bundle/gems/html-pipeline-2.12.3/lib/html/pipeline/filter.rb:61
c:0036 p:0004 s:0198 e:000197 METHOD /usr/local/bundle/gems/html-pipeline-2.12.3/lib/html/pipeline/emoji_filter.rb:19
@asbjornu
asbjornu / SwedbankPay_CLA.md
Created September 18, 2019 09:50
Swedbank Pay Individual Contributor License Agreement

Swedbank Pay Individual Contributor License Agreement

Thank you for your interest in contributing to open source software projects (“Projects”) made available by Swedbank Pay or its affiliates (“Swedbank Pay”). This Individual Contributor License Agreement (“Agreement”) sets out the terms governing any source code, object code, bug fixes, configuration changes, tools, specifications, documentation, data, materials, feedback, information or other works of authorship that you submit or have submitted, in any form and in any manner, to Swedbank Pay in respect of any of the Projects (collectively “Contributions”).

Contrary to “Closed Source” software or proprietary software – where a creator maintains exclusive control over his or her source code – “Open Source Software” is software with source code that anyone can inspect, modify, share, learn from and enhance. Outlined below you will find Swedbank Pay Individual Contributor License Agreement under which you as a contributor retain all of your rights, titl

@asbjornu
asbjornu / ChecklistExtension.cs
Created April 24, 2019 10:13
Markdig checklist extension
public class ChecklistExtension : IMarkdownExtension
{
public void Setup(MarkdownPipelineBuilder pipeline)
{
if (pipeline.InlineParsers.Contains<TaskListInlineParser>())
return;
if (pipeline.InlineParsers.Contains<ChecklistInlineParser>())
return;
@asbjornu
asbjornu / soundcloud-no-reposts.js
Created September 24, 2018 07:56
Removes reposts from your SoundCloud stream
// ==UserScript==
// @name SoundCloud No Reposts
// @version 1
// @grant none
// ==/UserScript==
(function repeat() {
var posts = document.getElementsByClassName('soundList__item');
var skip = [];
@asbjornu
asbjornu / thingthangthung.cs
Last active April 22, 2017 23:25 — forked from einarwh/thingthangthung.cs
Object initializer surprise.
void Main()
{
var t = new Thing(new Thang { Thung = "lol" })
{
Thang = { { "OMG" } }
};
t.Dump();
}
public class RecursiveDataAnnotationsValidator : IModelValidator
{
private readonly IModelValidator validator;
public RecursiveDataAnnotationsValidator(IModelValidator innerValidator, Type type)
{
if (innerValidator == null)
throw new ArgumentNullException(nameof(innerValidator));
@asbjornu
asbjornu / configure.sh
Created August 9, 2016 15:29
SchismTracker configure script
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for schismtracker 20160805.
#
#
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
#
#
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.