Skip to content

Instantly share code, notes, and snippets.

View LeeFlannery's full-sized avatar
🥸

Lee Flannery LeeFlannery

🥸
View GitHub Profile
@LeeFlannery
LeeFlannery / .gitconfig
Last active February 1, 2024 20:47
Git config 2024
# .gitconfig
# A good start.
[user]
name = Me
email = me@example.com
[core]
excludesfile = ./.gitignore_global
autocrlf = input
trustctime = false
@LeeFlannery
LeeFlannery / .gitconfig
Last active October 21, 2021 19:15
.gitconfig ... 2021 version - same as last year. If it ain't broke ...
[user]
name = Lee Flannery
email = lflannery@example.com
# A history alias I've always liked
[alias]
hist = log --pretty=format:\"%h %ad | %s%d [%an]\" --graph --date=short
[core]
autocrlf = input
@LeeFlannery
LeeFlannery / .zshrc
Last active October 21, 2021 19:18
.zshrc
# .zshrc
#
# `.zshrc' is sourced in interactive shells.
# It should contain commands to set up aliases, functions, options, key bindings, etc.
#
# See https://zsh.sourceforge.io/Intro/intro_3.html
# turn on auto cd
# Using the AUTOCD option, you can simply type the name of a directory, and it will become the current directory.
# See https://zsh.sourceforge.io/Intro/intro_16.html
# .zprofile
#
# '.zlogin' is sourced in login shells.
# It should contain commands that should be executed only in login shells.
# '.zlogout' is sourced when login shells exit. '.zprofile' is similar to '.zlogin',
# except that it is sourced before '.zshrc'.
#
# See https://zsh.sourceforge.io/Intro/intro_3.html
# Make sure homebrew is in PATH
# .zshenv
#
# '.zshenv' is sourced on all invocations of the shell, unless the -f option is set.
# It should contain commands to set the command search path, plus other important environment variables.
# '.zshenv' should not contain commands that produce output or assume the shell is attached to a tty.
#
# See https://zsh.sourceforge.io/Intro/intro_3.html
# (Nothing to see here! Mac PATHS are mainttained outside of the shell!)
@LeeFlannery
LeeFlannery / keybase.txt
Created July 24, 2019 15:47
Keybase proof
### Keybase proof
I hereby claim:
* I am leeflannery on github.
* I am lflannery (https://keybase.io/lflannery) on keybase.
* I have a public key ASCSnO72d4K2DODLZ_gLmBUVkaF4w6fUkrioGjHhlQMM_Qo
To claim this, I am signing this object:
@LeeFlannery
LeeFlannery / .bashrc
Last active October 27, 2015 16:23
Windows .bashrc for Git Bash (Git 2.0+). starts ssh agent, runs shell script to edit command prompt (see git-prompt-local-override.sh)
eval `ssh-agent`
ssh-add
. ~/git-prompt-local-override.sh
@LeeFlannery
LeeFlannery / git-prompt-local-override.sh
Created October 27, 2015 16:03
Shell script to override Git Bash's bash prompt on Windows (Git 2.0+)
##PS1='\[\033]0;$MSYSTEM:${PWD//[^[:ascii:]]/?}\007\]' # set window title
PS1='\[\033]0;${PWD//[^[:ascii:]]/?}\007\]' # set window title
PS1="$PS1"'\n' # new line
PS1="$PS1"'\[\033[32m\]' # change to green
PS1="$PS1"'\u@\h ' # user@host<space>
##PS1="$PS1"'\[\033[35m\]' # change to purple
##PS1="$PS1"'$MSYSTEM ' # show MSYSTEM
PS1="$PS1"'\[\033[33m\]' # change to brownish yellow
PS1="$PS1"'\w' # current working directory
if test -z "$WINELOADERNOEXEC"
@LeeFlannery
LeeFlannery / selectOnFocus.js
Created August 19, 2015 17:33
jQuery - select all text on focus
function selectOnFocus(input) {
input.each(function (index, elem) {
var $elem = $(elem);
var ignoreNextMouseUp = false;
$elem.mousedown(function () {
if (document.activeElement !== elem) {
ignoreNextMouseUp = true;
}
});
@LeeFlannery
LeeFlannery / .gitignore_global
Created January 15, 2015 18:08
core.excludes gitignore - stuff you never want.
# OSX
.DS_Store
.AppleDouble
.LSOverride
._*
# Windows
Thumbs.db