Skip to content

Instantly share code, notes, and snippets.

View peter-avila's full-sized avatar

Peter Avila peter-avila

View GitHub Profile

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
######################################
# 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 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',
@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
@peter-avila
peter-avila / README.md
Last active March 6, 2019 02:21 — forked from eduncan911/Revert-Gist.md
Revert Gist Commits

Revert / Undo a Gist Commit

It was not exactly obvious. Here's how to revert a Gist commit!

Checkout the gist like a normal git repo:

# replace the Gist ID with your own
git clone git@github.com:cc13e0fcf2c348cc126f918e4a3917eb.git

Treat it like a normal repo. Edit, force push, etc.

!Vortex pok3r layout for non-pok3r keyboards on linux
!create .Xmodmap in the root of home directory
!edit, save, then implement for session with xmodmap .Xmodmap
!permenantly implement by running at startup with DE or edit the global startup script /etc/X11/xinit/xinitrc
!'xmodmap /home/USER_PROFILE_NAME/.Xmodmap'
!xev to find key information
!---------