Dump of all commands from "So You Think You Know Git - FOSDEM 2024":
The full blog post: https://blog.gitbutler.com/git-tips-and-tricks/
#!/usr/bin/env python3 | |
# coding: utf-8 | |
class Node: | |
def __init__(self, value, previous, next_): | |
self.value = value | |
self.previous = previous | |
self.next = next_ |
Reveal.goto = slideNumber => { | |
let indices = Reveal.getIndices(Reveal.getSlides()[slideNumber - 1]); | |
Reveal.slide(indices.h, indices.v); | |
}; |
using System; | |
using System.Runtime.InteropServices; | |
using Microsoft.Win32; | |
public enum WallpaperStyle | |
{ | |
Fill, | |
Fit, | |
Stretch, | |
Tile, |
/** | |
* Delays a `console.log()` for the given time amount. | |
* | |
* @param message A message to log. | |
* @param duration A delay in seconds. | |
*/ | |
function delay(message: string, duration: number): Promise<void> { | |
return new Promise((resolve) => { | |
setTimeout(() => { | |
console.log(message); |
... | |
# Distro | |
DISTRO_NAME=$(lsb_release -sd | sed -e 's/"//g') | |
DISTRO_VERSION=$(lsb_release -sr | sed -e 's/.0$//g') | |
DISTRO_CODENAME=$(lsb_release -sc) | |
# Override distro name |
function FindProxyForURL(url, host) { | |
return "DIRECT"; | |
} |
{ | |
"redirect_uri": "http://localhost/response?access_token=abcde&something_else=bbb" | |
} |
Dump of all commands from "So You Think You Know Git - FOSDEM 2024":
The full blog post: https://blog.gitbutler.com/git-tips-and-tricks/
function swap_worktree_branch_with() { | |
# Run the command again to get the error message | |
error_message=$(git switch $1 2>&1) | |
culprit_worktree=$(echo $error_message | grep "is already used by worktree at" | cut -d "'" -f4) | |
if [ -z "$culprit_worktree" ]; then | |
return | |
fi | |
# Save the branch in current worktree, and detach the HEAD so that we can switch to this branch in the culprit worktree |