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 / convert.sh
Last active April 1, 2023 22:48
JSON Resume Themes
#!/usr/bin/env bash
mkdir -p "resumes"
while read -r p; do
sanitized_filename="${p//[^A-Za-z0-9._-]/_}"
logfile="resumes/$sanitized_filename.log"
outputfile="resumes/$sanitized_filename.html"
echo "Converting JSON Resume..."
@asbjornu
asbjornu / wildmag-convert.js
Created November 10, 2020 11:40
WildMag converter
// Converts http://wildmag.de/compo/?order=round to tab separated values logged to the console.
for (const row of document.getElementsByTagName('tr')) {
const cols = row.getElementsByTagName('td');
if (cols.length == 0) {
continue;
}
const roundText = cols.item(0).innerText;
const round = parseInt(roundText, 10);
@asbjornu
asbjornu / Build_1013014149.binlog
Last active October 13, 2020 00:24
configure.cmake
This file has been truncated, but you can view the full file.
@asbjornu
asbjornu / aspnetcore.log
Last active August 5, 2020 22:56
dotnet source build fail
This file has been truncated, but you can view the full file.
warning: No default group of projects was specified, so building the 'managed' and its dependent subset of projects. Run build.sh --help for more details.
warning: Building of NodeJS projects is disabled since node is not detected on Path and no BuildNodeJs or NoBuildNodeJs setting is set explicitly.
warning: Some managed projects depend on NodeJS projects. Building NodeJS is disabled so the managed projects will fallback to using the output from previous builds. The output may not be correct or up to date.
Setting msbuild verbosity to minimal
##vso[task.setvariable variable=Artifacts;isSecret=false;isOutput=true]/private/tmp/dotnet-20200805-31137-10zr0wh/source-build-49195585d0de06e9a06b8fb005c460035363b2af/artifacts/src/aspnetcore.62c098bc170f50feca15916e81cb7f321ffc52ff/artifacts
@asbjornu
asbjornu / cli.nuget.config.patch
Last active August 4, 2020 00:02
Remove internal feeds from the .NET SDK NuGet.config
diff --git a/NuGet.config b/NuGet.config
index 6c5337412..ac976fc23 100644
--- a/NuGet.config
+++ b/NuGet.config
@@ -3,10 +3,6 @@
<!-- Only specify feed for RepoToolset SDK (see https://github.com/Microsoft/msbuild/issues/2982) -->
<packageSources>
<clear />
- <!--Begin: Package sources managed by Dependency Flow automation. Do not edit the sources below.-->
- <add key="darc-int-dotnet-core-setup-3acd9b0" value="https://pkgs.dev.azure.com/dnceng/_packaging/darc-int-dotnet-core-setup-3acd9b0c/nuget/v3/index.json" />
@asbjornu
asbjornu / openapi-to-docs.md
Last active July 13, 2023 22:41
From OpenAPI to Documentation

From OpenAPI to Documentation

We are at a ripe time to formalize our API development process by using OpenAPI as our means to describe the APIs we develop and all changes we want to make to them. This repository holds a description of how that process may look like and will act as a prototype of its initial implementation.

Rationale

We already have a [Developer Portal][developer-portal] in which we have invested

@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