Skip to content

Instantly share code, notes, and snippets.

@dotnetCarpenter
dotnetCarpenter / FiltrerSportFra.user.js
Last active October 22, 2024 19:18
Filtrer sport på dr.dk/nyheder fra.
// @ts-check
// ==UserScript==
// @name Filtrer sport
// @namespace http://tampermonkey.net/
// @version 2024.10.22
// @description Filtrer sport på dr.dk/nyheder fra.
// @author dotnetCarpenter
// @match https://www.dr.dk/nyheder
// @icon https://www.google.com/s2/favicons?sz=64&domain=dr.dk
// @grant none
@dotnetCarpenter
dotnetCarpenter / index.html
Last active January 27, 2022 16:54
Trying to figure out how to refactor code to use a State Monad like monastic
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<h1>Heading 1</h1>
@dotnetCarpenter
dotnetCarpenter / combinators.js
Created August 16, 2021 11:51 — forked from Avaq/combinators.js
Common combinators in JavaScript
const I = x => x
const K = x => y => x
const A = f => x => f (x)
const T = x => f => f (x)
const W = f => x => f (x) (x)
const C = f => y => x => f (x) (y)
const B = f => g => x => f (g (x))
const S = f => g => x => f (x) (g (x))
const S_ = f => g => x => f (g (x)) (x)
const S2 = f => g => h => x => f (g (x)) (h (x))
@dotnetCarpenter
dotnetCarpenter / gpg.strace
Created May 10, 2019 10:17
WSL Ubuntu: git gpg signing Inappropriate ioctl for device
5834 execve("/usr/bin/gpg", ["gpg", "--clearsign"], 0x7fffe5253560 /* 23 vars */) = 0
5834 brk(NULL) = 0x7fffcb04c000
5834 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
5834 access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
5834 openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
5834 fstat(3, {st_mode=S_IFREG|0644, st_size=22726, ...}) = 0
5834 mmap(NULL, 22726, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fa8e7598000
5834 close(3) = 0
5834 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
5834 openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libz.so.1", O_RDONLY|O_CLOEXEC) = 3
@dotnetCarpenter
dotnetCarpenter / file1.mjs
Created July 20, 2018 10:41
es-check ES2015 modules
export default msg => { console.log(msg) }
@dotnetCarpenter
dotnetCarpenter / # python@2 - 2018-06-15_12-09-28.txt
Created June 15, 2018 14:25
python@2 on macOS 10.13.5 - Homebrew build logs
Homebrew build logs for python@2 on macOS 10.13.5
Build date: 2018-06-15 12:09:28
@dotnetCarpenter
dotnetCarpenter / 2017-12-16T08_57_12_227Z-debug.log
Created December 16, 2017 09:02
npm can not find package.json in git repository
0 info it worked if it ends with ok
1 verbose cli [ '/home/dotnet/.nvm/versions/node/v8.9.3/bin/node',
1 verbose cli '/home/dotnet/.nvm/versions/node/v8.9.3/bin/npm',
1 verbose cli 'i',
1 verbose cli '-g',
1 verbose cli '[email protected]:dotnetCarpenter/node-ecstatic.git' ]
2 info using [email protected]
3 info using [email protected]
4 verbose npm-session d03ba394f38d5f28
5 silly install loadCurrentTree
@dotnetCarpenter
dotnetCarpenter / Kernel.php
Last active April 2, 2020 21:50
`./artisan server` for Lumen 5.3. Kernel.php is in app/Console/ and ServeCommand should be created in app/Console/Commands/
<?php
namespace App\Console;
use Illuminate\Console\Scheduling\Schedule;
use Laravel\Lumen\Console\Kernel as ConsoleKernel;
class Kernel extends ConsoleKernel
{
/**
@dotnetCarpenter
dotnetCarpenter / pre-push
Last active November 13, 2016 10:49
Before you push hook for svg.js
#!/bin/sh
npm run build:test && npm run test:quick
# check how the test went
testCode=$?
[ "$testCode" = 0 ] || echo "Your current build does not pass our unit tests - please make them pass before you push"
# revert artifacts created during build
git reset --hard $(git log -1 --pretty=%H)
# exit with the test exit code
@dotnetCarpenter
dotnetCarpenter / npm_test_output
Last active October 27, 2016 14:41
npm test fails but if we run the indivudual tests or the commands in the tests, everything is ok.
C:\Users\korsoxx\jon\pipetree>npm test
> [email protected] test C:\Users\korsoxx\jon\pipetree
> tap spec/*.js --100
spec/httpsget.js ...................................... 1/1 8s
spec/integration.js ................................... 0/4 3s
downloadUrl should
not ok Error: Command failed: node integration/cat.js fixtures/releases.json | node integration/downloadUrl.js 'C:\Users\korsoxx\.node-spawn-wrap-11056-b87e533d7c69' is not recognized as an internal or external command, operable program or batch file.
at: