Skip to content

Instantly share code, notes, and snippets.

Peter Avila peter-avila

Block or report user

Report or block peter-avila

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View manjaro default bashrc
#
# ~/.bashrc
#
[[ $- != *i* ]] && return
colors() {
local fgc bgc vals seq0
printf "Color escapes are %s\n" '\e[${value};...;${value}m'
View Splitting a subfolder out into a new repository.md

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 Mar 11, 2019 — forked from korya/Subfolder to git repo.md
Convert subfolder into Git submodule
View Subfolder to git repo.md
View bash prompt
######################################
# PA added
#
# 3-line prompt with git integration
#
# ┌────[user@host ]-( 0 jobs ) - -- - - - - - [ 2019-11-11 | 11:11:11 ]
# ⚡ /present/working/Directory ] -( master )
# └──▶
#
@peter-avila
peter-avila / .hyper.js
Last active Mar 14, 2019
Hyper Sync Settings
View .hyper.js
// 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',
@peter-avila
peter-avila / markdown-details-collapsible.md
Created Mar 10, 2019 — forked from pierrejoubert73/markdown-details-collapsible.md
How to add a collapsible section in markdown.
View markdown-details-collapsible.md

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 Mar 10, 2019 — forked from specious/bender-bash-prompt
A fancy two-line #!/bin/bash prompt with $(git integration)
View bender-bash-prompt
#
# 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 Mar 10, 2019 — 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.
View 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 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\]"
View hyperstart.bat
@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
You can’t perform that action at this time.