Skip to content

Instantly share code, notes, and snippets.

View knbknb's full-sized avatar
💭
🙅‍♀️💡💤😴🛌🤪🧔

Knut Behrends knbknb

💭
🙅‍♀️💡💤😴🛌🤪🧔
View GitHub Profile
@knbknb
knbknb / command-line-piping.R
Last active September 22, 2022 10:26 — forked from chasemc/skimr.r
R: data.table::fread's ability to use unix-cmdtool to "stream in" data
# see: https://www.youtube.com/watch?v=RYhwZW6ofbI&t=6s
# R tip #3: use pipe connections
# by jim Hester
library(data.table) # for files < ~10GB
library(skimr) # another summary()
# filter a file: get only lines containing word UNK
# benchmarking the new parsnip release 1.0.3 vs previous 1.0.2
#
# forked from: @simonpcouch
# https://gist.github.com/simonpcouch/651d0ea4d968b455ded8194578dabf52
# gist name:simonpcouch/parsnip_speedup.R
# 2022-11-22
#
library(tidymodels)
# with v1.0.2 ------------------------------------------------------------
@knbknb
knbknb / cleanup-gitlab-pipelines.sh
Created February 20, 2023 17:18 — forked from chrishoerl/cleanup-gitlab-pipelines.sh
Bulk delete gitlab pipelines older than a given date
#!/bin/bash
# Purpose: Bulk-delete GitLab pipelines older than a given date
# Author: github.com/chrishoerl
# GitLab API: v4
# Requirements: jq must be instaled ($ sudo apt install jq)
# API example: https://gitlab.example.com/api/v4/projects
# API example: https://gitlab.example.com/api/v4/projects/<projectid>/pipelines
#
# NOTE: Script is just a dryrun. To really delete pipelines, simply uncomment line 49 to activate
#
@knbknb
knbknb / ubuntu-custom-setup.sh
Last active March 8, 2023 14:13 — forked from riccardopedrielli/ubuntu-workstation-setup.sh
Ubuntu workstation setup
#!/usr/bin/env bash
set -Eeu
trap 'STATUS=${?}; echo "${0}: Error on line ${LINENO}: ${BASH_COMMAND}"; exit ${STATUS}' ERR
trap 'rm -rf ${tempDir}' EXIT
readonly supportedUbuntuVersion="22.04"
readonly tempDir="/tmp/setup"
readonly devDir="${HOME}/dev"
readonly scriptsDir="${devDir}/scripts"
@knbknb
knbknb / ultimate-ut-cheat-sheet.md
Created March 26, 2023 10:55 — forked from yoavniran/ultimate-ut-cheat-sheet.md
The Ultimate Unit Testing Cheat-sheet For Mocha, Chai, Sinon, and Jest
@knbknb
knbknb / qmd_template_at_a_glance.qmd
Last active June 26, 2023 14:01 — forked from erikerhardt/erik_qmd_template_simple.qmd
A qmd quarto frontmatter and template document, simple
---
title: Title
subtitle: Subtitle
author: # originally: Erik Erhardt
date: last-modified # today, now, last-modified
date-format: long # full, long, medium, short, iso, https://quarto.org/docs/reference/dates.html
format:
html:
theme: litera
highlight-style: atom-one
@knbknb
knbknb / hat.rkt
Created May 16, 2024 08:15 — forked from rdivyanshu/hat.rkt
Hat tiling
#lang racket
(require metapict)
(require metapict/pict)
(struct M-edge (turn) #:transparent)
(struct X+ M-edge () #:transparent)
(struct X- M-edge () #:transparent)
(struct A+ M-edge () #:transparent)