Skip to content

Instantly share code, notes, and snippets.

@larsw
larsw / Dockerfile
Created September 19, 2023 11:58
bun:alpine Dockerfile
# based on https://github.com/oven-sh/bun/issues/5545
FROM alpine
RUN apk --no-cache add ca-certificates wget && \
wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub && \
wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.28-r0/glibc-2.28-r0.apk && \
wget https://github.com/oven-sh/bun/releases/download/bun-v1.0.2/bun-linux-x64.zip && \
apk add --no-cache --force-overwrite glibc-2.28-r0.apk && \
apk del wget && \
@larsw
larsw / scores.txt
Created November 25, 2021 19:10
scores
MjkyMzMz
MTkyMzMz
MDkyMzMz
NzkyMzMz
NjkyMzMz
NTkyMzMz
NDkyMzMz
OzkyMzMz
OjkyMzMz
MjM5MjMzMw==
@larsw
larsw / kladd.txt
Created December 4, 2020 08:22
kladd.txt fra privat.7z i luke 3 av NPST-kalenderen
🛷🛷🛷🛷🛷🛷🛷🛷 N4Igzg9grgTgxgUwMIQCYJALhAZQKIAqBABDAIwA0xADAB5kA6AdgGo4DSAkgGInlXlm+IqWpUAbAE4h7AEqcWo5gAkA8gAV1NWgCYEzZgAsAtsczMAdABEAggRvaALI4p1xAVle0ECLwA4Adi8AI3F-MTpUSjpHXzoAQy9HRMiAMy9JVMtbe214iNp3VC8AnS94sro-AGYMuNpJTzoEJtpUAtQwhJSGnWy7BzoA+tS4ENq6auCQ9Lp3aO9phPqEYqrK+jG6HUcDJnUAGQBVHBxRAUYmDnlFGGoZG6Urwj4xbQDgh4UngiPZYjAAE9UAAHCAAGwQTGYhxOZzuFy+t3u0KuBA06j2QNBEKh5meInILiewj4ZE8pEuzG4nAAcrTiCZjMwABp4A4HPD-GBlUh9Al8Cl0KlMCDGADWADdVvjOfDqswDjYcHxdkw2RyuaRaqQ1YrOOw+QIFUwAEJqTTEMFgAAu4KgqAAllBmVc5N8YCbYadzqR3CoMcQxVLVntrXaHc6zEIXr6iTHCZRKf6mLJCH89swQBQQI6mCCoDasCAyKVJPFgnBqqkpn5JI5quJxMEdAF4qka3B5sEyKh2u1EHBm2RJJJgn50KkAtQ4JIdKgdO5hhUdH4fGQaj4PDsQABfIA
@larsw
larsw / fetch_token.sh
Last active May 24, 2020 17:58
Script for fetching access tokens from keycloak
#!/bin/sh
set -e
HOST="host"
PORT="8080"
REALM="master"
TOKEN_ENDPOINT="http://$HOST:$PORT/auth/realms/$REALM/protocol/openid-connect/token"
CLIENT_ID="TODO"
CLIENT_SECRET="TODO"
GRANT_TYPE="password"
USERNAME="TODO"
<Project Sdk="Microsoft.NET.Sdk">
<Sdk Name="Microsoft.Build.CentralPackageVersions" Version="2.0.1" />
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<NoWarn>NU1701</NoWarn>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="../Cedar.Domain/Cedar.Domain.csproj" />
</ItemGroup>
@larsw
larsw / WAT.ps1
Created June 14, 2018 12:35
Powershell equality WAT's
$true -and $false
# False
function fa { return $true }
function fb { return $false }
fa -and fb
# True = WAT
(fa) -and (fb)
# False
@larsw
larsw / lw-spotify-timecapsule.txt
Created November 28, 2017 21:01
Spotify @lw time capsule list 2017
Beastie Boys - Sure Shot - 2009 Digital Remaster (spotify:track:4P3gDYOHTPQtfBAF80iwt8?context=spotify%3Auser%3Aspotify%3Aplaylist%3A37i9dQZF1E4I3epR4biSEm)
CC Cowboys - Vill, Vakker & Våt (spotify:track:0f78flK99LqerP7kQgDT1L?context=spotify%3Auser%3Aspotify%3Aplaylist%3A37i9dQZF1E4I3epR4biSEm)
The Prodigy - Poison (spotify:track:5nsd2bxUp2QgUGyUXxNtgi?context=spotify%3Auser%3Aspotify%3Aplaylist%3A37i9dQZF1E4I3epR4biSEm)
Snoop Dogg - G Funk Intro (spotify:track:7AMKd7lV3sZLWpph7VjomE?context=spotify%3Auser%3Aspotify%3Aplaylist%3A37i9dQZF1E4I3epR4biSEm)
Queen, David Bowie - Under Pressure Remastered 2011 (spotify:track:2fuCquhmrzHpu5xcA1ci9x?context=spotify%3Auser%3Aspotify%3Aplaylist%3A37i9dQZF1E4I3epR4biSEm)
Jokke - Sola Skinner (spotify:track:1otmhZinn0A8kzh3bEQUY7?context=spotify%3Auser%3Aspotify%3Aplaylist%3A37i9dQZF1E4I3epR4biSEm)
The Chemical Brothers - Leave Home (spotify:track:4mFDB35IaTzrzqMn4spMqo?context=spotify%3Auser%3Aspotify%3Aplaylist%3A37i9dQZF1E4I3epR4biSEm)
deLillos - Kokken Tor (spotify:t

Keybase proof

I hereby claim:

  • I am larsw on github.
  • I am larsw (https://keybase.io/larsw) on keybase.
  • I have a public key ASD4SSswdQCdskDVNLXFJHH0y_NGnTEhzi0q__GWAbxkewo

To claim this, I am signing this object:

@larsw
larsw / uhoh.js
Created August 3, 2017 18:13
rxjs groupBy() / flatMap() / group.reduce() problem
//
// yields a stream of objects.
//
observable.subscribe(x => console.log(x))
//
// returns:
// []
// []
@larsw
larsw / reclaimWindows10.ps1
Created January 9, 2017 12:56 — forked from alirobe/reclaimWindows10.ps1
"Reclaim Windows 10" turns off a bunch of unnecessary Windows 10 telemetery, removes bloatware, and privacy invasions. Review and tweak before running. Scripts for reversing are included and commented. Fork via https://github.com/Disassembler0 (different defaults)
##########
# Win10 Initial Setup Script
# Author: Disassembler <[email protected]>
# Version: 1.7, 2016-08-15
# dasm's script: https://github.com/Disassembler0/Win10-Initial-Setup-Script/
# THIS IS A PERSONALIZED VERSION
# This script leaves more MS defaults on, including MS security features.
# Tweaked based on personal preferences for @alirobe 2016-11-16 - v1.7.1