-
git-trim trims your branches whose tracking remote refs are merged or stray. See also
-
pod-graceful-drain Kubernetes controller that reduce downtime when you rollout a deployment with load balancers.
This file contains 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
# Disable Ctrl+Alt+Left/Right | |
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-left "['']" | |
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-right "['']" | |
This file contains 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 | |
set -euo pipefail | |
POD_ID=${RANDOM} | |
TUNNEL_NAME="tunnel-${POD_ID}" | |
HOST_NAME=tunnel | |
USER_NAME=tunnel-user | |
PORT=2222 | |
KUBECTL_CONFIGS=() |
This file contains 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 { CfnElement, CfnResource, Stack } from "@aws-cdk/core"; | |
import { makeUniqueId } from "@aws-cdk/core/lib/private/uniqueid"; | |
import { Node } from "constructs"; | |
import * as assert from "assert"; | |
const PINNED_RESOURCE_NAMES_CONTEXT_KEY = "pinnedLogicalIds"; | |
type PinnedLogicalIds = { [segment: string]: PinnedLogicalIds | string }; | |
export class StableNameStack extends Stack { |
This file contains 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
use std::collections::{HashSet, VecDeque}; | |
#[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)] | |
enum Dir { | |
Left, | |
Right, | |
Down, | |
Up, | |
} |
This file contains 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
use std::collections::VecDeque; | |
use std::error::Error; | |
use std::fmt::{Display, Formatter}; | |
use std::io::{stdin, Read}; | |
type Result<T> = std::result::Result<T, Box<dyn Error>>; | |
fn main() -> Result<()> { | |
let mut input = String::new(); | |
stdin().read_to_string(&mut input)?; |
This file contains 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 | |
## Requires: (optional) git-sync | |
set -euo pipefail | |
OPTS_SPEC="\ | |
$0 [<branch-name>] [<options>] | |
An opinionated git workflow for random walker. |
This file contains 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 | |
git() { | |
if [[ $1 == "checkout" ]]; then | |
echo "Use 'git swtich' or 'git restore'" | |
return -1 | |
fi | |
if [[ $1 == "switch" ]] && [[ "$#" -eq 1 ]]; then | |
local BRANCHES=$(git branch --list --verbose | grep -v -e "^\*" | sed 's/^\s*//') | |
local BRANCH=$(echo "$BRANCHES" | fzf --height 8 --select-1 --exit-0 | awk '{print $1}') |
This file contains 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 | |
## git-fixup: fixup and rebase interactively. | |
## requires fzf | |
set -euo pipefail | |
get-base() { | |
local REMOTE_HEAD; | |
local REMOTE_BASE; |
This file contains 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 | |
# git-sync: pull, prune, trim all branches. | |
# requires: (optional) git-trim | |
set -euo pipefail | |
CURRENT=$(git branch --show-current) | |
do-ff() { |