Set which editor git should use.
This is the program that will open during a commit
with no -m
flag, a merge, a rebase, etc...
Select from any installed editor. Examples:
- emacs:
emacs
- vi:
vi
orvim
My Class { | |
public static void main(String[] args) { | |
System.out.println("main"); | |
} | |
} |
# grabs files between develop / master and head | |
files=`git diff --name-only develop..HEAD -- "*.js"` | |
# Save current IFS | |
SAVEIFS=$IFS | |
# Change IFS to new line. | |
IFS=$'\n' | |
names=($files) | |
# Restore IFS | |
IFS=$SAVEIFS |
s=`git rev-parse --abbrev-ref HEAD | awk '{print toupper($0)}'` | |
JIRA_TYPE=` echo $s | rev | cut -d'-' -f2 | rev` | |
TICKET=`echo $s | rev | cut -d'-' -f1 | rev` | |
# call git with the message | |
echo [$JIRA_TYPE-$TICKET] $@ | |
# git cmp = "!f() { git add -A && git commit -m \"$@\" && git push; }; f" | |
git cmp "[$JIRA_TYPE-$TICKET] $@" |
[core] | |
editor = code --wait | |
[alias] | |
# one-line log | |
lg = log --pretty=format:"%C(yellow)%h\\ %ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=short | |
dl = branch -D | |
dlremote = "!f() { git branch -D \"$@\" && git push origin --delete \"$@\"; }; f" | |
co = checkout | |
st = status -s | |
newbranch = "!f() { git checkout -b $@ && git push -u origin $@; }; f" |
Set which editor git should use.
This is the program that will open during a commit
with no -m
flag, a merge, a rebase, etc...
Select from any installed editor. Examples:
emacs
vi
or vim
#!/bin/fish | |
# echo $argv[1] | |
set name $argv[1] | |
set branch_name (string replace -a ' ' '-' $name) | |
# echo $branch_name | |
git fetch origin | |
gnb $branch_name | |
gp "$name" | |
pr |
(function () { | |
'use strict'; | |
var ERROR = 'input is invalid type'; | |
var WINDOW = typeof window === 'object'; | |
var root = WINDOW ? window : {}; | |
if (root.JS_SHA256_NO_WINDOW) { | |
WINDOW = false; | |
} | |
var WEB_WORKER = !WINDOW && typeof self === 'object'; |
let testNews = [{...}]; | |
function filterDupes(y) { | |
y = y.map(x => { | |
const combined = x.title+x.description; | |
const id = Symbol.for(combined.replace(/[^\w]+/g, '')) | |
return {...x, id} | |
}) | |
var seen = {}; |
{ | |
"ad": [ | |
"42.5000", | |
"1.5000" | |
], | |
"ae": [ | |
"24.0000", | |
"54.0000" | |
], | |
"af": [ |