Skip to content

Instantly share code, notes, and snippets.

View tkalve's full-sized avatar
👨‍💻
full-snack developer

Thomas Kalve tkalve

👨‍💻
full-snack developer
View GitHub Profile
@tkalve
tkalve / backend-coverage-main.json
Last active November 15, 2024 13:31
SAPo coverage tracking
{ "generatedon": "2024-11-15T13:31:20Z", "parser": "OpenCover", "assemblies": 10, "classes": 740, "files": 886, "coveredlines": 7061, "uncoveredlines": 358251, "coverablelines": 365312, "totallines": 397382, "linecoverage": 1.9, "coveredbranches": 1054, "totalbranches": 4676, "branchcoverage": 22.5, "coveredmethods": 1629, "totalmethods": 3848, "methodcoverage": 42.3 }
eJydl3dQE/yy91MoASI1EBBEUEEUpBiklaABEemhCVKCCBGkhUjvtUgJTXorIr1JlR4U4QEEaUqJEHoEBKQprRyfuefMOXPvfWfeubuzv5394/fd+e5/H10NMBUMAPmTwZkejwD/jER2AIAewAewc7K28RS1dXV0MDS4AKCtT8fY/KvcPBkAQKp9IADw5z8A0G78KI6knuLf2fl+d2kzn/aTHckPqFcA+siH1Qt/a8n6YqjtZwCmbMPOx33+o4KIEZNhsXaZfsULdUMy5Z3YjtL5AfTs++Lwhdlwsk81fcqf+ed8nfSen+FZ8wCb0rFuaMAx9GxOITSbLOh2XoxJNj+fV8rn8nj4W7vNCcaqNz/gJ3SKLO1nUuLUYUoe/iBxNKb6BOnLdELpnK1E0/8CL+3T7u+djIafDneYdp6NzYwx0cDamulO4gtzz72fdXTonwdiZSAWOz8HFcMLhFjbOnT2ls231sUQfhPeh79WA6IPl0lj1V1EIS5P56652eyCOczXUM98Df1z6Gr+AloyZrh6C0uSK5bp+1DceboxMEHpPHI/XI72/H4JjzlHtzrCcwbOVmcWx7C8BZ8/z309P12Vxh9oERTAnQm0znjYQXbAghbh1Ei7vW+7U+lUO8hfny8ngMIPIcP+IntDNp3px50VQ8ns38m9gW033nX+nuu44SnWd7pKuR7gd9qcacHdMqWR5jEf8fv0eOctb8vB4kQxRsY869tx7H7bcsTWL/8TZqv8uKuTpt5nPinkDsVTtRGdYR5WU2+nbxjhVR+XE01WTnc0lffpzja67rKSX+iTtG4+TZGJtL7Gt9xU3zhT2uNd/YzDN3re2+Jlcis1mkeECPGRJZeqBTpjW/z7PlQ+YIYpi1eI1a9PKmQV6JZ4B3v4DBOWBkXr0GeLBpNH+YO5oCaP86s3vglRrd/23v4meq1G52Vf/xqVOQH90UHpIcJqKFKqv7sRGzArsfB168eIqAcT9S/OmpYuiRhc2yZRFpsckabVABZz1AsmO7ze
@tkalve
tkalve / dadjoke-o-matic.js
Created January 26, 2023 08:20
A bookmarklet to fetch a dad joke
javascript: (function() {
// set up XMLHttpRequest with onready handler
var xhr = new XMLHttpRequest();
xhr.onreadystatechange = function() {
if (xhr.readyState == 4 && xhr.status == 200) {
// parse joke from response
var response = JSON.parse(xhr.responseText);
@tkalve
tkalve / foo.ino
Last active February 17, 2020 19:17
#include <Wire.h>
#include <Adafruit_ADS1015.h>
#include <EEPROM.h>
#include <RunningAverage.h>
#define RA_SIZE 20
RunningAverage RA0(RA_SIZE);
RunningAverage RA1(RA_SIZE);
Adafruit_ADS1115 ads(0x48);
@tkalve
tkalve / stokkaseg.py
Created December 22, 2019 09:20
Løsning på kode24-kalenderluka for 22. desember 2019
# Originalteksten:
# Her er alle bokstavene flyttet X steg i alfabetet.
stokkaseg = 'NKC FKT RTVCNIJA, MXFKP HHL CC FKMAOD XÆUEUR. ICYØB PCSÅ MUUN TKJ OD TØ ROOAD, ZF OÅØØUYGHÅ NCÆ LMQ NHP C IPKVO: ZSVHBXITB'
# Alfabetet, slik vi lærte det på skolen på åttitallet før emojiene
# ble tatt inn.
alfabet = list('ABCDEFGHIJKLMNOPQRSTUVWXYZÆØÅ')
# Flyttetall er et tall for hver bokstav i stokkaseg-teksten
# Det forteller hvor mange steg i alfabetet vi skal flytte frem eller
#!/usr/bin/python
import sys
def lag_tabell(type):
# Sjekk hvilken type vi får som argument
# Skriv ut tittel og sett tabell til en range
if (type == "store"):
print ("Den store gangetabellen")
print ("")
tabell = range(10,21)

Keybase proof

I hereby claim:

  • I am tkalve on github.
  • I am tkalve (https://keybase.io/tkalve) on keybase.
  • I have a public key ASBRCCnwwVUeBfuK0u76rWDoh8O-ECndyan7oCf1Lb1nMQo

To claim this, I am signing this object:

@tkalve
tkalve / hyper.js
Created May 28, 2019 11:09
My hyper.js config file
Ok
@tkalve
tkalve / test.html
Created September 15, 2017 08:07
Ludvig test
<!DOCTYPE html>
<html lang="no">
<head>
<meta charset="utf-8" />
<title>Luddipudde</title>
</head>
<body>
<span id="LatestNews" class="semi-bold">Loading latest news...</span>
@tkalve
tkalve / color_my_prompt.sh
Created January 28, 2016 11:51
Colored bash prompt
function color_my_prompt {
local __user_and_host="\[$(tput bold)\]\[\033[38;5;198m\]\u\[$(tput sgr0)\]\[$(tput sgr0)\]\[\033[38;5;255m\] at \[$(tput bold)\]\[$(tput sgr0)\]\[\033[38;5;214m\]\h\[$(tput sgr0)\]"
local __cur_location="\[\033[38;5;255m\]in \[$(tput bold)\]\[$(tput sgr0)\]\[\033[38;5;154m\]\w\[$(tput sgr0)\]\[$(tput sgr0)\]\[\033[38;5;15m\]"
local __git_branch_color="\[$(tput sgr0)\]\[\033[38;5;247m\]"
local __git_branch='`git branch 2> /dev/null | grep -e ^* | sed -E s/^\\\\\*\ \(.+\)$/\(\\\\\1\)\ /`'
local __prompt_tail="\n\[$(tput sgr0)\]\[\033[38;5;255m\]\\$\[$(tput sgr0)\]"
local __last_color="\[\033[00m\]"
export PS1="$__user_and_host $__cur_location $__git_branch_color$__git_branch$__prompt_tail$__last_color "
}
color_my_prompt