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 / cryptojs.html
Created October 28, 2024 14:58 — forked from xeoncross/cryptojs.html
Simple AES-256 password-based encryption using the CryptoJS Javascript library.
<!doctype html>
<html>
<head>
<meta charset="utf-8"/>
<title></title>
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link rel="stylesheet" media="all" href=""/>
@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
##vso[task.setvariable variable=Artifacts.Toolset;isSecret=false;isOutput=true]/private/tmp/dotnet-20200805-31137-10zr0wh/source-build-49195585d0de06e9a06b8fb005c460035363b2af/artifacts/src/aspnetc
@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