Tutorial and tips for GitHub Actions workflows
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os | |
| import yaml | |
| from pathlib import Path | |
| import argparse | |
| def find_called_workflows(file_path): | |
| """Parse a workflow file to find referenced workflows.""" | |
| called_workflows = set() | |
| with open(file_path, "r") as f: | |
| try: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import sys | |
| from datetime import datetime | |
| def prepend_diff(input_file, output_file): | |
| # Read all lines from the input file | |
| with open(input_file, 'r') as file: | |
| lines = file.readlines() | |
| output_lines = [] | |
| prev_timestamp = None |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| source-file ${HOME}/.tmux-themepack/powerline/default/green.tmuxtheme | |
| setw -g mouse on | |
| bind -T copy-mode-vi y send -X copy-pipe "xclip -selection c" | |
| bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'select-pane -t=; copy-mode -e; send-keys -M'" | |
| bind -n WheelDownPane select-pane -t= \; send-keys -M | |
| bind -n C-WheelUpPane select-pane -t= \; copy-mode -e \; send-keys -M | |
| bind -T copy-mode-vi C-WheelUpPane send-keys -X halfpage-up | |
| bind -T copy-mode-vi C-WheelDownPane send-keys -X halfpage-down | |
| bind -T copy-mode-emacs C-WheelUpPane send-keys -X halfpage-up | |
| bind -T copy-mode-emacs C-WheelDownPane send-keys -X halfpage-down |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| mvn archetype:generate \ | |
| -DarchetypeGroupId=org.apache.flink \ | |
| -DarchetypeArtifactId=flink-quickstart-scala \ | |
| -DarchetypeVersion=1.13.2 \ | |
| -DgroupId=io.dev.flink \ | |
| -DartifactId=flink-scala-project \ | |
| -Dversion=0.1 \ | |
| -DinteractiveMode=false |
NOTE: a more up-to-date version of this can be found on my blog
A few days ago, version 1.9 of the Nix package manager was released. From the release notes:
nix-shell can now be used as a #!-interpreter. This allows you to write scripts that dynamically fetch their own dependencies.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # | |
| # Bash `flock` example. | |
| # Works on: Linux, BSD | |
| # Doesn't work on: MacOS | |
| # The file which represent the lock. | |
| LOCKFILE="`basename $0`.lock" | |
| # Timeout in seconds. |
VMWare Fusion 13 is now released. Read Vagrant and VMWare Fusion 13 Player on Apple M1 Pro for the latest.
This document summarizes notes taken while to make the VMWare Tech preview work on Apple M1 Pro, it originated