Skip to content

Instantly share code, notes, and snippets.

View deanacus's full-sized avatar

Dean Harris deanacus

View GitHub Profile
@ttscoff
ttscoff / brett.fish
Last active August 17, 2021 01:26
Brett's Fish Shell custom init file
function __should_na
set -l cmd (history --max=1|awk '{print $1;}')
set -l cds cd z j popd g
if contains $cmd $cds
~/scripts/fish/na
end
end
function fallback --description 'allow a fallback value for variable'
if test (count $argv) = 1
@aluxian
aluxian / git_fzf_key_bindings.fish
Last active October 28, 2024 20:52 — forked from junegunn/functions.sh
Key bindings for git+fzf ported to Fish shell https://junegunn.kr/2016/07/fzf-git/
function __git_fzf_is_in_git_repo
command -s -q git
and git rev-parse HEAD >/dev/null 2>&1
end
function __git_fzf_git_status
__git_fzf_is_in_git_repo; or return
git -c color.status=always status --short | \
fzf -m --ansi --preview 'git diff --color=always HEAD -- {-1} | head -500' | \
cut -c4- | \
@robwierzbowski
robwierzbowski / gitcreate.sh
Last active December 27, 2024 11:23
A simple litte script. Create and push to a new github repo from the command line.
#!/bin/bash
# https://gist.github.com/robwierzbowski/5430952/
# Create and push to a new github repo from the command line.
# Grabs sensible defaults from the containing folder and `.gitconfig`.
# Refinements welcome.
# Gather constant vars
CURRENTDIR=${PWD##*/}
GITHUBUSER=$(git config github.user)
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active April 6, 2025 19:42
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname