Skip to content

Instantly share code, notes, and snippets.

View lukasholzer's full-sized avatar

Lukas Holzer lukasholzer

View GitHub Profile
@lukasholzer
lukasholzer / README.md
Created July 30, 2026 11:36
Sync Straion rules with Azure DevOps Pipelines

Sync Straion rules with Azure DevOps

Straion rules can be stored in Azure Repos and synchronized using Azure Pipelines. Git remains the source of truth, and Straion never requires write access to the repository.

1. Connect the repository

Install and authenticate the Straion CLI, then run this from inside your repository:

straion source repo connect
@lukasholzer
lukasholzer / index.mjs
Created May 31, 2023 08:06
Netlify affected builds plugin for Nx
// file located under: plugins/affected-build/index.mjs
/** @type {import('@netlify/build').OnPreBuild} */
export const onPreBuild = async ({ utils }) => {
const prevCommitRef = process.env.CACHED_COMMIT_REF;
const currentCommitRef = process.env.COMMIT_REF;
const isInitialBuild = currentCommitRef === prevCommitRef; // check if it's the initial build
const projectName = process.env.PROJECT_NAME; // can be set through an env variable in the `netlify.toml` or UI.
@lukasholzer
lukasholzer / jest-haste-map+26.6.2.patch
Last active April 19, 2021 05:59
bazel jest testing rule
diff --git a/node_modules/jest-haste-map/build/crawlers/node.js b/node_modules/jest-haste-map/build/crawlers/node.js
index 1e7372c..ab36178 100644
--- a/node_modules/jest-haste-map/build/crawlers/node.js
+++ b/node_modules/jest-haste-map/build/crawlers/node.js
@@ -168,10 +168,6 @@ function find(roots, extensions, ignore, callback) {
}
if (typeof entry !== 'string') {
- if (entry.isSymbolicLink()) {
- return;
@lukasholzer
lukasholzer / setup-bazel-ec2.sh
Created August 26, 2020 08:42
Setup Bazel on an AWS ec2 instance
#!/bin/bash
# The script should immediately exit if any command in the script fails.
set -e
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash
. ~/.nvm/nvm.sh
nvm install node
@lukasholzer
lukasholzer / windows
Created August 19, 2020 09:05
Windows Angular Comopnents failing
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
Try the new cross-platform PowerShell https://aka.ms/pscore6
PS C:\Users\labuser> ls
Directory: C:\Users\labuser
@lukasholzer
lukasholzer / read-dir-recursively.ts
Created September 6, 2018 08:27
Util function for recursively reading a dir. In addition a RegEx can be passed to match on all the files.
import { readdir, stat } from 'fs';
import { join } from 'path';
import { promisify } from 'util';
const readdirAsync = promisify(readdir);
const statAsync = promisify(stat);
export async function readDirRecursively(
dir: string,
regex: RegExp = null,
@lukasholzer
lukasholzer / docker-cleanup-resources.md
Created January 22, 2018 07:53 — forked from bastman/docker-cleanup-resources.md
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

@lukasholzer
lukasholzer / _aspect-ratio.scss
Last active February 9, 2017 10:08
SCSS Mixin for aspect ratios
@mixin aspect-ratio($width, $height) {
position: relative;
display: block;
width: 100%;
padding-top: ($height / $width) * 100%;
&:before {
display: block;
content: "";
width: 100%;
padding-top: ($height / $width) * 100%;
@lukasholzer
lukasholzer / _fancy-hover.scss
Created February 9, 2017 10:04
Fancy Link hover Mixin
$fh_line_height: 1.5em !default;
$fh_border_thickness: 1px !default;
/* *
* Uses Classes .is-mobile and .is-desktop on the body Element
* to determine if you browse on a mobile device or not.
*/
@mixin fancy-hover($fh_border_color) {
position: relative;