This guide covers Linux-specific setup, configuration, and troubleshooting for the Teamcraft desktop app (AppImage).
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
| #!/usr/bin/env zsh | |
| set -euo pipefail | |
| # Resolve I2C bus numbers by serial number since ddcutil/kernel can | |
| # renumber /dev/i2c-* across reboots or driver reloads. One detect scan is | |
| # ~2s for me, so it's cached and reused for both lookups rather than run twice. | |
| DETECT_OUTPUT=$(ddcutil detect --brief) | |
| find_bus() { | |
| local serial="$1" |
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
| # ZSH Theme emulating the Fish shell's default prompt. | |
| _fishy_collapsed_wd() { | |
| local i pwd | |
| pwd=("${(s:/:)PWD/#$HOME/~}") | |
| if (( $#pwd > 1 )); then | |
| for i in {1..$(($#pwd-1))}; do | |
| if [[ "$pwd[$i]" = .* ]]; then | |
| pwd[$i]="${${pwd[$i]}[1,2]}" | |
| else |
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
| var ac = new AudioContext(); | |
| var dest = ac.createMediaStreamDestination(); | |
| // Get permission to use non-default audio devices | |
| // This requests microphone permission also. Perhaps there's a better way to just get output permission. | |
| navigator.mediaDevices.getUserMedia({audio: true}); | |
| // Gets a list of output devices | |
| const devices = await navigator.mediaDevices.enumerateDevices(); | |
| const audioDevices = devices.filter(device => device.kind === 'audiooutput'); |
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
| .ProfileHeading-content, .ProfileCanopy-navBar, .RichEditor, .NotificationsHeadingContent, .content-header .header-inner, .content-inner, .module .list-link { | |
| background: #292929; | |
| } | |
| .global-nav .search-input, .RichEditor.is-fakeFocus { | |
| background: #121212; | |
| border: 1px solid #303030; | |
| } | |
| .global-nav .search-input:focus, .RichEditor.is-fakeFocus:focus { |
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 unittest | |
| # Code | |
| def get_permutations(input_str): | |
| input_len = len(input_str) | |
| results = [] | |
| if input_len == 0: |
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
| from functools import reduce | |
| import unittest | |
| def multiply(int_list): | |
| return reduce(lambda x, y: x*y, int_list) | |
| # O(n^2) | |
| def get_products_of_all_ints_except_at_index(int_list): |
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
| // ==UserScript== | |
| // @name GitHub 1-click PR Approve | |
| // @namespace https://gist.github.com/birkholz | |
| // @description Adds a 1-click approve button to Pull Requests | |
| // @version 3 | |
| // @author https://github.com/birkholz | |
| // @match https://github.com/*/*/pull/*/files | |
| // @grant none | |
| // ==/UserScript== |
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
| #!/usr/bin/env bash | |
| echo "WARNING: This will reset your working directory!" | |
| echo "Please make sure all your changes are committed and merged into master." | |
| read -p "Are you sure you want to continue? " -n 1 -r | |
| echo | |
| if [[ $REPLY =~ ^[Yy]$ ]] | |
| then | |
| echo "Preparing to build..." | |
| { |
NewerOlder