Skip to content

Instantly share code, notes, and snippets.

View peter-avila's full-sized avatar

Peter Avila peter-avila

View GitHub Profile
#
# ~/.bashrc
#
[[ $- != *i* ]] && return
colors() {
local fgc bgc vals seq0
printf "Color escapes are %s\n" '\e[${value};...;${value}m'
@peter-avila
peter-avila / .hyper.js
Last active March 14, 2019 19:00
Hyper Sync Settings
// Future versions of Hyper may add additional config options,
// which will not automatically be merged into this file.
// See https://hyper.is#cfg for all currently supported options.
module.exports = {
config: {
// choose either `'stable'` for receiving highly polished,
// or `'canary'` for less polished but more frequent updates
updateChannel: 'stable',
######################################
# PA added
#
# 3-line prompt with git integration
#
# ┌────[user@host ]-( 0 jobs ) - -- - - - - - [ 2019-11-11 | 11:11:11 ]
# ⚡ /present/working/Directory ] -( master )
# └──▶
#

Source

Splitting a subfolder out into a new repository

You can turn a folder within a Git repository into a brand new repository.

If you create a new clone of the repository, you won't lose any of your Git history or changes when you split a folder into a separate repository.

@peter-avila
peter-avila / Subfolder to git repo.md
Created March 11, 2019 22:41 — forked from korya/Subfolder to git repo.md
Convert subfolder into Git submodule
@peter-avila
peter-avila / markdown-details-collapsible.md
Created March 10, 2019 23:13 — forked from pierrejoubert73/markdown-details-collapsible.md
How to add a collapsible section in markdown.

A collapsible section with markdown

Click to expand!

Heading

  1. A numbered
  2. list
    • With some
    • Sub bullets
@peter-avila
peter-avila / bender-bash-prompt
Created March 10, 2019 00:15 — forked from specious/bender-bash-prompt
A fancy two-line #!/bin/bash prompt with $(git integration)
#
# Fancy two-line prompt with git integration
#
# ┌───=[ specious :: sharp -( 0 )-[ ~ ]-( master )
# └──(
#
parse_git_dirty () {
[[ $(git status 2> /dev/null | tail -1) != "nothing to commit, working tree clean" ]] && echo "*"
}
@peter-avila
peter-avila / twoline_prompt.sh
Created March 10, 2019 00:14 — forked from mkottman/twoline_prompt.sh
A two-line colored Bash prompt (PS1) with Git branch and a line decoration which adjusts automatically to the width of the terminal. Recognizes SVN, Git and Fossil version control systems and shows the current branch/revision.
# A two-line colored Bash prompt (PS1) with Git branch and a line decoration
# which adjusts automatically to the width of the terminal.
# Recognizes and shows Git, SVN and Fossil branch/revision.
# Screenshot: http://img194.imageshack.us/img194/2154/twolineprompt.png
# Michal Kottman, 2012
RESET="\[\033[0m\]"
RED="\[\033[0;31m\]"
GREEN="\[\033[01;32m\]"
BLUE="\[\033[01;34m\]"
@ECHO off
:top
CLS
ECHO Choose a shell:
ECHO [1] cmd
ECHO [2] bash
ECHO [3] PowerShell
ECHO [4] Python
ECHO.
ECHO [5] restart elevated