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
#!/bin/bash | |
if [[ ! -f /proc/version ]] && grep -Pq '[Mm]?icrosoft' /proc/version; then | |
echo "Only works with WSL" | |
exit 1 | |
fi | |
/mnt/c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe Start-Process -FilePath "$@" -Verb open |
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
$gitroot = $args[0] | |
function gitignoreio() { | |
# Parameter help description | |
Param( | |
[Parameter(Mandatory = $true)] | |
[String] | |
$command | |
) |
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 python3 | |
""" | |
usage: git fetchpr <PULL_REQUEST_ID> | |
Arguments: | |
PULL_REQUEST_ID The pull request id | |
If an 'upstream' repository is configured this command can fetch unmerged pull requests to your local repository. | |
The PULL_REQUEST_ID can be found in on Github upstream pull request page. |
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
#!/bin/bash | |
ARG1=$1 | |
MSG=${ARG1:-"Update - $(date)"} | |
function mkcommit() | |
{ | |
echo "Commit Message: $1" | |
git commit -am "$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
#!/bin/bash | |
CYAN=$(tput setaf 6) | |
BOLD=$(tput bold) | |
RESET=$(tput sgr0) | |
echo "> Searching for git directories..." | |
find . -name ".git" -type d | while read dir; do | |
echo "-----" | |
echo -e Git status @ ${CYAN}${BOLD}${dir/.git/}${RESET} |
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
#!/bin/bash | |
ARG1=$1 | |
MSG=${ARG1:-"Update - $(date)"} | |
function mkcommit() | |
{ | |
echo "Commit Message: $1" | |
git commit -am "$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
#!/bin/bash | |
_gen_fzf_default_opts() { | |
local color00='#263238' | |
local color01='#2C393F' | |
local color02='#37474F' | |
local color03='#707880' | |
local color04='#C9CCD3' | |
local color05='#CDD3DE' | |
local color06='#D5DBE5' |
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
#!/bin/bash | |
# Create useful gitignore files. Based on gi from fzf examples | |
# Usage: ignoreman [param] | |
# param is a comma separated list of ignore profiles. | |
# If param is ommited choose interactively. | |
# This version will modify or create a .gitignore file and provide a preview in interactive mode | |
# I also switched from sh to bash because I couldn't execute this script with sh. |
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
location ~ /app/* { | |
client_max_body_size 2048m; | |
proxy_read_timeout 86400s; | |
proxy_send_timeout 86400s; | |
proxy_set_header X-Forwarded-Host $host; | |
proxy_set_header X-Forwarded-Server $host; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header Host $host; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_http_version 1.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
A=$PWD | |
[[ -n $1 ]] && a="$1" || a="$PWD" | |
cd $a | |
local dir=$((printf '..\n' && exa -F1a --color=always) | fzf --reverse --exact --ansi --preview="test -f {} && bat --color=always --paging=never --decorations=always --italic-text=always --style=full {} || test -d {} && exa -Fla --color=always {} || echo ''") | |
test -d "$dir" && explorer $dir | |
test -f "$dir" && $EDITOR $dir |